Hi there,

I'm having problem with checkboxlist in Struts 2. Here is my jsp fragment:
<s:checkboxlist list="attributes" name="test" listKey="id"
listValue="name"/>
Now "attributes" is a list of Attribute objects. Attribute class look like:

class Attribute {
  private Integer id;
  private String name;
  ... (getters & setters)
}

The "test" property is a list of String and this is the problem. Because
Attribute.getId() is of type Integer which isn't equal to String for obvious
reason, the checkboxlist is not auto-selected. There are some constraints
that prevent me from changing "test" to a list of Integers in the action
itself. Is there a way actually on the fly convert Attribute.getId() to
String so that the checkboxlist will be autoselected. Thanks.
-- 
View this message in context: 
http://www.nabble.com/-s2-checkboxlist-problem-tf3778745.html#a10685611
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to