1
您好我使用JSF數據表如下Primefaces數據表中選擇未選中的複選框行
<p:dataTable id="group"
styleClass="table table-striped table-bordered"
rowSelectMode="checkbox"
value="#{importIssueController.impIssueStatusArrList}"
selection="#{importIssueController.selectedIssues}"
paginator="true" rows="10"
paginatorTemplate="{CurrentPageReport} {FirstPageLink}
{PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="2,10,15" lazy="true" var="importIssue" rowKey="#{importIssue[0]}">
<p:column selectionMode="multiple"
disabledSelection="#{importIssue[6] == 'yes'}"
style="width:16px;text-align:center"/>
這裏有一排複選框是一些條件,用戶可以禁用啓用複選框選擇行。 我在這裏面臨的問題是,即使複選框被禁用,我點擊行並按提交行被選中。有什麼辦法可以解決這個問題嗎? 我使用Primefaces 3.5
什麼是importIssue [6]的數據類型?字符串還是布爾值? – lastresort
importIssue [6]是字符串類型 – David
您可以像這樣捕獲rowSelectEvent:http://www.kianworknotes.com/2014/10/how-to-disable-row-selection-in.html – lastresort