public void doBeforeComposeChildren(Component comp) throws Exception { super.doBeforeComposeChildren(comp); userOrgList = userOrgManager.getUserOrgIdListByStatus( StatusType.PENDING.getId(), StatusType.ACTIVE.getId()); }
public boolean deleteSelectedUserOrg(String userOrgID) throws ParseException { UserOrganization userOrg = userOrgManager.findById(userOrgID); if (userOrg.getStatus() == StatusType.PENDING.getId()) { return false; } else { userOrg.setStatus(StatusType.PENDING.getId()); userOrg.setAction(ActionType.DELETE.getId()); Date date = DateUtil.getCurrentDate(); userOrg.setLastModifiedBy(securityUtils.getUserName()); userOrg.setDateLastModified(date); if (userOrgManager.update(userOrg)) { TempUserOrganization tempUserOrg = new TempUserOrganization(userOrg); tempUserOrg.setStatus(StatusType.PENDING.getId()); tempUserOrg.setAction(ActionType.DELETE.getId()); tempUserOrg.setLastModifiedBy(securityUtils.getUserName()); tempUserOrg.setDateLastModified(date); return tempUserOrgManager.save(tempUserOrg); } return false; } }