String yesDestination = URLEncoder.encode("DeleteRole.action?roleName=" + URLEncoder.encode(this.roleName, URIEncoding), URIEncoding);
String noDestination = URLEncoder.encode("ViewListRole.action?title=Roles", URIEncoding);
String message = URLEncoder.encode("Do you really want to delete the role " + URLEncoder.encode(this.roleName, URIEncoding), URIEncoding);
String encodedRoleName = URLEncoder.encode(URLEncoder.encode(this.roleName, URIEncoding), URIEncoding);
InfoGlueRole role = RoleControllerProxy.getController().getRole(this.roleName);
if(role.getAutorizationModule().getSupportDelete())
buttons.add(new ImageButton("Confirm.action?header=tool.managementtool.deleteRole.header&yesDestination=" + yesDestination + "&noDestination=" + noDestination + "&message=tool.managementtool.deleteRole.text&extraParameters=" + encodedRoleName, getLocalizedString(getSession().getLocale(), "images.managementtool.buttons.deleteRole"), "tool.managementtool.deleteRole.header"));
List contentTypeDefinitionVOList = RolePropertiesController.getController().getContentTypeDefinitionVOList(this.roleName);
if(contentTypeDefinitionVOList.size() > 0)
buttons.add(new ImageButton("ViewRoleProperties.action?roleName=" + encodedRoleName, getLocalizedString(getSession().getLocale(), "images.managementtool.buttons.viewRoleProperties"), "View Role Properties"));