Another possibility would be to use a lazy-loading collection implementation that takes an iterator as a constructor and doesn't traverse until it needs to. If the first and only call against it is to Collection#iterator and it returns a wrapper around the initial iterator you can get the same behavior.
If this is all you need it for you could only implement this collection wrapper and throw UnsupportedOperationExceptions for all other operations (is it bad if I have "throw new UnsupportedOperationException("");" as a live template in IDEA? ;-).
-Brian
On Jan 20, 2004, at 12:49 PM, mirko wrote:
Antonio Gallardo wrote:
mirko dijo:I forgot to ask: if I return a query results' iteratorThe iterator no, but a bean collection yes. We use OJB to develop DB
(broker.getIteratorByQuery(query)), will I be able to pass it as a
parameter to flows's view and then iterate it in my JXTemplate? I've a
feeling that it won't work :(
application with flow+woody and jxtemplate and this is a paradise compared
with other approach.
Yes, I know I can pass collection of objects. But I'm afraid of memory usage if the collections are huge. :) But I think I'll do as you said, in the future maybe a iterator will be able to be passed :)
BTW Flow is the best new thing in Cocoon and the Woody becoming second one. If I only get OJB (or other) working with it I will be very happy.
What else can you ask? ;-)
OK, but off topic :) A question about encoding in JXTransfomer: If I pass a string with national characters (ISO-8869-2) from flow to the view (JXTemplate) these characters do not show up correctly. Is there any issues?
Regards, mirek
--------------------------------------------------------------------- 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]