This content has been marked as final.
Show 4 replies
-
1. Re: problem with error message
valatharv Nov 12, 2008 7:38 PM (in response to arissonleal)Not sure about other versions, try adding requiredMessage="any text you want", it will display next to text field...
<h:inputText id="name" value="#{mybean.name}"
required="true"
requiredMessage="Name: value required"
label="Name" /> -
2. Re: problem with error message
arissonleal Nov 14, 2008 2:49 PM (in response to arissonleal)This problem occur just in WAR projects.
I tested with EAR and works fine.
Anybody knows how can i resolve this problem ?
-
3. Re: problem with error message
binnyg Nov 15, 2008 3:36 PM (in response to arissonleal)Try to add the following line to your message.properties.
javax.faces.component.UIInput.REQUIRED={0} is a required field.
I usually override these messages in customMessages.properties file and add an entry for message-bundle in faces-config.xml
faces-config.xml
<application> <message-bundle>customMessages</message-bundle> <!-- Rest of your stuff --> </application>
customMessages.properties file
javax.faces.component.UIInput.REQUIRED={0} is a required field.
Make sure customMessages.properties is in your classpath.
-
4. Re: problem with error message
arissonleal Nov 17, 2008 4:01 AM (in response to arissonleal)I forgot this simple detail {0}
thanks :)