File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes i am facing some problem with <h:selectOneMenu> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "i am facing some problem with <h:selectOneMenu>" Watch "i am facing some problem with <h:selectOneMenu>" New topic
Author

i am facing some problem with <h:selectOneMenu>

sridhar chowdary avulapati
Greenhorn

Joined: Mar 10, 2008
Posts: 2
Hi Guys,

I am facing some problem with <h:selectOneMenu>

<h:selectOneMenu id="country" value="#{newMemberBean.selectedCountry}" required="true">
<f:selectItem itemLabel="Please Select One" itemvalue="" />
<f:selectItem itemLabel="USA" itemvalue="usa" />
<f:selectItem itemLabel="MEXICO" itemvalue="mexico" />
</h:selectOneMenu>

<h:inputText id="mobilePhoneNumber" value="#{newMemberBean.mobileNumber}" required="true">

<h:commandButton id="next" action="#{newMemberBean.next}">
<f:param name="stepNumber" value="1"/>
</h:commandButton>

1. Click on Command button Without selecting any fileds validations messages are coming.
2. When i select USA in selectOneMenu and click on command button mobilePhoneNumber is required message is comming.
3. When i select on Please Select One in selectOneMenu and click on command button validation message is not comming and old value (USA) is redirect in selectOneMenu.

Any idea on these issue ..............? please help me....................


Regards,
Sridhar Avulapati


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: i am facing some problem with <h:selectOneMenu>
 
It's not a secret anymore!