-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I am using the zkgrails plugin and have the following classes...
public enum UserRole { SYSTEMS_ADMINISTRATOR('Systems administrator'), PROJECT_OWNER('Project owner'), PROJECT_MEMBER('Project member') String name UserRole(String name) { this.name = name } } class User{ String firstName String lastName Set<UserRole> roles static hasMany = [roles: UserRole] static constraints = { } }
... and would like to create a zul page to allow users of the application to display a list of all possible roles and then check off the ones they would like to assign to a user.
What is the best zk widget to use? I have been using a listbox with checkmarks enabled.
How do I display all of the user roles (UserRole.values()) on the zul page and then bind a user's selections to the "Set<UserRole> roles" property in the User object?
Thank you in advance.
Asked: 2011-04-15 11:18:17 +0800
Seen: 329 times
Last updated: Sep 11 '12