0

I have 3 selectOneMenu, I am using the AJAX listener component, and it work when is used on the first select, but when I call it on the second dont work, there is my xhtml code:

<p:outputLabel for="region" value="REGION: " />
            <p:selectOneMenu id="region" value="#{bibliotecaBean.itemRegion}" widgetVar="wRegion">
                <p:ajax listener="#{bibliotecaBean.cambiaRegion}" update="provincia" />
                <f:selectItem itemLabel="Seleccione una región..." itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{bibliotecaBean.comboRegion}" />
            </p:selectOneMenu>
            <p:outputLabel for="provincia" value="PROVINCIA: " />
            <p:selectOneMenu id="provincia" value="#{bibliotecaBean.itemProvincia}" widgetVar="wProvincia">
                <p:ajax listener="#{bibliotecaBean.cambiaProvincia}" update="distrito" />
                <f:selectItem itemLabel="Seleccione una provincia..." itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{bibliotecaBean.comboProvincia}" />
            </p:selectOneMenu>
            <p:outputLabel for="distrito" value="DISTRITO: " />
            <p:selectOneMenu id="distrito" value="#{bibliotecaBean.itemDistrito}" widgetVar="wDistrito">
                <f:selectItem itemLabel="Seleccione un distrito..." itemValue="" noSelectionOption="true" />
                <f:selectItems value="#{bibliotecaBean.comboDistrito}" />
            </p:selectOneMenu>

I try it using the debugger to see if it enter to the method "cambiaProvincia", and it dont enter, but when i call the method "cambiaRegion" it work.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555

0 Answers0