On my form I have 3 selectOneMenu's.
category
subCategory
subSubCategory
When category is changed, I call changeCategory(ValueChangeEvent event). When subCategory is changed I call changeSubCategory(ValueChangeEvent event).
I have noticed that when changeCategory is called, changeSubCategory is also called. I know why this happens. That is fine. However, afterwhich, I change the subCategory select and changeSubCategory is not called again. Any suggestions?
<t:outputText value="Category" />
<t:selectOneMenu id="catSelect" value="#{ArticleListBean.category}" valueChangeListener="#{
ArticleListBean.changeCategory}">
<f:selectItem itemLabel="ALL" itemValue="0" />
<f:selectItems value="#{ArticleListBean.catList
}" />
</t:selectOneMenu>
<t:outputText value="Sub-category" />
<t:selectOneMenu id="subCatSelect" value="#{
ArticleListBean.subCategory}" valueChangeListener="#{ArticleListBean.changeSubCategory}">
<f:selectItem itemLabel="ALL" itemValue="0" />
<f:selectItems value="#{
ArticleListBean.subCatList}" />
</t:selectOneMenu>
public void changeCategory(ValueChangeEvent event)
{
setCategory((Integer)event.getNewValue());
}
public void changeSubCategory(ValueChangeEvent event)
{
setSubCategory((Integer)event.getNewValue());
System.out.println("################### " + getSubCategory());
}
- valueChangeListener method called only once Gregg Bolinger
- Re: valueChangeListener method called only once Rogerio Pereira
- Re: valueChangeListener method called only once Gregg Bolinger
- Re: valueChangeListener method called only on... Gregg Bolinger
- Re: valueChangeListener method called onl... Gregg Bolinger