public void doBeforeComposeChildren(Component comp) throws Exception { super.doBeforeComposeChildren(comp); userOrgList = userOrgManager.getUserOrgIdListByStatus( StatusType.PENDING.getId(), StatusType.ACTIVE.getId()); }
public void onClick$btn_export() throws InterruptedException { try { Listbox listBox = new Listbox(); Listhead listHeader = new Listhead(); for (Object o : lb_user_org_list.getChildren()) { if (o instanceof Listhead) { Listhead head = (Listhead) o; for (Object o1 : head.getChildren()) { if (o1 instanceof Listheader) { Listheader header = (Listheader) o1; Listheader newHeader = new Listheader(header.getLabel()); newHeader.setParent(listHeader); } } listHeader.setParent(listBox); } } listBox.setModel( new ListModelList(userOrgManager.getUserOrgListByID(bb_user_org.getValue()))); ExportUtil.exportToExcel( globalUtils.getGlobalPropValue(Commons.SCREEN_USER_ORG_SEARCH), listBox); } catch (Exception e) { e.printStackTrace(); GlobalUtils.showMessage( globalUtils.getMessagePropValue(Commons.ERR_MSG_EXPORT), globalUtils.getGlobalPropValue(Commons.MSG_HEADER_ERROR), Messagebox.OK, Messagebox.ERROR); } }
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; } }
public void searchUserOrg(String orgID) { userOrgList = userOrgManager.getUserOrgIdListByID(orgID); ListModelList model = new ListModelList(userOrgList); lb_user_org_list.setModel(model); }