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 h:selectOneMenu problem with bean actions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "h:selectOneMenu problem with bean actions" Watch "h:selectOneMenu problem with bean actions" New topic
Author

h:selectOneMenu problem with bean actions

Adrian Enns
Ranch Hand

Joined: Aug 11, 2004
Posts: 48
I have JSP/JSF page where I am displaying multiple fields, some of them are of the h:selectOneMenu type. I have three buttons that perform some actions in a managed when I click on them. My problem is that when I display a h:selectOneMenu component, the buttons that trigger the managed bean actions don't work. If I comment out the h:selectOneMenu components, then the baen actions work...? Any ideas.

An example of one of my h:selectOneMenu is:

<h:selectOneMenu id="schoolType" value="#{EducationController.schoolType}">
<f:selectItems value="#{EducationController.schoolTypeArray}"/>
</h:selectOneMenu>

In my EducationController bean, I have methods called getSchoolType() and setSchoolType() (String methods) to do the binding. I have method called getSchoolTypeArray() that returns an array of SelectItem...

I have no idea what the problem is. The h:selectOneMenu renders, but messes up the actions.. Any ideas?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: h:selectOneMenu problem with bean actions