What really is needed is a new html tag called "grid" or something that
handles this more gracefully.  Using the iterate tag seems to be a waste
since I'm not really using it for anything other than a counter placeholder.
I know its a departure from standard HTML form types but who the hell cares.
This would be really useful addition instead of mixing html tags in with
iterate tag to accomplish something that should be simple.  Maybe I'll write
a taglib for this...

So reading your comments, Jim, it sounds like your using code analagous to
this but your implementation uses a map instead (?)

BTW, now that I'm using html field names like customerContactName[0].title,
I find that conventional javascript to set focus doesn't work - I get
javascript errors.  Any ideas how to reference these fields?

thanks,
jeff

----- Original Message -----
From: "Jim Richards" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 17, 2001 10:24 PM
Subject: Re: Indexed Grid Representation on a Form


>
> It should be:
>
>          <% int i = 0; %>
>          <logic:iterate id="list" name="adminUpdateProfileForm"
property="customerContacts">
>             <tr> <% i++ ; %>
>              <td><html:text property="<%= \"customerContact[\" + i
\"].contactName\" %>"/></td>
>             </tr>
>          </logic:iterate>
>
> You need to replace the whole string. The exception would have been from
> the BeanUtils not able to understand what the [i] would have meant. If you
> have an iterator in a scriptlet, then you need to always use a scriptlet
> to access it. Usually. Mostly.
>
> I had a feeling there was a change made to iterate recently to give you
> an index value, but I can't remember what it was.
>
> I usually use a Map and have the key as the integer value in the index
> for the entry. Works well when you don't have liner numbering in the
> list of key/value pairs.
>

Reply via email to