在我的jsf项目中,我正在渲染啊:panelgroup从下拉列表中选择一个选项,但是在加载页面后,它将在选择下拉选项时仅向面板组渲染三次我的意思是如果我选择选项一,那么panelgroup one将渲染并打开选择第二个选项相应的面板组将呈现。面板组将仅针对任何三个下拉选项选项进行渲染,但在三个渲染组不会更改后,它将与最后一个组渲染的内容保持一致。
<div class="col-sm-9">
<h:selectOneMenu id="undrGrp"
styleClass="col-xs-10 col-sm-5 chosen-select"
value="#{pc_accountHeadCreation.accountHeadVO.accountGroup.accGrpId}">
<f:selectItems value="#{pc_accountHeadCreation.accountGroupList}" />
<p:ajax event="change"
update="batoUpdate,ba1,ba2,sdtoUpdate,sd1,sd2,sctoUpdate,sc1,sc2"
listener="#{pc_accountHeadCreation.setaccGrpAddFlag()}" />
</h:selectOneMenu>
</div>
<h:panelGroup layout="block" id="sc1"
rendered="#pc_accountHeadCreation.accountHeadVO.accountGroup.accGrpFieldsApplicable==1}">
<!-- panelgroup components -->
</h:panelGroup>
<h:panelGroup layout="block" id="sc1"
rendered="#pc_accountHeadCreation.accountHeadVO.accountGroup.accGrpFieldsApplicable==2}">
<!-- panelgroup components -->
</h:panelGroup>
<h:panelGroup layout="block" id="sc1"
rendered="#pc_accountHeadCreation.accountHeadVO.accountGroup.accGrpFieldsApplicable==3}">
<!-- panelgroup components -->
</h:panelGroup>