Hi, since several people had a problem on how to use
a scrollable datamodel in the recent days, I refactored
a workable generic datamodel, which should work on all
orm solutions out of an existing project and dumped it into
the sourceforge sandbox http://www.sourceforge.net/projects/jsf-comp
The model basically can be used as is (if you find bugs please fix em)
and you only have to implemnt a rather straightforward query object
which only has to deliver, the total number of datasets and a single
page of data objects per request cycle.
The main difference of this one to other solutions is, that
it neither does use any callbacks to the rendering phase nor to the
page request phases.
The advantage is you dont have to care about those phases and you can
keep the session time to an absolute minimum of one method request.
The downside is, that lazy loading does not work that way, everything
displayed by the table has to be fetched within the cylcle, period.
If you are interested check it out, I also integrated
a small example using the existing scroller datamodel structure:
The files are:
net.sf.myfacessandbox.backend.* for the model related files
net.sf.myfacessandbox.common.FacesUtils for a small helper used by this
example
/WebRoot/ormdatamodelTest.jsp for the example itself
and the rest is in the web.xml and faces-config files (the used managed
beans and nav cases for the example.
I think this should give most people a small headstart on how to combine
the datamodel and the scroller together with paging.
other solutions which utilize the cycle listeners or page listeners may
follow in the next few weeks (depending on my time).