0

嗨,我需要根据单选按钮选择使我的数据表行可选择和不可选择。数据表上方有两个单选按钮,一个用于使所有表行不可选,一个按钮Continue不可见,另一个用于使所有行可选以及按钮Continue可见,请告诉我方法

<p:dialog id="duplicatePatientDlgId" header="Duplicate Patients"
            resizable="false" widgetVar="duplicatePatientDlg" modal="true"
            height="362" width="502" styleClass="popupheader"
            closeOnEscape="true">
            <div style="margin: 5px;">
                <div class="commonContainer" style="margin-bottom: 5px;">
                    <div class="Quick-ebill-SubHeader-01">Possible Duplicates
                        Found</div>
                    <div class="Duplicate-Patient-Dialogstyle">
                        <h5 style="margin-top: 3px;">At least one possible match
                            for this patient was found in your database.</h5>
                        <h5>Please select:</h5>
                        <div id="duplicatePatientRadioButtonPanel">
                            <h:selectOneRadio id="selectRadio" value="true" tabindex="1">
                                <f:selectItem itemLabel="Create new patient record"></f:selectItem>
                                <f:selectItem
                                    itemLabel="Create Quick eBill for existing patient">
                                    <p:ajax event=""></p:ajax>
                                </f:selectItem>
                            </h:selectOneRadio>
                        </div>
                    </div>
                </div>
                <p:panel styleClass="popuppanel01">
                    <p:spacer height="10"></p:spacer>
                    <p:dataTable var="duplicatePatient" id="dupTable"
                        value="#{quickBillNewPatient.duplicateList}" scrollable="true"
                        scrollHeight="130">
                        <p:column headerText="Name" width="150">
                            <h:outputText
                                value="#{duplicatePatient.firstname}  #{duplicatePatient.lastname}"></h:outputText>
                        </p:column>
                        <p:column headerText="Date of Birth" width="150">
                            <h:outputText value="#{duplicatePatient.dateOfBirth}"></h:outputText>
                        </p:column>
                        <p:column rendered="#{quickBillNewPatient.defaultLabel}"
                            headerText="#{quickBillNewPatient.defaultIdentifierLabel}">

                        </p:column>

                    </p:dataTable>
                </p:panel>
                <div styleClass="Header_Inner_commonContainer">
                    <h:panelGroup layout="block" styleClass="buttonpopup floatLeft">
                        <span> <p:commandButton id="continueSave"
                                value="Continue Save"
                                actionListener="#{quickBillNewPatient.savePatient(false)}"
                                oncomplete="duplicatePatientDlg.hide()" />
                        </span>
                    </h:panelGroup>
                </div>
            </div>

        </p:dialog>
4

1 回答 1

0

将布尔属性添加到您的支持 bean 中,单选按钮的侦听器只需将其切换到true/false并添加属性 disabledSelection ,该属性将具有来自您的 bean 布尔属性的值。通过单击单选按钮,您应该更新datatable dupTable

于 2013-10-15T06:46:00.467 回答