Seam framework Cheat Sheets 3. selectManyCheckbox example
Example usage of selectManyCheckBoxIn this example i want to create selectManyCheckbox in order to assign a user with multiple roles. The example code is as follows
In the above example “userAccount.userRoles” is the form value (users associated roles) and the rolesListing.roles is bunch of roleids and rolename from entity named SiteRole.The helper class RolesListing is as follows
Important things to make sure, this seam tag work are
a) Make sure the #{userAccount.userRoles} and #{rolesListing.roles} are of same type for example i made both of them as List. If they are different type, you will encounter “Conversion Error setting value”.
b) Make sure the
c) In my next post i will explain the @ManyToMany relationship between userAccount entity and Roles entity using a USER_ROLE join table.