@Transactional public void deleteFunction(Function function) { try { if (roleSysHome != null && function != null) { roleSysHome.getInstance().getFunctions().remove(function); String entityAction = roleSysHome.update(); if (entityAction.equalsIgnoreCase("updated")) { facesMessages.clear(); facesMessages.clearGlobalMessages(); } roleSysHome.refresh(); } } catch (Exception e) { System.out.println(e.getMessage()); } }
public String cancelAddFunction() { init(); roleSysHome.refresh(); return "cancel"; }