I have a strange behaviour on a JSF update.
I have two SelectOneMenus and I want to update the second when the first changed. This doesn`t work:
<p:selectOneMenu id="som1" value="#{VBean.somVertrag}" converter="VConverter">
<p:ajax event="valueChange" update="som2" />
<f:selectItems value="#{VBean.VList}" var="v" itemValue="#{v}" itemLabel="#{v.VNr}" />
</p:selectOneMenu>
<p:selectOneMenu id="som2" value="#{VBean.somVertrag.VS}" converter="VSConverter">
<f:selectItems value="#{SDBean.vsList}" var="vs" itemValue="#{vs}" itemLabel="#{vs.vertragsstatus}" />
</p:selectOneMenu>
When I put the som2 Menu before the som1 then it works. I doesn′t know why :-(
<p:selectOneMenu id="som2" value="#{VBean.somVertrag.VS}" converter="VSConverter">
<f:selectItems value="#{SDBean.vsList}" var="vs" itemValue="#{vs}" itemLabel="#{vs.vertragsstatus}" />
</p:selectOneMenu>
<p:selectOneMenu id="som1" value="#{VBean.somVertrag}" converter="VConverter">
<p:ajax event="valueChange" update="som2" />
<f:selectItems value="#{VBean.VList}" var="v" itemValue="#{v}" itemLabel="#{v.VNr}" />
</p:selectOneMenu>
Can anyone explain me why solution 1 is not working?
question from:https://stackoverflow.com/questions/66064100/jsf-selectonemenu-not-updating