private RACPMedicationAtTestCollection populateMedicationAtTestFromGrd() { RACPMedicationAtTestCollection collRACPMedicationAtTest = new RACPMedicationAtTestCollection(); for (int i = 0; i < form.grdMeds().getRows().size(); i++) { grdMedsRow row = form.grdMeds().getRows().get(i); if(row.getcolSelect()) collRACPMedicationAtTest.add(row.getValue()); } if(collRACPMedicationAtTest.size()==0) return null; return collRACPMedicationAtTest; }