嗨我需要根据单选按钮选择使我的数据表行可选和不可选。数据表上方有两个单选按钮,一个用于使所有表格行无法选择,另一个按钮Continue
不可见,另一个用于使所有行可选,以及按钮Continue
可见请告诉我方式< / p>
<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>
答案 0 :(得分:0)
在你的支持bean中添加一个布尔属性,在单选按钮的监听器中只需将其切换到true/false
并添加attributte disabledSelection,它将具有bean boolean属性的值。点击单选按钮,您应该更新datatable
dupTable