This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JSF and the fly likes ValueChangeEvent not changing value Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "ValueChangeEvent not changing value" Watch "ValueChangeEvent not changing value" New topic
Author

ValueChangeEvent not changing value

Steve Aye
Greenhorn

Joined: Mar 27, 2006
Posts: 2
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}"/>
</h:selectOneMenu>


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();
qsbb.setNameFilter(nameFilter);
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ValueChangeEvent not changing value
 
Similar Threads
Session scoped bean's listener invoked before request scoped bean's set method
component execution order
valueChangeListener not called.
Please Help : Problem getting submitted value for dynamic input text field
on change combo box not working.