private void populateSymptomsFromGrid(RACPSymptomRiskFactorsVo symptomRiskFactorsVo) { RACPSymptomsVoCollection collRACPSymptomsVo = new RACPSymptomsVoCollection(); symptomRiskFactorsVo.setSymptoms(null); for (int i = 0; i < form.grdSymptoms().getRows().size(); i++) { grdSymptomsRow row = form.grdSymptoms().getRows().get(i); if(row.getcolFinding().getValue()!=null){ RACPSymptomsVo voRACPSymptoms = new RACPSymptomsVo (); voRACPSymptoms.setRAPCSymptom(row.getcolSymp()); voRACPSymptoms.setRACPCFinding((RACPSymptom) row.getcolFinding().getValue()); collRACPSymptomsVo.add(voRACPSymptoms); } } if(collRACPSymptomsVo.size()>0) symptomRiskFactorsVo.setSymptoms(collRACPSymptomsVo); }