The "source" parameter of a grid can either be a GridDataSource or a Collection. I think it will be easiest to extend java.util.AbstractCollection and implement the size() and iterator() methods based on two jdbc queries (one for the size, one for the result set).
http://docs.oracle.com/javase/6/docs/api/java/util/AbstractCollection.html The other option is to implement GridDataSource which has the benefit of supporting paging. Tapestry has built in implementations for hibernate and JPA that you can use as a reference. Note that java.sql.Statement has a setMaxRows() and java.sql.ResultSet has a absolute(int row) to set the cursor position. http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/grid/GridDataSource.html http://tapestry.apache.org/tapestry5/apidocs/src-html/org/apache/tapestry5/hibernate/HibernateGridDataSource.html http://tapestry.apache.org/tapestry5/apidocs/src-html/org/apache/tapestry5/jpa/JpaGridDataSource.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/loop-components-that-use-result-sets-tp5718831p5718834.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
