Patrick Refondini wrote:
werner wrote:
Dear List,
I'm looking for a solution to create a repeater with paging support.
The repeater is usually connected to some database via OJB or
Hibernate. I think that this is a common problem, so I hope that
somebody out there has already done this before ;-)
In short the problems I want to solve are:
- create a DAO that returns only the records that should be displayed
(that's not easy with OJB. looks like there is no real paging
support in OJB.
I don't know Hibernate.)
I did some paging tests with Hibernate using the Query interface which
might be what you are looking for. Looks like:
Query query = session.getNamedQuery(namedQuery);
query.setFirstResult(start);
query.setMaxResults(max);
return query.list();
Just a hint as w're not on a Hibernate list here ;-)
Good to know it works in Hibernate. In OJB it does not. FAQ says 'There
is no *paging* support in *OJB. *OJB is concerned with Object/Relational
mapping and not with application specific presentation details like
presenting a scrollable page of items'. :-/ My solution is to pass the
Query directly to the database (postgreSQL).
the DAO should also return the number of overall records to be able to
calculate the number of pages
- create a widget that displays the links to the pages (no idea how
to do that)
Any suggestions ?
Werner
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]