On Saturday 14 August 2004 17:52, Kishore Senji wrote:
> Refer:
> http://struts.apache.org/faqs/indexedprops.html
>
> > <logic:iterate id="entry" name="problemBean" property="items" >
> > <tr>
> > <td>Problematic input</td>
> > <td>
> > <html:text name="entry"
> > property="integer_value" indexed="true"/>
> > </td>
> > </tr>
> > </logic:iterate>
>
> Try the one below:
>
> <logic:iterate id="entry" name="problemBean" property="items"
> indexId="ctr"> <tr>
> <td>Problematic input</td>
> <td>
> <html:text name="problemBean"
> property='<%="items["+ctr+"].integer_value"%>'/>
> </td>
> </tr>
> </logic:iterate>
Yes, that works. Thank you. However, I would put that in the general
category of a workaround rather than the correct solution. I read the
reference you mentioned before making my original attempt.
In that reference, the authors themselves feel there is a better solution:
" The JSP expression syntax for the property attribute is somewhat
messy and easy to get wrong so it's something we want to avoid.
One way to make this a little cleaner is to use "indexed tags"'
and then go on to talk about "indexed tags" as being superior. I took from
that the notion that I should avoid the first solution; that indexed tags
would do the same thing.
If that's actually true then I'd be delighted to see how to make it work.
Nowhere in the discussion do the authors drop the bomb that using indexed
tags makes the whole situation read-only and I still think that there must be
some way to make it work using indexed tags -- I just haven't yet found it.
However, thanks for pointing me at the earlier solution -- it does work,
awkward as it is, and that's really important when one has a product to
deliver.
--
Mike Elliott
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]