0

在下面的代码中,当我为 panelGrid 定义属性时layout="grid",“periodo Letivo”的 ajax 事件不起作用。它应该加载“cadeira”组件。如果我删除布局属性,它工作正常,但我失去了响应能力。

如果有人可以帮助我,谢谢。

<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>
4

1 回答 1

0

我用这个代替<p:ajax event="change" update="cadeira" process="periodoLetivo" />了这个问题<f:ajax event="change" render="cadeira"></f:ajax>

于 2016-03-10T20:25:20.633 回答