简体   繁体   English

在primefaces filterby选择的var之后迷路

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM