0

In the code bellow, when I define the attribute layout="grid" for panelGrid, the ajax event of "periodo Letivo" doesn't work. It should load "cadeira" component. If I remove the layout attribute, It works fine, but I lost the responsiveness.

If someone can help me, thanks.

<p:panelGrid columns="2" layout="grid" style="border:0px !important; background:none;" styleClass="ui-panelgrid-blank ui-fluid">
    <p:outputLabel for="periodoLetivo" value="Período letivo" />
    <p:selectOneMenu id="periodoLetivo"
        value="#{viewForm.periodoLetivo}"
        converter="#{genericConverter}" immediate="true"
        required="true">

        <f:selectItem itemLabel="[-SELECIONE-]"
            noSelectionOption="true" />
        <f:selectItems value="#{periodosLetivos}" var="periodoLetivo"
            itemLabel="#{periodoLetivo.nome}" itemValue="#{periodoLetivo}" />
        <p:ajax event="change" update="cadeira" process="periodoLetivo" />
    </p:selectOneMenu>

    <p:outputLabel for="cadeira" value="Disciplina" />
    <p:selectOneMenu id="cadeira" value="#{viewForm.cadeira}"
        converter="#{genericConverter}" required="true">
        <f:selectItem itemLabel="[-SELECIONE-]"
            noSelectionOption="true" />
        <f:selectItems value="#{viewForm.cadeiras}" />
    </p:selectOneMenu>
</p:panelGrid>
Kukeltje
  • 12,223
  • 4
  • 24
  • 47

1 Answers1

0

I solved this issue replacing <p:ajax event="change" update="cadeira" process="periodoLetivo" /> by this <f:ajax event="change" render="cadeira"></f:ajax>.