HTML and CSS Reference
In-Depth Information
<h:outputText value="#{bundle['']}"></h:outputText>
<h:inputText id="email"
<h:message for="email" styleClass="errorMessage"/>
<h:commandButton value="#{bundle['application.subscribe']}"
<h:messages styleClass="errorMessage"/>
As shown in the bolded lines, the <f:validateBean> tag can be attached to EditableValueHolder s, and using the
validationGroups attribute, you can specify the fully qualified name of the constraint classes (separated by commas)
which you want to execute on the parent EditableValueHolder .
the complete Maven project of the subscriber application is included in the topic web page at
under Chapter 3 resources.
Overriding Standard Messages
It is always useful to override the standard conversion and validation error messages in order to have a better
user experience. Although you can customize the conversion and validation error messages by using the
validatorMessage , requiredMessage , and converterMessage attributes of the EditableValueHolder components,
it will require less effort and more accuracy to globally override the JSF standard conversion and validation messages
on the application level than on every EditableValueHolder component.
In order to globally override the JSF standard conversion and validation messages, you will have to override the
messages in your application message bundle by using the standard message keys. Table 3-3 shows the possible JSF
standard message keys according to the JSF specification.
Search WWH ::

Custom Search