Inandjo Taurel writes: > hi, > > am trying to write a pager in velocity screens so as to have my screens > displays only a defined number of rows on the screen, and then be able to go You can either use Criteria objects to set a limit and offset for the rows you are returning, and make two queries; one for the actual data and one for the number of total rows. Then you can do some math given how many rows you want to display on a page and generate links that have the offset and limit as parameters.
A better way may be the org.apache.torque.util.LargeSelect object (http://db.apache.org/torque/apidocs/org/apache/torque/util/LargeSelect.html), although I have not used it... the page above shows a bit of Velocity code for getting some records out of a LargeSelect object. The LargeSelect object would itself be constructed in a Screen class, after testing for it's existance in the Session or User object. > to the next set of result set and the previous, just by clicking the link. > How can i achieve that in the context of velocity? > > PS: am using TDK 2.1 with jdk1.3.1.. > > _________________________________________________________________ > Add photos to your messages with MSN 8. Get 2 months FREE*. > http://join.msn.com/?page=features/featuredemail > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Matt Hughes + [EMAIL PROTECTED] + http://susurrous.net/ + "Were there monkeys? Some terrifying space monkeys maybe got loose?" --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
