File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validating a selectOneMenu

 
Steve Watson
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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}"
id="country">
<f:selectItem itemLabel="Please Select" itemValue="please_select"
binding="#{backing_appointmentRequest.please_selecect}"
id="please_selecect"/>
<f:selectItem itemLabel="United States" itemValue="united_states"
binding="#{backing_appointmentRequest.united_states}"
id="united_states"/>
<f:selectItem itemLabel="Canada" itemValue="canada"
binding="#{backing_appointmentRequest.canada}"
id="canada"/>
</h:selectOneMenu>
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic