It's not a secret anymore!*
The moose likes JSF and the fly likes Validation in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Validation in JSF" Watch "Validation in JSF" New topic
Author

Validation in JSF

sri pathi
Greenhorn

Joined: Jul 15, 2008
Posts: 28
Is there a way to override the default validation error message that comes with JSF other than writing custom validators?!
For eg. the below code displays "Validation Error: Value Required" as a validation messsage. I would like to use the same validator but change the error message. I'm using RAD 7


Please let me know if this is possible at all.

Thanks in advance!
Venkat Sadasivam
Ranch Hand

Joined: May 10, 2008
Posts: 139
Yes, you can.

Here is an example:
<h:inputText value=�#{bean.value}� requiredMessage=�#{appBundle.requiredMessage}� converterMessage=�#{appBundle.converterMessage}� validatorMessage=�#{appBundle.requiredMessage}�>


“Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ”<br>
-Martin Fowler
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Validation in JSF
 
Similar Threads
JSF Validation
<h:message /> Error message with JSF Code
which validator with "required"
JSF validation messages ... how to customize ?
Custom validation messages