aspose file tools
The moose likes JSF and the fly likes How to display custom validation message for a drop down. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "How to display custom validation message for a drop down." Watch "How to display custom validation message for a drop down." New topic
Author

How to display custom validation message for a drop down.

Durga Krishna
Greenhorn

Joined: Apr 05, 2007
Posts: 28
Hi Friends,

I have a dropdown in my application.

I would like to do JSF validation for this dropdown.

If I give required="true", it is giving its own validation error message.

Instead I would like to display a custom error message like 'Please select the state.'

Please let me know how I can display a custom validation message.
Sumeet Singh Aryan
Ranch Hand

Joined: Jul 30, 2008
Posts: 43
It's very easy to implement. either right your own custom validator class or write the validator method in your bean and call it as a validator attribute in JSF tags. for more clarification follow the following link

http://java.dzone.com/articles/jsf-validation-tutorial-error


The woods are lovely, dark and deep, But I have promises to keep; And miles to go before I sleep, And miles to go before I sleep. - Robert Frost
Sweta Ann
Greenhorn

Joined: Feb 04, 2010
Posts: 8


See the section

How to use standard conversion and validation features in JSF in http://jsflessons.blogspot.com

It is clearly explained in it.



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to display custom validation message for a drop down.
 
Similar Threads
client side validation (message deleted I think)
Resolve this please
validation error message
How to resolve this issue
Validation in JSF