I'm having trouble getting my checkbox list to populate correctly.

I have a User object which has a List of Role objects (roleId-Integer,
roleName-String) with setter/getter as follows:

    private List<Role> roles;

    /**
     * Returns the roles
     *
     * @return the roles
     */
    public List<Role> getRoles() {
        return roles;
    }

    /**
     * Sets the roles
     *
     * @param roles
     *            the new user roles
     */
    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }


My form has the tag configured as below:

<s:checkboxlist list="%{roles}" listKey="roleId" listValue="roleName"
label="Roles" name="user.roles.roleId" id="roles" />

When I submit the form everything works as expected, but when I edit the
User object the roles are populated in the User object but the checkboxes
aren't checked as required.

If somebody could point out my error to me, I'd appreciate it.

Zoran



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

Reply via email to