Nesting logic:iterate
Hi all, is it possible to nest iterate-tags with Struts 1.1? I have an ArrayList rows which contains ArrayLists. I tried this in a JSP: logic:iterate id=row name=rows logic:iterate id=field name=row bean:write name=field/ /logic:iterate /logic:iterate But I always get an error, saying _jspx_field_1 is already defined in the JSP. Is there something wrong with my code or isn't this possible? TIA Heiko -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Nesting logic:iterate
I have used the following: logic:iterate id=subscription name=provider property=subscriptions logic:iterate id=product name=subscription property=products /logic:iterate /logic:iterate and it works find. You have to give in each case the property that will get the collection on which the iteration will occur. Konstantina - Original Message - From: Heiko Jürgens [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 2:00 PM Subject: Nesting logic:iterate Hi all, is it possible to nest iterate-tags with Struts 1.1? I have an ArrayList rows which contains ArrayLists. I tried this in a JSP: logic:iterate id=row name=rows logic:iterate id=field name=row bean:write name=field/ /logic:iterate /logic:iterate But I always get an error, saying _jspx_field_1 is already defined in the JSP. Is there something wrong with my code or isn't this possible? TIA Heiko -- - 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]
Re: Nesting logic:iterate
I tried it that way but I still get the same error ... I have used the following: logic:iterate id=subscription name=provider property=subscriptions logic:iterate id=product name=subscription property=products /logic:iterate /logic:iterate and it works find. You have to give in each case the property that will get the collection on which the iteration will occur. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Nesting logic:iterate
Heiko, I _believe_ that field is a deprecated struts tag, so that word may give you problems. Try changing field to some other variable name, and give that a go. Hopefully, someone who is a better struts programmer than I am can comment on this later - it's still early in the US. =) -- Becky Norum Database Administrator Center for Subsurface Sensing and Imaging Systems (CenSSIS) Northeastern University http://www.censsis.neu.edu On Wed, 2003-03-05 at 07:00, Heiko Jürgens wrote: Hi all, is it possible to nest iterate-tags with Struts 1.1? I have an ArrayList rows which contains ArrayLists. I tried this in a JSP: logic:iterate id=row name=rows logic:iterate id=field name=row bean:write name=field/ /logic:iterate /logic:iterate But I always get an error, saying _jspx_field_1 is already defined in the JSP. Is there something wrong with my code or isn't this possible? TIA Heiko - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Nesting logic:iterate
Hi all, is it possible to nest iterate-tags with Struts 1.1? Hi, Heiko: I've had luck with patterns similar to what others have suggested, but if you have plain lists or vectors inside lists or vectors.. a better route to go is to try logic:iterate id=row name=bean property=myproperty logic:iterate id=element collection=%= row % do something w/ element /logic:iterate /logic:iterate I don't happen to have my examples handy (I'm still at home :), but hope you get the idea. As another person suggested if you have the inner element defined as a bean property on the object bound to row.. then you can use name/property as well. The scoping gotchas of struts are plenty -- this is one of them that I stumble across often :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Nesting logic:iterate
Hi Sundar, I tried it both ways, but I _always_ get a Jsp compile error, saying that _jspx_xxx_1 is already defined, where xxx stands for the id-attribute (e.g. element) of the inner logic:iterate ! I've had luck with patterns similar to what others have suggested, but if you have plain lists or vectors inside lists or vectors.. a better route to go is to try logic:iterate id=row name=bean property=myproperty logic:iterate id=element collection=%= row % do something w/ element /logic:iterate /logic:iterate I don't happen to have my examples handy (I'm still at home :), but hope you get the idea. As another person suggested if you have the inner element defined as a bean property on the object bound to row.. then you can use name/property as well. The scoping gotchas of struts are plenty -- this is one of them that I stumble across often :) -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Nesting logic:iterate
Try using the method I suggested in this message: http://marc.theaimsgroup.com/?l=struts-userm=104575299502257w=2 At 03:53 PM 3/5/2003 +0100, you wrote: Hi Sundar, I tried it both ways, but I _always_ get a Jsp compile error, saying that _jspx_xxx_1 is already defined, where xxx stands for the id-attribute (e.g. element) of the inner logic:iterate ! I've had luck with patterns similar to what others have suggested, but if you have plain lists or vectors inside lists or vectors.. a better route to go is to try logic:iterate id=row name=bean property=myproperty logic:iterate id=element collection=%= row % do something w/ element /logic:iterate /logic:iterate I don't happen to have my examples handy (I'm still at home :), but hope you get the idea. As another person suggested if you have the inner element defined as a bean property on the object bound to row.. then you can use name/property as well. The scoping gotchas of struts are plenty -- this is one of them that I stumble across often :) -- - 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]
Re: Nesting logic:iterate
Hi Andrew, works now! Thanks Try using the method I suggested in this message: http://marc.theaimsgroup.com/?l=struts-userm=104575299502257w=2 -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Nesting logic:iterate
For adding nested:root name=city which tag lib do I have to add? yaron - Original Message - From: Andrew Shirk [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 5:25 PM Subject: Re: Nesting logic:iterate Try using the method I suggested in this message: http://marc.theaimsgroup.com/?l=struts-userm=104575299502257w=2 At 03:53 PM 3/5/2003 +0100, you wrote: Hi Sundar, I tried it both ways, but I _always_ get a Jsp compile error, saying that _jspx_xxx_1 is already defined, where xxx stands for the id-attribute (e.g. element) of the inner logic:iterate ! I've had luck with patterns similar to what others have suggested, but if you have plain lists or vectors inside lists or vectors.. a better route to go is to try logic:iterate id=row name=bean property=myproperty logic:iterate id=element collection=%= row % do something w/ element /logic:iterate /logic:iterate I don't happen to have my examples handy (I'm still at home :), but hope you get the idea. As another person suggested if you have the inner element defined as a bean property on the object bound to row.. then you can use name/property as well. The scoping gotchas of struts are plenty -- this is one of them that I stumble across often :) -- - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Nesting logic:iterate
The struts-nested taglib that ships with Struts. At 06:05 PM 3/5/2003 +0200, you wrote: For adding nested:root name=city which tag lib do I have to add? yaron - Original Message - From: Andrew Shirk [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 5:25 PM Subject: Re: Nesting logic:iterate Try using the method I suggested in this message: http://marc.theaimsgroup.com/?l=struts-userm=104575299502257w=2 At 03:53 PM 3/5/2003 +0100, you wrote: Hi Sundar, I tried it both ways, but I _always_ get a Jsp compile error, saying that _jspx_xxx_1 is already defined, where xxx stands for the id-attribute (e.g. element) of the inner logic:iterate ! I've had luck with patterns similar to what others have suggested, but if you have plain lists or vectors inside lists or vectors.. a better route to go is to try logic:iterate id=row name=bean property=myproperty logic:iterate id=element collection=%= row % do something w/ element /logic:iterate /logic:iterate I don't happen to have my examples handy (I'm still at home :), but hope you get the idea. As another person suggested if you have the inner element defined as a bean property on the object bound to row.. then you can use name/property as well. The scoping gotchas of struts are plenty -- this is one of them that I stumble across often :) -- - 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] - 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]
Re: Nesting logic:iterate
10x a lot - Original Message - From: Andrew Shirk [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 6:19 PM Subject: Re: Nesting logic:iterate The struts-nested taglib that ships with Struts. At 06:05 PM 3/5/2003 +0200, you wrote: For adding nested:root name=city which tag lib do I have to add? yaron - Original Message - From: Andrew Shirk [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 5:25 PM Subject: Re: Nesting logic:iterate Try using the method I suggested in this message: http://marc.theaimsgroup.com/?l=struts-userm=104575299502257w=2 At 03:53 PM 3/5/2003 +0100, you wrote: Hi Sundar, I tried it both ways, but I _always_ get a Jsp compile error, saying that _jspx_xxx_1 is already defined, where xxx stands for the id-attribute (e.g. element) of the inner logic:iterate ! I've had luck with patterns similar to what others have suggested, but if you have plain lists or vectors inside lists or vectors.. a better route to go is to try logic:iterate id=row name=bean property=myproperty logic:iterate id=element collection=%= row % do something w/ element /logic:iterate /logic:iterate I don't happen to have my examples handy (I'm still at home :), but hope you get the idea. As another person suggested if you have the inner element defined as a bean property on the object bound to row.. then you can use name/property as well. The scoping gotchas of struts are plenty -- this is one of them that I stumble across often :) -- - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]