struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bhattad, Nilesh " <>
Subject How do I iterate thro multidimensional collection ?
Date Wed, 19 Jun 2002 22:36:53 GMT

I have an Object called as DataStore which is nothing but a LinkedList of
So it carries a complete multidimensional table. In short, it is somewhat
similar to java.sql.RowSet
Now I want to iterate through DataStore using <logic:iterate> tag in order
to paint my HTML Table data.

How do I write code something like this :

	<logic:iterate id="row" name="ds">
			<td><bean:write name="fname"></td>
			<td><bean:write name="lname"></td>
			<td><bean:write name="age"></td>
			<td><bean:write name="profession"></td>

Assume that I have a DataStore instance "ds" in PageContext. says that
<logic:iterate> needs to be enhanced or a new tag needs to be provided to
iterate over multiple collections in parallel. But I'm not sure whether the
problem is resolved in Struts 1.1b version or not. It seems like the
IterateTag object works only on Collection, Array, Map or Enumeration.

I have two options in order to solve the above problem.
1. Write a new tag extending from IterateTag which will loop through
2. Create multiple collection objects for multiple columns... (a very dumb
idea :-) )

Please let me know if someone had come across the similar situation and have
any solution on it.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message