One thing I noticed is that the backing bean's value method for var2 (whose value is set in var1ValueChangeListener) is not being called when re-rendering the page.  That is, to set the selected item of the SessionBean.var2Items() .  I have tried this with and without immediate="true".
 
How should you do this?  I think it should be very simple.
 
 
<form>

<h:selectOneMenu id="var1Menu" value="#{SessionBean.var1}"

valueChangeListener="#{SessionBean.var1ValueChangeListener }">
    <f:selectItems value="#{SessionBean.var1Items}" />
</h:selectOneMenu>

<h:selectOneMenu id="var2Menu" value="#{SessionBean.var2}"

valueChangeListener="#{SessionBean.var2ValueChangeListener}">
    <f:selectItems value="#{SessionBean.var2Items}" />
</h:selectOneMenu>

</form>

Reply via email to