-
1. Re: rich:dataTable and rich:dataScroller. How to ?
jhuska Jun 6, 2013 8:54 AM (in response to ikos2201)Hi John,
thank you for your feedback and the effort you have started!
I have created an issue https://issues.jboss.org/browse/RF-13050 for fixing the bean source codes references, which are missing in some demos.
My another suggestion is to take a look at http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=dataTable&sample=arrangeableModel&skin=blueSky
There is used JPADataModel, which is an abstract implementation of custom ExtendedDataModel. It should help you with the db pagination, sorting and filtering implementation.
The complete source of the showcase can be helpfull as well. You can find it here:
https://github.com/richfaces4/showcase
What about creating a blog with some information how you will succeed in making the pagination work ? RichFaces opensource community would be thankfull.
-
2. Re: rich:dataTable and rich:dataScroller. How to ?
ikos2201 Jun 14, 2013 5:00 PM (in response to jhuska)1 of 1 people found this helpfulI think your way is a little bit complicated. So I've found my own solution.
I have created my own analogue of yours dataScroller (very simple. it looks like << 1 2 3 4 ... >> (each of these numbers are a4j:commandLink) . but I can add any styles if I need). And I'm using this "paging" with yours dataTable. If I have 100 000 records : ) in DB and I want to diplay 15 per page , for example, I get the first 15 records and the list of these values I put in dataTable :
<rich:dataTable id="myTable" value="#{bean.listOfRecords}">....
If I want to get and display the next 15 I click on page two << 1 2 3 .. >> and my action listener that corresponds to the link I've clicked on, retrieve the next portion of data from DB and update listOfRecords (fill in this list with new records) and rerender dataTable : <a4j:commandLink value="2" ... render="myTable" /> I just rerender dataTable with each click on some page.