簡體   English   中英

Primefaces Datable liveScroll + lazy loading - filter not working

[英]Primefaces Datable liveScroll + lazy loading - filter not working

Using PrimeFaces 5.0.

My datatable uses lazy loading and live scrolling and I try to filter both fields:

<p:dataTable id="eventsTable" value="#{eventController.eventModel}" var="event" lazy="true"
   scrollRows="100" liveScroll="true" scrollable="true" scrollHeight="500">
   <p:column headerText="EID" filterBy="#{enent.eid}">
      <h:outputText value="#{event.eid}" />
   </p:column>
   <p:column headerText="Type" filterBy="#{event.type}">
      <h:outputText value="#{event.type}" />
   </p:column>
</p:dataTable>

The initial load retrieves data correctly, and live scrolling seems to work fine.

But when I try to filter one of the fields the datatable is completely emptied (It does not even show the "No records found" message). When I debug I can see that my queries are executed correctly and return data.

Also, If I switch using paging instead of liveScroll, pages are lazy loaded correctly and filters also work.

Any thoughts?

You must set the rows attribute of the datatable.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

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