I have implemented the following selectOneListBox in jsf
<h:selectOneListbox value="#{category.selectedCategoryId}" onchange="submit()"
valueChangeListener="#{category.changeFunction}">
<f:selectItems value="#{category.categoryValues}" var="cat"
itemLabel="#{cat.categoryName}" itemValue="#{cat.categoryId}" />
</h:selectOneListbox>
Following is the code for the change listener
public void changeFunction(ValueChangeEvent e) {
System.out.println(e.getNewValue().toString());
}
As you can see, I can only access itemValue of the selected item in the onchange function.I want to access the object of which itemValue is only a part. How is this possible?