I'm using a the struts select tag for use with multiple select. Like so:
The corresponding bean property is a . I'm submitting that form and on the other side, I am wanting to put that data into a hidden field. Right now, it just puts the object.toString() gobbledygook in for the value. It seems that struts should be able to handle this transparently.
Joined: Aug 29, 2008
Are you trying to display the value of the string array with an html:hidden tag that is inside of a logic:iterate loop? It sounds like you may NOT be, and the single html:hidden tag is just going to try to display the toString of your array. So you may want to try using an iterate tag to loop through the values. I may be making a bad guess though. It might help to see your getter and setter methods and the jsp code you are using to try to display the value.
Joined: Nov 03, 2008
You're right Tom. I'm not iterating through them, but if I have to, that just seems like bonehead design. I would think that Struts would be able to handle it all transparently. I guess not.
Does anyone have some sample code of a Collection property iteration? I played around with it a bit, but the 'indexed' attribute kept giving me trouble.