This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes SelectOneMenu Validation Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "SelectOneMenu Validation" Watch "SelectOneMenu Validation" New topic
Author

SelectOneMenu Validation

Mal Tec
Greenhorn

Joined: Oct 06, 2010
Posts: 2
hi

i need to validate the selectoneMenu in JSF. I'm using



using properties for error msg:


i get UIInput.REQUIRED's error: Please enter a value for this field on selecting option Select with value null.. I want to get special error for UISelect like...

or need to fire it thorugh Invalid

How it can be done? Or if any tother alternative available.
suresh dasari
Ranch Hand

Joined: Oct 05, 2009
Posts: 120

Hi,

1) if you are allowed to use tomhawk library then correct your code as follows



if you want you can pull the summary message from property file and change as you like

2) write a custom validator and divert the flow to your custom validator and write the logic in java class.

3) you can write a listener and write the appropriate logic before validation phase.



Sun Certified Java Programmer with 93 percent
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: SelectOneMenu Validation
 
Similar Threads
javax.xml.rpc.soap.SOAPFaultException: System.Web.Services.Protocols.SoapException:
Selecting option in second selectOneMenu not setting property value
CSS for individual selectItem tag
Validating a selectOneMenu
Validation Error on SelectOneMenu