This will definitely help me , but the reason for asking this question
..

In my application my requirement is to have multiple HTML elements with
the same name.

eg:

<table>
<tr>
 <td><html:text property="beginDate"></td>
<td><html:text property="endDate"></td>
<td>
  <html:select property="area">
      <html:option value="">&nbsp;</html:option>
       <html:option value="1" >MH</html:option> 
       <html:option value="2" >MSA</html:option> 
       <html:option value="3" >NATIONAL</html:option> 
    </html:select> 
</td>
</tr>
</table>

But the above table can be 1 row or many rows (dynamic). Once the user
submits the page, and say there is some validation error, I want to
rebuild the table with the values from the action form.



Hope i am clear, if not I will further info.

>>> [EMAIL PROTECTED] 06/09/03 12:33PM >>>
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