@Override
public Page createPage() {
RoleTO roleTO = new RoleTO();
roleTO.setParent(idRole);
RoleModalPage form = new RoleModalPage(callerPageRef, window, roleTO);
return form;
}
});
window.show(target);
}
};
MetaDataRoleAuthorizationStrategy.authorize(createRoleLink, ENABLE, xmlRolesReader.getAllAllowedRoles("Roles",
"create"));
fragment.add(createRoleLink);
if (idRole != 0) {
AjaxLink updateRoleLink = new IndicatingAjaxLink("updateRoleLink") {
@Override
public void onClick(final AjaxRequestTarget target) {
window.setPageCreator(new ModalWindow.PageCreator() {
private static final long serialVersionUID = -7834632442532690940L;
@Override
public Page createPage() {
RoleTO roleTO = restClient.readRole(idRole);
RoleModalPage form = new RoleModalPage(callerPageRef, window, roleTO);
return form;
}
});
window.show(target);