HTML and CSS Reference
In-Depth Information
Table 3-3. ( continued )
Key
Default Message
javax.faces.converter.ShortConverter.SHORT_detail
{2}: “{0}” must be a number between -32768
and 32767 Example: {1}
javax.faces.converter.STRING
{1}: Could not convert “{0}” to a string.
javax.faces.validator.BeanValidator.MESSAGE
{0}
javax.faces.validator.DoubleRangeValidator.MAXIMUM
{1}: Validation error: Value is greater than
allowable maximum of “{0}”.
javax.faces.validator.DoubleRangeValidator.MINIMUM
{1}: Validation error: Value is less than
allowable minimum of “{0}”.
javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE
{2}: Validation error: Specified attribute is not
between the expected values of {0} and {1}.
javax.faces.validator.DoubleRangeValidator.TYPE
{0}: Validation error: Value is not of the correct
type.
javax.faces.validator.LengthValidator.MAXIMUM
{1}: Validation error: Length is greater than
allowable maximum of “{0}”.
javax.faces.validator.LengthValidator.MINIMUM
{1}: Validation error: Length is less than
allowable minimum of “{0}”.
javax.faces.validator.LongRangeValidator.MAXIMUM
{1}: Validation error: Value is greater than
allowable maximum of “{0}”.
javax.faces.validator.LongRangeValidator.MINIMUM
{1}: Validation error: Value is less than
allowable minimum of “{0}”.
javax.faces.validator.LongRangeValidator.NOT_IN_RANGE
{2}: Validation error: Specified attribute is not
between the expected values of {0} and {1}.
javax.faces.validator.LongRangeValidator.TYPE
{0}: Validation error: Value is not of the correct
type.
Let's see an example to see how this customization can be performed. The following code snippet shows an input
text that is validated to be required and to have a value between 10 and 100.
<h:inputText id="someNumber"
value="#{testBean.number}"
required="true">
<f:validateLongRange minimum="10" maximum="100"/>
</h:inputText>
<br/>
<h:commandButton action="#{testBean.proceed}" value="Proceed"/><br/>
 
Search WWH ::




Custom Search