public void search() { PracticeSearchCriteriaVo criteria = new PracticeSearchCriteriaVo(); if(form.chkActive().getValue() == true) criteria.setIsActive(new Boolean(form.chkActive().getValue())); criteria.setTaxonomyCode(form.txtCode().getValue()); criteria.setTaxonomyType(form.cmbType().getValue()); criteria.setName(form.txtName().getValue()); criteria.setAddress(form.txtAddress().getValue()); OrganisationWithSitesVoCollection listPractice = domain.listPractice(criteria); populateGridFromData(listPractice); if(listPractice == null || listPractice.size() == 0) { engine.showMessage("No records found matching the search criteria"); } }
private void populateGridFromData(OrganisationWithSitesVoCollection voCollPractices) { form.grdSearch().getRows().clear(); if(voCollPractices == null) return; for (int i = 0; i < voCollPractices.size(); i++) { OrganisationWithSitesVo organisationWithSitesVo = voCollPractices.get(i); addPracticeToGrid(organisationWithSitesVo, form.grdSearch().getRows().newRow()); } }