You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Struts Newsgroup (@Basebeans.com)" <st...@basebeans.com> on 2002/07/04 12:25:01 UTC
Iterate throught an array
Subject: Iterate throught an array
From: =?ISO-8859-1?Q?Fr=E9d=E9ric_Houbie?=
===
Hi, I have a bean (named active) in session, this bean has 2 arrays,
hierarchyLevel and hierarchyLevelName,
I need to display a table with
hierarchyLevel[0]
hierarchyLevelName[0]
hierarchyLevel[1]
hierarchyLevelName[1]
hierarchyLevel[2]
hierarchyLevelName[2]
hierarchyLevel[3]
hierarchyLevelName[3]
hierarchyLevel[4]
hierarchyLevelName[4]
...
how can I do that ?
I'm trying this
<logic:iterate id="hierarchy" name="active" property="hierarchyLevel"
indexId="index">
<tr>
<td><%=index%></td>
<td><bean:write name="hierarchy" property="value" /></td>
<td><bean:write name="active" property="hierarchyLevelName(<%=
index %>)" /></td>
<td></td>
</tr>
</logic:iterate>
but I have an error
No getter method for property hierarchyLevelName() of bean active
my bean called active have a method active.getHierarchyLevelName(int count)
What's wrong ?
Fr�d�ric
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>