Commit 3e694e82 by chenith Committed by Harsh Shah

Updated - J001 - Set focus to the error record.

parent 2ee406d0
......@@ -66,6 +66,11 @@ public class SaveRequirementsTemplateFP extends ORMProcessFormProcessor
BusinessObjectParser.assertFieldCondition(job.getAssessmentTemplateName() != null, job , Job.FIELD_AssessmentTemplateName, "mandatory", exceptions, true, request);
for(AssessmentCriteria criteria: job.getAssessmentCriteriasSet())
{
BusinessObjectParser.assertFieldCondition(criteria.getName() != null, criteria , AssessmentCriteria.FIELD_Name, "mandatory", exceptions, true, request);
}
super.validate(process, submission, exceptions, params);
}
}
\ No newline at end of file
......@@ -30,6 +30,17 @@
$("select[name$='AssessmentTemplate']").change(function(){
$("button[name$='loadRequirementsFromTemplate']").click();
});
var showError = true;
addPostRecalcHandler (function ($fieldThatChanged) {
if(showError) {
showError = false;
$('.errorField input, .errorField select, .errorField textarea, .errorField .assocObjDesc').eq(0).focus();
}
recalcFunction();
});
});
function addCriteria(criteria)
......@@ -167,7 +178,6 @@
requestAttribs="<%= CollectionUtils.mapEntry("Job", job)
.mapEntry (UpdateMappedObjFP.FAIL_VALIDATION_ERRORS, Boolean.FALSE)
.toMap() %>" />
</span>
</div>
</oneit:recalcClass>
......
......@@ -51,6 +51,15 @@
$("select[name$='CultureTemplate']").change(function(){
$("button[name$='loadCultureFromTemplate']").click();
});
var showError = true;
addPostRecalcHandler (function ($fieldThatChanged) {
if(showError) {
showError = false;
$('.errorField input, .errorField select, .errorField textarea, .errorField .assocObjDesc').eq(0).focus();
}
recalcFunction();
});
});
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment