logic:iterate in Struts

I've such code:

<logic:iterate id="item" name="DeleteActionBean" property="personsList">

<tr>

<td>// </td>

<td>// </td>

</tr>

</logic:iterate>

There personsList - is a collection (ArrayList) of objects (of my class). So to output an element of collection I should write${item}, but element is an object, so I want to get access to his methods. How i can do this?

[608 byte] By [SkyStara] at [2007-11-26 22:50:34]
# 1

Vector v = new Vector();

for(int i=0;i<array length>; i++){ // to set different values

FileObj bean = new FileObj();

bean.setFileName(<file name>);

bean.setFileSize(<file size>);

bean.setModifiedDate(<modified name>);

bean.setFilePath(<file path>);

v.add(bean);

}

add the bean to a vector and set the vector in a session

<logic:iterate id="results" name="vectorObj">

<bean:write name="results" property="fileName" />

<bean:write name="results" property="fileSize" />

<bean:write name="results" property="modifiedDate" />

<bean:write name="results" property="filePath" />

</logic:iterate>

skp71a at 2007-7-10 12:11:52 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Ok, thanx ) For example, i have <bean:write name="results" property="id" />

and this code prints id, but if i want to use this id in other property, for example <html:submit>:<html:submit property="<bean:write name="results" property="id" />" value="Delete"/>

. Of course such code is wrong, so how i can do this?

SkyStara at 2007-7-10 12:11:52 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
yes u can do this by using jsp EL.simply store the bean in arraylist/vector then u set the attribute in any scope that u want.then simpy call by using core tags --forEach tag.y bcoz best way is using El instead of struts tags..ok bye
JspServleta at 2007-7-10 12:11:52 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...