-
1. default message of <rich:message> for validation errors
mp911de May 13, 2011 1:52 PM (in response to dandii)1 of 1 people found this helpfulHi Andi,
take a look at org.richfaces.application.FacesMessages. You'll find there a bunch of Message-Ids. Just include the Id with your translation in your messagebundle.
Best regards,
Mark
-
2. default message of <rich:message> for validation errors
ilya_shaikovsky May 15, 2011 12:06 PM (in response to mp911de)Also various localization available at JSF and hibernate and JSF levels. just check the docs for them
-
3. default message of <rich:message> for validation errors
dandii May 16, 2011 3:15 AM (in response to ilya_shaikovsky)Hi again,
thanks for your reply, my Problem is not to change the localization. The message "value must be a number between 4.9E-324 and 1.7976931348623157E308" is to long for my purpose, I would like to display a shorter message.
Regards,
Andi
-
4. default message of <rich:message> for validation errors
ssamayoagt May 16, 2011 4:45 PM (in response to dandii)As other fellows said you must check documentation of JSF and Bean Validation API.
@Min is Bean Validation annotation.
This is part of the Hibernate Validator (JSR-303 refence implementation):
2.2.4. Message interpolation
As we will see in Chapter 3, Creating custom constraints each constraint definition must
define a default message descriptor. This message can be overridden at declaration time
using the message attribute of the constraint. You can see this in Example 2.13, “Driver”. This
message descriptors get interpolated when a constraint validation fails using the configured
MessageInterpolator. The interpolator will try to resolve any message parameters, meaning
string literals enclosed in braces. In order to resolve these parameters Hibernate Validator's default
MessageInterpolator first recursively resolves parameters against a custom ResourceBundle
called ValidationMessages.properties at the root of the classpath (It is up to you to
create this file). If no further replacements are possible against the custom bundle the default
ResourceBundle under /org/hibernate/validator/ValidationMessages.properties gets
evaluated. If a replacement occurs against the default bundle the algorithm looks again at the
custom bundle (and so on). Once no further replacements against these two resource bundles
are possible remaining parameters are getting resolved against the attributes of the constraint to
be validated.
Is up to you to look for the documentation and do further reading.
Regards.
-
5. Re: default message of <rich:message> for validation errors
dandii May 17, 2011 10:39 AM (in response to ssamayoagt)Hi,
thanks, now I understand your responses....
Here ist the link to the documentation of the hibernate validator....
Andi