@Transactional public void deleteRole(RoleSys role) { try { if (role != null && role.getRoleId() != 0) { roleSysNewHome.clearInstance(); roleSysNewHome.setRoleNewHomeId(role.getRoleId()); roleSysNewHome.wire(); String entityAction = roleSysNewHome.remove(); if (entityAction.equalsIgnoreCase("removed")) { facesMessages.clear(); facesMessages.clearGlobalMessages(); } roleSysNewHome.clearInstance(); // staffHome.refresh(); } } catch (Exception e) { System.out.println(e.getMessage()); } }
// Ajax public void prepareEditRole(RoleSys role) { if (role != null) { roleSysNewHome.setInstance(role); roleSysNewHome.wire(); addNew = true; } }