I figured this out.
All I did was change the method signature on my Action class from:
setNotificationUsers(Collection notificationUsers)
to
setNotificationUsers(Collection<Integer> notificationUsers)
And Struts/XWork took care of the rest.
Brian-
On May 31, 2007, at 10:08 AM, Brian Trzupek wrote:
I am using the optionTransferSelect tag all over the place, love
this control!
Anyways, when the id property of list (which is an int) gets
displayed in the HTML by the tag the number get formatted with a
comma when the numbers get into 4+ digits.
Example output:
<option value="2,451">[EMAIL PROTECTED]</option>
<option value="2,452">[EMAIL PROTECTED]</option>
When the list is set on my Action class the values come back as
strings with the comma in it and then when I pass them to my DAO it
fails to load b/c it is not parsing the number ( new Integer
(value) ) correctly.
My question is, why is the control outputting a 'formatted' number?
and is there a way to 'turn that off'?
I would prefer a solution that will globally tell the tag to render
the values without the formatting, rather than have to parse them
in every action where I have a list coming back in.
Any Ideas?
Thanks Brian-
--- Here is my jsp tag ----
<s:optiontransferselect
label="%{getText('item.notifications')}"
name="leftsidesystemUsers"
rightTitle="Users Notified"
leftTitle="System User List"
list="%{systemUsers}"
listValue="email"
listKey="id"
allowAddToLeft="true"
allowAddAllToLeft="true"
allowUpDownOnLeft="true"
multiple="true"
headerKey="headerKey"
headerValue="--- Please Select ---"
emptyOption="true"
doubleId="id"
doubleList="%{notificationUsers}"
doubleListValue="email"
doubleListKey="id"
doubleName="notificationUsers"
doubleHeaderKey="doubleHeaderKey"
doubleHeaderValue="--- Please Select ---"
doubleEmptyOption="true"
doubleMultiple="true"
/>
---------------------------------------------------------------------
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]