private void populateSpecimenCombo() { SpecimenTypeCollection specimenTypes = LookupHelper.getSpecimenType(domain.getLookupService()); for (int i = 0; specimenTypes != null && i < specimenTypes.size(); i++) { form.cmbSpecimenType().newRow(specimenTypes.get(i), specimenTypes.get(i).getText()); } }
private void open() { clearInstanceControls(); form.grdList().getRows().clear(); ResultSpecimenTypesVoCollection voCollResSpecTypes = domain.listResultSpecimenTypes(); SpecimenTypeCollection collTypes = LookupHelper.getSpecimenType(domain.getLookupService()); for(int i=0;i<collTypes.size(); i++) { grdListRow row = form.grdList().getRows().newRow(); row.setColSpecimenType(collTypes.get(i)); //if lookup is already used in persisted record set the value for the row if(voCollResSpecTypes != null) { for(ResultSpecimenTypesVo instance : voCollResSpecTypes) { if(instance.getSpecimenType().equals(collTypes.get(i))) row.setValue(instance); } } } form.setMode(FormMode.VIEW); }