You should re-shape your DB design IMHO. If you expect multiple values for an entity property why do you declare as a plain string? You should consider to represent as at least an integer array (or even as an entity).
2010/11/5 Nick Broadhurst <hou1...@gmail.com>: > Hi All, > > I am using the struts2 updownselect for getting multiple selections from > user. It is populated by a list and works great as long as only one item is > selected. The datatype in mysql where the field is being persisted to is a > string. If one item is selected, the ID (listKey) goes into the db and when > I retrieve the object for re-display in the form, that item is selected in > the updownselect. Perfect! But when multiple items are selected, a comma > seperated list of the selected listKeys go in the db field. The problem is > when this comes back out, the updownselect doesn't display the previously > selected items. I am guessing because it does not know how to interpret the > comma separated list. > > I am just wondering what it would take to get struts to translate the list > and display the populated values. An array datatype or something? MySql > doesn't have that does it? Serialize it? Doesnt sound like a good fit and I > just don't know what struts is expecting when it needs to display multiple > items selected. Thanks for any ideas. > > Nick > -- Maurizio Cucchiara --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org