I managed to make the MyTag (using NestedIterateTag, NestedRadioTag, NestedTextTag, etc...) work. My main problem was that the NestedIterateTag was not iterating. To find out what I needed to do to make this work, I wrote the required <nested:iterate ...> logic in a jsp and looked at the .java file created in the work directory and put that logic in MyTag.
It worked like a champion. Should've thought of this before. Thanks all for your help. Nizar Bhamani -----Original Message----- From: Bhamani, Nizar A TL56E [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2003 4:01 PM To: 'Struts Users Mailing List' Subject: Question about NestedIterateTag 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] ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]