struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Broadhurst <hou1...@gmail.com>
Subject UpDownSelect & JPA
Date Fri, 05 Nov 2010 02:21:54 GMT
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

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