struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Broadhurst <>
Subject Re: UpDownSelect & JPA
Date Fri, 05 Nov 2010 14:35:44 GMT
Thanks guys! String setup was legacy for single select which worked fine.
Select is populated with entity list so will re-work form entity to have
select list entity as property and go from there. Cheers!
On Nov 5, 2010 6:02 AM, "Maurizio Cucchiara" <>
> 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 <>:
>> 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
>> selected. The datatype in mysql where the field is being persisted to is
>> string. If one item is selected, the ID (listKey) goes into the db and
>> I retrieve the object for re-display in the form, that item is selected
>> the updownselect. Perfect! But when multiple items are selected, a comma
>> seperated list of the selected listKeys go in the db field. The problem
>> 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
>> comma separated list.
>> I am just wondering what it would take to get struts to translate the
>> 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
>> just don't know what struts is expecting when it needs to display
>> items selected. Thanks for any ideas.
>> Nick
> --
> Maurizio Cucchiara
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message