cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <o...@wlkp.org>
Subject Handling Iterators in JXTG
Date Wed, 21 Apr 2004 19:30:34 GMT
Am I wrong or there is no way to handle iterators in JXTG? One can use forEach
for collections but I sometimes would like to pass and iterator to a view to
process larger result sets.

In Hibernate you can:

var list = session.createQuery("from LargeTable").list() which creates a whole
collection at once but you can also do:

var iterator = session.createQuery("from LargeTable").iterate() which makes
generating view much less memory consuming.

Maybe something like:
<jx:while test="${it.hasNext()}">
	<jx:set car="current" value=${it.next()}/>
	${current.value}<br/>
</jx:while>

The syntax is ugly I know but after a little tuning it would be very useful.
	lg
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/       ouzo@wlkp.org           _\\()//_
         .'/()\'.     Phone: +48(501)720812     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


Mime
View raw message