use of org.pentaho.ui.xul.components.XulCheckbox in project pentaho-kettle by pentaho.
the class AbsController method setSelectedRoleChanged.
/**
* The method is called when a user select a role from the role list. This method reads the current selected role and
* populates the Action Permission UI with the details
*/
public void setSelectedRoleChanged(IUIRole role) throws Exception {
IUIAbsRole absRole = null;
uncheckAllActionPermissions();
if (role instanceof IUIAbsRole) {
absRole = (IUIAbsRole) role;
if (absRole != null && absRole.getLogicalRoles() != null) {
for (String permission : absRole.getLogicalRoles()) {
XulCheckbox permissionCheckbox = findRoleCheckbox(permission);
if (permissionCheckbox != null) {
permissionCheckbox.setChecked(true);
}
}
}
} else {
throw new IllegalStateException();
}
}
Aggregations