[英]after primefaces filterby selected var get lost
After filtering with filterBy
selected var
instance 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">
my event does not get the selected searchResult
instance but instead a null
value 我的事件未获取选定的searchResult
实例,而是一个null
值
I solved the problem. 我解决了问题。 I was just missing filteredValue
. 我只是想念filteredValue
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.