/** * Go to detail page * * @return forward to DETAIL page */ public String detail() { Integer id = Integer.parseInt(FacesUtils.getRequestParameter(ROW_ID)); tag = manager.getEntityById(id); return SpringUtils.isAclPermissionGranted(tag, BasePermission.WRITE) ? NavigationResults.EDIT : NavigationResults.DETAIL; }
/** * Whether or not delete button is available for user * * @return true if user can delete current object */ public boolean isDeleteAvailable() { return (tag.getId() != null) && SpringUtils.isAclPermissionGranted(tag, BasePermission.DELETE); }
/** * Whether or not edit button is available for user * * @return true if user can edit current object */ public boolean isEditAvailable() { return SpringUtils.isAclPermissionGranted(tag, BasePermission.WRITE); }