• Post Reply Bookmark Topic Watch Topic
  • New Topic

h:selectOneMenu problem with bean actions  RSS feed

Adrian Enns
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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}"/>

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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!