The extension means you can forget everything the other tags do and only 
specify your properties. No need for "indexed" attribute or otherwise. 
And the other attributes of the iterate tag(like length and offset) work 
fine.

eg
<nested:iterate property="listPropertyOne">
<nested:iterate property="listPropertyOne">
<nested:text property="myTextProperty" />
</nested:iterate>
</nested:iterate>

And that is all you'll need. You are right with the original tags. You 
can do all sorts of awesome nesting, except you can only "view" and not 
input. Largely because the indexed attribute will only allow you to 
penetrate only the one iterate tag to set the nested property correctly. 
This is what the heart of the nested extension is. Writing the proper 
nested property correctly.

There is a way to do it with the original tags (even without the 
"indexed" property)... but it is truly messy....

<logic:iterate name="myForm" property="myListProperty" indexId="index1">
<logic:iterate name="myForm" property="mySecondProperty" indexId="index2">
<html:text name="myForm"
property='<%= 
"myListProperty["+index1+"].mySecondListProperty["+index2+"].myLastProperty"%>' 
/>
</logic:iterate>
</logic:iterate>

(yes I've been in one end and out the other in terms of nesting stuff).
This method also kind of goes against the MVC paradigm. And when you 
compare it to the simplicity of the nested extension version. There's no 
comparison. But it did fill a void until I wrote the extension.

The extension allows for all kinds of lists within lists and any other 
kind of nesting you can think of. It also allows for other things to be 
nested. Like logic tags, and other tags which use a "property" attribute 
to access a bean. All tags of this manner have a nested extension 
counterpart. And that is truly powerful. No longer is it just the "text" 
tag, or other input tags which get the "indexed" property.

As for adoption... I would like it to be, but that's not for me to answer :)

Even if it was kept separate, the Struts guys would have to paradigm 
shift their tags to stop the extension from working as expected. And if 
another tag came out...
I think it only takes me 5 minutes to add a tag, and that includes a 
little testing :)

I've finished writing a primer, and it will be on my site in the next 
day or so, along with a "by the hand" tutorial.
And about a week later I'll post some advanced topics and other 
specifics of the nested extension.
When the Primer's up, it should answer most questions, and the rest will 
fill in the holes.

Here's a pre-release version of my Primer (Please nobody link it. 
There's still other stuff to be done (like linking a small glossary to 
various terms) and I'm splitting it to multiple pages)... give it a try 
for me...

http://www.keyboardmonkey.com/BetaPrimer.html

As for the build it needs.. it works on any version of struts over 
"release candidate 1.01". Actually works on older ones, but I've 
extended logic tags which were first released in this build. Maybe I 
should make a version for the old 1.0, yes?)


Any other questions, you know where to find me.


Arron.



David Morris wrote:

>Arron,
>
>I have been struggling to get the current nested tags to do what I
>need. 
>My first attempt at this failed when I found I needed the nightly
>build. Next, 
>I got nested tags working for output and thought this is easy. Then I 
>moved on to input. No support for indexed on the iterate tag. Then 
>I thought I will simply swap the x and y coordinates of my collections.
>
>But there is no way I can see to reference a variable of on the length
>
>or offset attributes. 
>
>Now I have come full circle. Does your extension solve this and is it 
>likely to become a standard extension? If the answer to this is no, I 
>guess that I will try adding support for indexed on the iterate tag,
>seems 
>simple enough, but I haven't spent much time looking at what is 
>available.
>
>David Morris 
>
> 
>
>>>>[EMAIL PROTECTED] 11/30/01 07:26PM >>>
>>>>
>You are right in that the indexed property isn't in the indexed tag.
>The discussion was more on the new nesting tags that get through all 
>this properly.
>
>Go here for the downloads...
>    http://www.keyboardmonkey.com/download/struts/index.html 
>And for a running example...
>    http://www.keyboardmonkey.com/StrutMonkey 
>
>With any luck they'll be a part of struts soon.
>
>You can get the basic iterators to go through more than one level, but
>
>it takes some fiddling.
>
>Arron.
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>

Reply via email to