? "fakerootFrag"
: "roleFrag", this);
fragment.setOutputMarkupId(true);
final AjaxLink createRoleLink = new ClearIndicatingAjaxLink("createRoleLink", pageRef) {
private static final long serialVersionUID = -7978723352517770644L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
window.setPageCreator(new ModalWindow.PageCreator() {
private static final long serialVersionUID = -7834632442532690940L;
@Override
public Page createPage() {
RoleTO roleTO = new RoleTO();
roleTO.setParent(idRole);
RoleModalPage form = new RoleModalPage(pageRef, window, roleTO);
return form;
}
});
window.show(target);
}
};
MetaDataRoleAuthorizationStrategy.authorize(createRoleLink, ENABLE, xmlRolesReader.getAllAllowedRoles("Roles",
"create"));
createRoleLink.setOutputMarkupId(true);
fragment.add(createRoleLink);
if (idRole != 0) {
final AjaxLink updateRoleLink = new ClearIndicatingAjaxLink("updateRoleLink", pageRef) {
private static final long serialVersionUID = -7978723352517770644L;
@Override
protected void onClickInternal(final AjaxRequestTarget target) {
window.setPageCreator(new ModalWindow.PageCreator() {
private static final long serialVersionUID = -7834632442532690940L;
@Override
public Page createPage() {
RoleTO roleTO = restClient.read(idRole);
RoleModalPage form = new RoleModalPage(pageRef, window, roleTO);
return form;
}
});
window.show(target);
}
};
MetaDataRoleAuthorizationStrategy.authorize(updateRoleLink, ENABLE, xmlRolesReader.getAllAllowedRoles(
"Roles", "read"));
updateRoleLink.setOutputMarkupId(true);
fragment.add(updateRoleLink);
final AjaxLink dropRoleLink = new IndicatingDeleteOnConfirmAjaxLink("dropRoleLink", pageRef) {
private static final long serialVersionUID = -7978723352517770644L;