jsf 2 - Making AT-LEAST any one of Input Fields as Required in JSF Form -


i want make at-least 1 of filed required in form.

for example:

<h:form id="searchform">     <h:outputlabel value="user name:"/>     <h:inputtext value="#{searchbean.username}" id="user_name"/>      <h:outputlabel value="location:"/>     <h:inputtext value="#{searchbean.location}" id="location"/>      <h:outputlabel value="date of birth"/>     <p:calendar value="#{searchbean.dob}" id="dob"/>      <p:commandbutton value="search"/> </h:form> 

in above form has there 3 input fields:

  • user_name
  • location
  • dob

and searches based on given criteria.
want make user enter at-least one of above fields required make search happen.
how use required validation above scenario work.
please suggest wok around!


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -