1

Is there some easy way or maybe a ready component to use lazy-loading in dataTable by Primefaces but without pagination (also not the standard one) ?

I need following feature: when page is loaded dataTable contains only first 10 out of 100 rows (fast response time). The rest of rows is automatically loaded into the dataTable but user can already work with first portion of data.

Thanks for any advice. In worst case I will have to implement similar behavior by myself, but maybe someone already have some experience.

1 Answer 1

3

The feature you're looking for comes very close with "live scrolling". It does load in the background, but only when the bottom is reached in scrolling. See the "DataTable - Scrolling" showcase page.

Here's an extract of relevance from the showcase example, showing the attributes you need:

<p:dataTable var="car" value="#{tableBean.carsLarge}" scrollRows="20"  
    scrollable="true" liveScroll="true" scrollHeight="150" id="dataTable4"> 

However, to achieve exactly your functional reqirement, you'd probably need to homebrew or post a new feature request to PrimeFaces guys.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you very much! It's almost exactly what I'm looking for. Unfortunately I have overlooked this showcase.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.