wood burning stoves 2.0*
The moose likes JSF and the fly likes Validating a selectOneMenu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Validating a selectOneMenu" Watch "Validating a selectOneMenu" New topic

Validating a selectOneMenu

Steve Watson
Ranch Hand

Joined: Apr 08, 2003
Posts: 38
I have a selectOneMenu input with several selectItem tags in it. The first selectItem, the default just displays "Please Select". I want to validate that one of the other values is selected - i.e. not this first one. How can I do that? Code example follows:

<h:selectOneMenu binding="#{backing_appointmentRequest.country}"
<f:selectItem itemLabel="Please Select" itemValue="please_select"
<f:selectItem itemLabel="United States" itemValue="united_states"
<f:selectItem itemLabel="Canada" itemValue="canada"
It is sorta covered in the JavaRanch Style Guide.
subject: Validating a selectOneMenu
Similar Threads
Navigation using valueChangeListener
i am facing some problem with <h:selectOneMenu>
can anybody help ??
Problem with loading the data after Value Change Listener on selectonemenu
A Problem with events