Jsf 2 单击单选按钮,我必须使datatable行在jsf中可选择和不可选择
嗨,我需要根据单选按钮选择使我的数据表行可选择和不可选择。数据表上方有两个单选按钮,一个用于使所有表行都不可选择,另一个用于使所有行都可选择以及按钮Jsf 2 单击单选按钮,我必须使datatable行在jsf中可选择和不可选择,jsf-2,primefaces,Jsf 2,Primefaces,嗨,我需要根据单选按钮选择使我的数据表行可选择和不可选择。数据表上方有两个单选按钮,一个用于使所有表行都不可选择,另一个用于使所有行都可选择以及按钮继续可见。请告诉我怎么走 <p:dialog id="duplicatePatientDlgId" header="Duplicate Patients" resizable="false" widgetVar="duplicatePatientDlg" modal="true" height="
继续
可见。请告诉我怎么走
<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>
可能重复
建立
至少有一个可能的匹配项
在您的数据库中找到了该患者的。
请选择:
在单选按钮的侦听器中将布尔属性添加到支持bean,只需将其切换到true/false
,然后添加Attribute disabledSelection,它将具有bean布尔属性中的值。单击单选按钮,您应该更新数据表,谢谢您的回复,但属性禁用选择不起作用。如果您知道使用哪个版本的primefaces,请告诉我另一种方法?