簡體   English   中英

在primefaces filterby選擇的var之后迷路

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

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM