Dynamic pagination rich: dataTable / rich: datascroller with large datasets

I currently have a Richfaces data table bound to a bean database that contains all the data. This table is bound to the Richfaces data scroller.

Users can then enter a scroll between the data.

There is also a text box that dynamically updates the results of the data table displayed on them based on the text they enter into it. It rewrites dataTable and datascroller in the keyUp event.

The bean subsystem is connected with the fact that it first extracts all the data from several database tables. This data is retrieved when the user sends a regular mail request to the server and the results of this request, which are used for all subsequent Ajax-related requests (the results are saved as a list of objects, database queries are no longer executed).

My problem is that the data set can be huge from time to time, 100,000 from records. This leads to the fact that the initial request to the server takes a very long time.

A possible solution that I'm looking at is to drop only a small amount of data in a single thread to request the initial user port. This data can then be displayed in the data table, while the main thread runs in the background, pulling most of the data back.

Is it possible? Is it possible to update my datatable / datascoller as the main thread discards new data? Would it be hard?

The optimization of the database and queries was considered, so there can be no improvement of any value here.

Thanks in advance (I know this is probably not an easy question to answer)

+4
source share
2 answers

Add a SerializableDataModel to store your data for sorting and pagination .

+2
source

It looks like you need exactly what the Query Application Framework Object Provides .

If you do not want to use Seam, you can either view the source and copy how they do it, and just steal the idea.

Basically what you need to do is get a given set of results for each click by the user next, previous, first, last etc

+2
source

Source: https://habr.com/ru/post/1338081/


All Articles