我有一个带有 selectOneRadio 的 xhtml 页面,我希望在更改 selectOneRadio 时面板可见更改,在单击按钮之前此工作,单击此行为后不起作用。
<!-- My select One Radio-->
<p:panelGrid columns="1" style="margin-bottom:10px" cellpadding="5" id="options" >
<p:selectOneRadio id="console" value="#{bJspReportWorkControl._selectedType}" >
<f:selectItems value="#{bJspReportWorkControl.choise2Type}"></f:selectItems>
<p:ajax listener="#{bJspReportWorkControl.changeSelectionListener}" update="typeSelection , groupSelections , userSelection" />
<f:ajax render="typeSelection groupSelections userSelection" />
</p:selectOneRadio>
<p:panel id="typeSelection" widgetVar="typeSelectionWV" closable="true" toggleable="true" visible="#{bJspReportWorkControl.hasTypeSelected}"
style="width:250px; height:250px; text-align:left" >
<td align="left"><h:outputLabel for="selectType"
value="Selecione tipo de Utilizador" style="text-align:left;" />
</td>
<td align="center">
<p:selectManyMenu id="selectType" value="#{bJspReportWorkControl._selectedUserType}"
style="width:150px; height:200px; text-align:left" >
<f:selectItems value="#{bJspReportWorkControl.choise2UserType}"/>
</p:selectManyMenu>
</td>
</p:panel>
<p:panel id="groupSelections" widgetVar="groupSelectionsWV" closable="true" toggleable="true" visible="#{bJspReportWorkControl.hasGroupSeleced}"
style="width:350px; height:250px;text-align: left" >
<td align="left">
<h:outputLabel for="selectedGroup" value="Selecione o(s) Grupo(s) " style="text-align:left" />
</td>
<td align="center">
<p:selectManyMenu id="selectedGroup" value="#{bJspReportWorkControl._groupSelected}"
style="width:250px; height:200px;text-align: left" >
<f:selectItems value="#{bJspReportWorkControl._groupsToShow}" />
</p:selectManyMenu>
</td>
</p:panel>
<tr>
<td>
<p:commandButton id="calculate"
value="Calcular" action="#{bJspReportWorkControl.submit}"
update="msg result" >
</p:commandButton>
</td>
</tr>