@Override public void prepare() { super.prepare(); addDropdownData("executingDepartmentList", departmentService.getAllDepartments()); estimateStatus = AbstractEstimate.EstimateStatus.ADMIN_SANCTIONED.toString(); }
public String searchList() { getPersistenceService().getSession().setDefaultReadOnly(true); getPersistenceService().getSession().setFlushMode(FlushMode.MANUAL); boolean isError = false; if (fromDate != null && toDate == null) { addFieldError("enddate", getText("search.endDate.null")); isError = true; } if (toDate != null && fromDate == null) { addFieldError("startdate", getText("search.startDate.null")); isError = true; } if (!DateUtils.compareDates(toDate, fromDate)) { addFieldError("enddate", getText("greaterthan.endDate.fromDate")); isError = true; } if (isError) { return "search"; } setPageSize(WorksConstants.PAGE_SIZE); super.search(); if (searchResult != null && searchResult.getList() != null && !searchResult.getList().isEmpty()) { setTenderType(); } return "search"; }