Displaying validation exceptions on a page
When a validation fails during the post back of a page, the framework adds the validation error messages in javax.faces.context.FacesContext
object displaying it during the RenderResponse phase
in the page life cycle. ADF input components, in general, supports automatically displaying their own messages. However, if you want to override the default display of messages (including validation exception),
the following ADF Faces components are available for you:
af:message: To override the default error display for a component, you can use the
af:message
component. The following example overrides the default error display for thedeptName
field using a separateaf:message
component:<af:inputText id="deptName" value="#{deptBean.departmentName}" validator="#{deptBean.validateDepartmentName}" label="Departmnet Name:" autoSubmit="false"/> <af:message for="deptName" id="msg1"/>
This code will produce the following validation error display at...