private void restoreSearchCriteria() { OrderSetListSearchCriteriaVo searchCriteria = form.getGlobalContext().OCRR.getOrderSetListSearchCriteria(); if(searchCriteria == null) return; form.txtName().setValue(searchCriteria.getName()); form.cmbStatus().setValue(searchCriteria.getStatus()); }
private void buildSearchCriteria() { OrderSetListSearchCriteriaVo searchCriteria = new OrderSetListSearchCriteriaVo(); searchCriteria.setName(form.txtName().getValue()); searchCriteria.setStatus(form.cmbStatus().getValue()); form.getGlobalContext().OCRR.setOrderSetListSearchCriteria(searchCriteria); }
private boolean isValidSearchCriteria() { OrderSetListSearchCriteriaVo searchCriteria = form.getGlobalContext().OCRR.getOrderSetListSearchCriteria(); if(searchCriteria == null) return false; if(searchCriteria.getNameIsNotNull() && searchCriteria.getName().trim().length() > 0) return true; if(searchCriteria.getStatusIsNotNull()) return true; return false; }
private void search() { form.grdOrderSet().getRows().clear(); OrderSetListSearchCriteriaVo searchCriteria = form.getGlobalContext().OCRR.getOrderSetListSearchCriteria(); if(searchCriteria == null) return; if(!isValidSearchCriteria()) { form.getGlobalContext().OCRR.setOrderSetListSearchCriteria(null); engine.showMessage("Please Enter Some Search Criteria"); return; } OrderSetShortVoCollection records = domain.listOrderSets(searchCriteria); form.grdOrderSet().getRows().clear(); if(records == null || records.size() == 0) { engine.showMessage("There are no Records for the Search Criteria Provided"); setContextMenu(); //WDEV-16434 return; } populateScreenFromData(records); setContextMenu(); }