Hi,

> It sounds like Tapestry's OGN library is close to a drop-in replacement for
> my custom library, but I was wondering if there were any components for
> iterating directly over a JDBC Resultset? The data in this project lends
> itself to direct access (for some pages) and creating objects to
> encapsulate it all seems a bit of a waste.

The current Foreach component takes an Iterator (the most universal enumeration mechanism). I think it would be trivial to write an Iterator that wraps a ResultSet by invoking next() and returning the ResultSet itself every time (and possibly even closes the statement/connection when the end of the ResultSet is reached -- depends on what you need). The Foreach component can then be used, and you can obtain whatever data you need via OGNL simply and easily (e.g. "value.getInt(3)").

If you need more advanced features, I am currently working on a table model for the Table component in contrib that gets its data using SQL or another query mechanism with similar capabilities (which is what you might need, if I am not mistaken). That should be ready in a couple of days if no emergencies appear at the office. You will then get paging and sorting capabilities in a highly efficient manner with a minimum amount of effort.

As for EJBs, while the demo application (VLib) is EJB-based, a significant part of the tutorial (up to the Workbench) does not depend on EJBs, I believe.

Good luck with what you are doing.

-mb

 



Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos, & more
faith.yahoo.com

Reply via email to