Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ValueChangeEvent not changing value  RSS feed

Steve Aye
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a dropdown list on my JSP page that is bound to a valueChangeListener event in my backing bean. The problem is, when I select a value in my dropdown list, it doesn't populate this new selected value in the field. It simply defaults it back to the original value. What am I missing? The JSP code is as follows:

<h:selectOneMenu id="name_filter" value="#{qsSelectionBB.nameFilter}" onchange="submit()" valueChangeListener="#{qsSelectionBB.nameFilterListener}" tabindex="1" >
<f:selectItems value="#{codesManagerBB.questionSetNameSelectItemRay}"/>

and my backing bean has the following method:

public void nameFilterListener(ValueChangeEvent e) {
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
Map sessionMap = externalContext.getSessionMap();
QuestionSetSelectionBB qsbb = (QuestionSetSelectionBB)sessionMap.get("qsSelectionBB");
nameFilter = (Integer)e.getNewValue();
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!