We have written our own tag to print a bunch of fields read from an XML
file. I am using various NestedTextTag, NestedRadioTag, NestedSelectTag,
NestedOptionsTag and it all works fine.
I had to enhance this to use iterations of a list of fields and am using
NestedIterateTag.
However using NestedIterateTag dosen't seem to iterate over the collection
As expected. It just prints prints out the first object from the collection.
Has anybody has experience using the NestedIterateTag ???
Here is the logic in short:
public class MyTag extends NestedWriteTag implements NestedNameSupport
{
public int doStartTag() throws JspException
{
// Some stuff removed ....
NestedIterateTag iterateTag = new NestedIterateTag();
iterateTag.setParent(this);
iterateTag.setPageContext(pageContext);
// "theCollectionProperty" is of ArrayList type.
iterateTag.setProperty("theCollectionProperty");
iterateTag.doStartTag();
// Do some stuff to use NestedTextTag, NestedRadioTag etc
and
// set their parent as iterateTag.
iterateTag.doEndTag();
return (SKIP_BODY);
}
}
Again, the iteration works only for the first element in the collection.
Doesn't work for all the elements in the collection.
Any help would be appreciated.
Thanks,
Nizar.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]