[英]Primefaces datatable: Unable to retrieve selected rows and selection get lost with pagination
[英]after primefaces filterby selected var get lost
用filterBy
過濾后,所選的var
實例會丟失。
<p:dataTable id="searchResults"
var="searchResult"
value="#{employeeController.searchResults}"
selectionMode="single"
selection="#{employeeController.selectedEmployee}"
rowKey="#{searchResult.id}">
<p:column headerText="Employee Name"
filterBy="#{searchResult.name}"
sortBy="#{searchResult.name}">
<h:outputText value="#{searchResult.name}"/>
</p:column>
</p:dataTable>
<p:commandButton actionListener="#{employeeController.editEmployee(searchResult)}"
icon="ui-icon-pencil"
title="Güncelle" ajax="true" update="@form">
我的事件未獲取選定的searchResult
實例,而是一個null
值
我解決了問題。 我只是想念filteredValue
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.