"Roles", "read"));
updateRoleLink.setOutputMarkupId(true);
fragment.add(updateRoleLink);
final AjaxLink dropRoleLink = new IndicatingDeleteOnConfirmAjaxLink("dropRoleLink", pageRef) {
private static final long serialVersionUID = -7978723352517770644L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
try {
final RoleTO roleTO = (RoleTO) restClient.delete(idRole);
((Roles) pageRef.getPage()).setModalResult(true);
window.setPageCreator(new ModalWindow.PageCreator() {
private static final long serialVersionUID = -7834632442532690940L;
@Override
public Page createPage() {
return new ResultStatusModalPage.Builder(window, roleTO).build();
}
});
window.show(target);
} catch (SyncopeClientCompositeErrorException scce) {
error(getString(Constants.OPERATION_ERROR) + ": " + scce.getMessage());
target.add(((Roles) pageRef.getPage()).getFeedbackPanel());
}
}
};
MetaDataRoleAuthorizationStrategy.authorize(dropRoleLink, ENABLE, xmlRolesReader.getAllAllowedRoles(
"Roles", "delete"));
dropRoleLink.setOutputMarkupId(true);
fragment.add(dropRoleLink);
}
add(fragment);
}