posted 8 years ago
Hello, I am relatively new to grails and have been trying to configuring a check box to set a boolean value to true when it is checked for a number of list items.
The relationship is a hasMany between two domains where the boolean canClose is set in the work domain. The other domain is called role.
I have set up the relationship so that work hasManyRoles and I would like my domain to reflect the boolean canClose being set to true for some of these roles based on what gets checked in the checkbox list.
I have managed to get the gsp working displaying the list with checkboxes beside each one but am unsure as to how to save the boolean as true once some of these roles are checked.
Any assistance would be greatly appreciated. I will post my code below:
GSP code: