Mike, The indexed tags do make the code much cleaner. And they are definitely not read-only (as you've discovered, you don't need them if you want things read only!!).
There are lots of posts in the archives about it, and I posted working code here: http://www.mail-archive.com/[EMAIL PROTECTED]/msg12084.html cheers, David |---------+----------------------------> | | Mike Elliott | | | <[EMAIL PROTECTED]| | | 9.net> | | | | | | 08/15/2004 04:44 | | | PM | | | Please respond to| | | "Struts Users | | | Mailing List" | | | | |---------+----------------------------> >------------------------------------------------------------------------------------------------------------------------| | | | To: "Struts Users Mailing List" <[EMAIL PROTECTED]> | | cc: | | Subject: Re: Read only iterate? | >------------------------------------------------------------------------------------------------------------------------| 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]