primefaces selectOneRadio更改面板可见

时间:2015-08-04 12:13:43

标签: panel visible selectoneradio

我有一个带有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>

0 个答案:

没有答案