在下面的代码中,当我为 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>