Hi James,

Thanks for your note - made me think a bit!

Would be interested in knowing more about the other indexed tags that were
posted and you are using.  I know either Jeff Trent or Martin Cooper had
produced some tags which had a different name ie IndexedXXXTag.

My plan was to make changes to the original struts tags so that the changes
could make it into the build.  That happened last night (though they won't be
working until tonigh's build).  As to automatically adding the indexed names if
within an iterate tag, there are some where this isn't always appropriate, such
as the link tag (adds a parameter to the link set to current iteration index
value - you can also set the name of this param with indexId='x').  Like you, I
can't think of any time you wouldn't need indexed names for the other tags, but
I guess the extra param keeps them all the same?

Have just tried the iteration with an iteration, and the changes I made don't
take account of any other outer iteration (ie you just get indexed names for the
innermost iteration).  I'm sure people would welcome you making changes that
would do this!!

Cheers,

Dave







James Howe <[EMAIL PROTECTED]> on 07/25/2001 03:12:35 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:    (bcc: David Hay/Lex/Lexmark)
Subject:  Re: Indexed properties



At 02:23 PM 7/25/2001 -0400, you wrote:


>Nathan,
>
>Hi.  Currently you have to use my changed tags...but it looks like they
>will be
>in the nightly build by the end of the week.
>
>You can get them at http://husted.com/about/struts/indexed-tags.htm, and I
>attached some example source code to a previous message which was just
>mentioned, if you want to look at that.
>
>Cheers,
>
>Dave

I have a couple of questions about your mods.  At our site we are using a
different set of modifications, posted by some other Struts user which
seems to accomplish the same thing as your mods.  The major difference
seems to be that yours requires an additional attribute to specify that the
particular input field is to use an indexed property accessor.  I'm curious
as to why you made this choice?  The mods we are using automatically use an
indexed accessor if the input field is contained inside of an iterate
tag.  Do you have an example of when you would have an input field inside
of an iterate tag when you wouldn't want to use an indexed property
name?  (I'm not trying to argue with your decision, just trying to get a
better understanding of your thoughts).  The other issue, which we just
came across today, with the other indexed property mod, is that it would
fail to work correctly if you had iterators inside of iterators.  We had a
case where we used an iterator to access a collection of beans, and then
iterated over the contents of each of the beans.  The resultant HTML needed
to look like this to work correctly:

<input type="text" name="firstTable[n].secondTable[m].propertyName">

Will your mods handle nested iterators correctly?

Finally, are your mods going to be part of the official build, or are they
included in some sort of user supplied extensions?  I missed the original
discussion about your modifications.

Thanks!
James W. Howe                   mailto:[EMAIL PROTECTED]
Allen Creek Software, Inc.              pgpkey: http://ic.net/~jwh/pgpkey.html
Ann Arbor, MI 48103







Reply via email to