简体   繁体   中英

after primefaces filterby selected var get lost

After filtering with filterBy selected var instance get lost.

<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

I solved the problem. I was just missing filteredValue .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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