I ended up getting it to work thru this hack below.  I'd be curious if someone was able to do this dynamic grid entry gracefully using struts!!!
 
 
    <% int i = 0; %>
    <logic:iterate id="customerContact" name="adminUpdateProfileForm" property="customerContacts">
       <tr>
        <td><input type='text' name="customerContact[<%= i++ %>].contactName" value="<%= ((com.mydomain.project.CustomerContact)customerContact).getContactName() %>"></td>
       </tr>
    </logic:iterate>
----- Original Message -----
From: Jeff Trent
Sent: Thursday, May 17, 2001 10:12 PM
Subject: Re: Indexed Grid Representation on a Form

No, this still generates an exception.  If I substitute i for 0 in your below example it works but that doesn't help me for the iteration.  Thanks, jeff.
 
----- Original Message -----
Sent: Thursday, May 17, 2001 5:39 PM
Subject: RE: Indexed Grid Representation on a Form

    <% int i = 0; %>
    <logic:iterate id="list" name="adminUpdateProfileForm" property="customerContacts">
       <tr> <% i++ ; %>
        <td><html:text property="customerContact[i].contactName"/></td>
       </tr>
    </logic:iterate>
 
 
-----Original Message-----
From: Jeff Trent [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 17, 2001 3:58 PM
To: [EMAIL PROTECTED]
Subject: Indexed Grid Representation on a Form

I think this should work (but obviously it doesn't).  Can anyone tell me why?
 
    <% int i = 0; %>
    <logic:iterate id="list" name="adminUpdateProfileForm" property="customerContacts">
       <tr>
        <td><html:text property="customerContact[<%=i++%>].contactName"/></td>
       </tr>
    </logic:iterate>
 
Where getCustomerContacts() returns a vector of CustomerContact objects &
    getCustomerConact(int offset) returns an CustomerContact element from that vector.
 
thanks,
jeff
 

Reply via email to