[Q] Iterating over a collections.Bag works, but..?
Hello, hoping for some help on this: The nested:iteration on a Bag seems to work fine, and it iterates ok, but I am having trouble accessing the contents of the Bag (SortedBag or TreeBag etc) from the code, please help :) nested:form action=engtest.do logic:notEmpty name=_engineer property=products_SortedBag nested:iterate property=products_SortedBag indexId=i id=unused %=i% html:text property='%=products_SortedBag[+i+]%' / /nested:iterate /logic:notEmpty nested:submit property=submitValueSubmit Changes/nested:submit /nested:form Returns: java.lang.IllegalArgumentException: Non-indexed property for 'products_SortedBag[0]' And if I try, html:text property='%=products_SortedBag(+i+)%' / it returns: java.lang.IllegalArgumentException: Non-mapped property for 'products_SortedBag(0)' Using nested:text gives the same output as well. So how can I access the contents?? Thanks! Rand Williams Hewlett-Packard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Q] Iterating over a collections.Bag works, but..?
The problem is that I can display the bean fine: nested:write name=unused/ But I want to use it as an input field: nested:text ??? / -Original Message- From: WILLIAMS,RAND (HP-USA,ex1) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 12:12 PM To: 'Struts Users Mailing List' Subject: [Q] Iterating over a collections.Bag works, but..? Hello, hoping for some help on this: The nested:iteration on a Bag seems to work fine, and it iterates ok, but I am having trouble accessing the contents of the Bag (SortedBag or TreeBag etc) from the code, please help :) nested:form action=engtest.do logic:notEmpty name=_engineer property=products_SortedBag nested:iterate property=products_SortedBag indexId=i id=unused %=i% html:text property='%=products_SortedBag[+i+]%' / /nested:iterate /logic:notEmpty nested:submit property=submitValueSubmit Changes/nested:submit /nested:form Returns: java.lang.IllegalArgumentException: Non-indexed property for 'products_SortedBag[0]' And if I try, html:text property='%=products_SortedBag(+i+)%' / it returns: java.lang.IllegalArgumentException: Non-mapped property for 'products_SortedBag(0)' Using nested:text gives the same output as well. So how can I access the contents?? Thanks! Rand Williams Hewlett-Packard - 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: [Q] Iterating over a collections.Bag works, but..?
Have you tried this variation? nested:text name=??? nested:write name=unused/ /nested:text -- James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org/ The man who does not read good books has no advantage over the man who cannot read them. - Mark Twain (1835-1910) -Original Message- From: WILLIAMS,RAND (HP-USA,ex1) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 4:58 PM To: 'Struts Users Mailing List' Subject: RE: [Q] Iterating over a collections.Bag works, but..? The problem is that I can display the bean fine: nested:write name=unused/ But I want to use it as an input field: nested:text ??? / -Original Message- From: WILLIAMS,RAND (HP-USA,ex1) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 12:12 PM To: 'Struts Users Mailing List' Subject: [Q] Iterating over a collections.Bag works, but..? Hello, hoping for some help on this: The nested:iteration on a Bag seems to work fine, and it iterates ok, but I am having trouble accessing the contents of the Bag (SortedBag or TreeBag etc) from the code, please help :) nested:form action=engtest.do logic:notEmpty name=_engineer property=products_SortedBag nested:iterate property=products_SortedBag indexId=i id=unused %=i% html:text property='%=products_SortedBag[+i+]%' / /nested:iterate /logic:notEmpty nested:submit property=submitValueSubmit Changes/nested:submit /nested:form Returns: java.lang.IllegalArgumentException: Non-indexed property for 'products_SortedBag[0]' And if I try, html:text property='%=products_SortedBag(+i+)%' / it returns: java.lang.IllegalArgumentException: Non-mapped property for 'products_SortedBag(0)' Using nested:text gives the same output as well. So how can I access the contents?? Thanks! Rand Williams Hewlett-Packard - 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]
Subject: RE: [Q] Iterating over a collections.Bag works, but..?
Do you have the indexed getter method in your main form? i.e. Object [] getNestedObjs() { return nestedObjs.toArray(); } Edgar From: WILLIAMS,RAND (HP-USA,ex1) rand.williams () hp ! com Date: 2003-02-19 21:58:19 [Download message RAW] The problem is that I can display the bean fine: nested:write name=unused/ But I want to use it as an input field: nested:text ??? / -Original Message- From: WILLIAMS,RAND (HP-USA,ex1) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 12:12 PM To: 'Struts Users Mailing List' Subject: [Q] Iterating over a collections.Bag works, but..? Hello, hoping for some help on this: The nested:iteration on a Bag seems to work fine, and it iterates ok, but I am having trouble accessing the contents of the Bag (SortedBag or TreeBag etc) from the code, please help :) nested:form action=engtest.do logic:notEmpty name=_engineer property=products_SortedBag nested:iterate property=products_SortedBag indexId=i id=unused %=i% html:text property='%=products_SortedBag[+i+]%' / /nested:iterate /logic:notEmpty nested:submit property=submitValueSubmit Changes/nested:submit /nested:form Returns: java.lang.IllegalArgumentException: Non-indexed property for 'products_SortedBag[0]' And if I try, html:text property='%=products_SortedBag(+i+)%' / it returns: java.lang.IllegalArgumentException: Non-mapped property for 'products_SortedBag(0)' Using nested:text gives the same output as well. So how can I access the contents?? Thanks! Rand Williams Hewlett-Packard - 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]
[OT] RE: [Q] Iterating over a collections.Bag works, but..?
Out of pure curiosity, is the Bag you're using from the EDU.oswego libraries? -Original Message- From: WILLIAMS,RAND (HP-USA,ex1) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 3:58 PM To: 'Struts Users Mailing List' Subject: RE: [Q] Iterating over a collections.Bag works, but..? The problem is that I can display the bean fine: nested:write name=unused/ But I want to use it as an input field: nested:text ??? / -Original Message- From: WILLIAMS,RAND (HP-USA,ex1) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 12:12 PM To: 'Struts Users Mailing List' Subject: [Q] Iterating over a collections.Bag works, but..? Hello, hoping for some help on this: The nested:iteration on a Bag seems to work fine, and it iterates ok, but I am having trouble accessing the contents of the Bag (SortedBag or TreeBag etc) from the code, please help :) nested:form action=engtest.do logic:notEmpty name=_engineer property=products_SortedBag nested:iterate property=products_SortedBag indexId=i id=unused %=i% html:text property='%=products_SortedBag[+i+]%' / /nested:iterate /logic:notEmpty nested:submit property=submitValueSubmit Changes/nested:submit /nested:form Returns: java.lang.IllegalArgumentException: Non-indexed property for 'products_SortedBag[0]' And if I try, html:text property='%=products_SortedBag(+i+)%' / it returns: java.lang.IllegalArgumentException: Non-mapped property for 'products_SortedBag(0)' Using nested:text gives the same output as well. So how can I access the contents?? Thanks! Rand Williams Hewlett-Packard - 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: [OT] RE: [Q] Iterating over a collections.Bag works, but..?
Never mind, just realized there was a bag in commons, sorry -Original Message- From: John Espey [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 4:57 PM To: Struts Users Mailing List Subject: [OT] RE: [Q] Iterating over a collections.Bag works, but..? Out of pure curiosity, is the Bag you're using from the EDU.oswego libraries? -Original Message- From: WILLIAMS,RAND (HP-USA,ex1) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 3:58 PM To: 'Struts Users Mailing List' Subject: RE: [Q] Iterating over a collections.Bag works, but..? The problem is that I can display the bean fine: nested:write name=unused/ But I want to use it as an input field: nested:text ??? / -Original Message- From: WILLIAMS,RAND (HP-USA,ex1) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 12:12 PM To: 'Struts Users Mailing List' Subject: [Q] Iterating over a collections.Bag works, but..? Hello, hoping for some help on this: The nested:iteration on a Bag seems to work fine, and it iterates ok, but I am having trouble accessing the contents of the Bag (SortedBag or TreeBag etc) from the code, please help :) nested:form action=engtest.do logic:notEmpty name=_engineer property=products_SortedBag nested:iterate property=products_SortedBag indexId=i id=unused %=i% html:text property='%=products_SortedBag[+i+]%' / /nested:iterate /logic:notEmpty nested:submit property=submitValueSubmit Changes/nested:submit /nested:form Returns: java.lang.IllegalArgumentException: Non-indexed property for 'products_SortedBag[0]' And if I try, html:text property='%=products_SortedBag(+i+)%' / it returns: java.lang.IllegalArgumentException: Non-mapped property for 'products_SortedBag(0)' Using nested:text gives the same output as well. So how can I access the contents?? Thanks! Rand Williams Hewlett-Packard - 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]