Well, I'm not sure exactly what you want to know, but here's an example of
how I used it in an application I'm currently working on:


<table>
<logic:iterate id="ansm" name="groups"
type="com.moog.us.app.ans.data.AnsmItem">
<tr>
        <td>
                <html:link page="/GetFormatGroup.do?type=group"
paramId="key" paramName="ansm" paramProperty="numberType">
                        <bean:write name="ansm" property="numberType"/>
                </html:link>
        </td>
        <td>
                <html:link page="/GetList.do?type=subformats" paramId="key"
paramName="ansm" paramProperty="numberType">
                        <img src="subtypes.gif"/>
                </html:link>
        </td>
        <td>
                <bean:write name="ansm" property="typeDesc"/>
        </td>
</tr>
</logic:iterate>
</table>


"groups" is an ArrayList that I put in the request from the preceding
action.  it stores variables of type AnsmItem.  "ansm" is the local bean
name that you use within the iterate tag to access the current element of
the collection.

Let me know if you have any questions about it, or if you want to know
anything else.


Keith Kamholz
Programming and Architecture
Moog Inc.

Phone: (716) 687-7001



-----Original Message-----
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 11:22 AM
To: [EMAIL PROTECTED]
Subject: Help- logic:iterate tag


Hi

I am trying to understand the logic:iterate tag. I have gone thru the docs
but could figure out some of the attributes of this tag.

My confusion is following attributes

1. property="<some name>" 

so should this have a get and set methods in the ActionForm

2. Collection - when will this be used

3. indexID - when should this be used

Can some body throw some insight on these tags or some examples of usage.

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to