primefaces 数据 table 全局过滤器正在重新排序元素

prime faces data table global filter is reordering the elements

我正在使用 primefaces 5.2。我使用全局过滤器。每行还有一列用于选择操作。当过滤打开并且用户过滤几行时,我注意到,当我单击该行上的按钮时,返回的行与所选行不同。所选行对应于未过滤状态之前的行。 Primefaces/JSF 为每一行分配一个 id "datatable:row_number:element"。 row_number 随着过滤的进行而更新,但是当我对过滤的行调用操作时,选择的行 row_number 是选择之前的行。请参阅下面的代码示例

 <p:dataTable value="#{workerRotationPage.callbackList}"
              filteredValue="#{workerRotationPage.filteredList}"
              var="callback"
              widgetVar="callbackTable"
              styleClass="custom-datatable waitingCall"
              paginator="true"
              paginatorPosition="top"
              paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
              rowsPerPageTemplate="10,20,50"
              selection="#{workerRotationPage.callbackWorker}"
              selectionMode="single"
              rowKey="#{callback.id}"
              rows="10">
....
 <p:commandButton 
  icon="fa fa-undo"
  value="Unassign"
  action="#{workerRotationPage.execute('unassignCallbackWorker',callback)}"
  title="Unassign Worker #{callback.worker.person.formattedFirstLastName}"
  update=":mainForm:rotationTableId :mainForm:naworkerTableId :mainForm:assignPanelId"
 />

传递给 execute 的对象不是正确的回调对象,它仍然引用旧的未过滤列表中相同位置的回调对象。

看起来这是一个错误。好像没有解释,或者没有理由,我看到它报告了很多次,没有任何解决方案。我没有时间研究它,但我会给 link 感兴趣的人 Bug Report