  | |  | Struts <logic iterate > | Struts <logic iterate > 2003-10-06 - By Tatu Saloranta
Back On Monday 06 October 2003 08:35, Lars Hammer wrote: ... > to iterate the Hits. I thought that Hits was an array of pointers to docs,
^^^ Actually, Hits contains a Vector (could be an array as well), but is not a Collection itself (one can not extend array classes in Java, so no Object besides basic arrays can be arrays or treates as one). Hits be made a Collection, though. In fact, I think it would be a reasonable thing to do, to make Hits be a simple Collection (or perhaps List since it is an ordered collection). You could file an RFE for this, or better yet, implement it. :-) I'd think including such patch for Lucene would make sense as well.
> Has anyone any experience in using the <logic:iterate> tag or is it > necessary to write a custom JSP tag which does the iteration??
No, it should be enough to write a simple wrapper that implements Collection, and accesses Hits instance via next() method.
-+ Tatu +-
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: lucene-user-unsubscribe@(protected) For additional commands, e-mail: lucene-user-help@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |