private void populateForm(AdmissionAssessmentVo voAdmissionAssessment) { if(voAdmissionAssessment != null) { form.gridAssessment().getRows().clear(); form.gridCarePlans().getRows().clear(); GenForm.gridAssessmentRow row; row = form.gridAssessment().getRows().newRow(); if (voAdmissionAssessment.getDateTimeInitiated() != null) row.setColAssessmentDate(voAdmissionAssessment.getDateTimeInitiated().toString()); if (voAdmissionAssessment.getAssessmentType() != null) row.setColAssessmentType(voAdmissionAssessment.getAssessmentType().getText()); if (voAdmissionAssessment.getHcpInitiated() != null) row.setColInitiationHCP(voAdmissionAssessment.getHcpInitiated().toString()); row.setValue(voAdmissionAssessment); GenForm.gridCarePlansRow row1; AssessmentComponentCarePlans voAssessmentComponentCarePlans = null; if (voAdmissionAssessment.getComponentCarePlans() != null) { for (int i=0; i<voAdmissionAssessment.getComponentCarePlans().size(); i++) { voAssessmentComponentCarePlans = voAdmissionAssessment.getComponentCarePlans().get(i); row1 = form.gridCarePlans().getRows().newRow(); if (voAssessmentComponentCarePlans.getTitle() != null) row1.setcolTitle(voAssessmentComponentCarePlans.getTitle()); if (voAssessmentComponentCarePlans.getAssessmentComponent().getComponentType() != null) row1.setcolAssessment(voAssessmentComponentCarePlans.getAssessmentComponent().getComponentType().getText()); row1.setcolStatus(voAssessmentComponentCarePlans.getCurrentCarePlanStatus().getStatus().getText()); row1.setValue(voAssessmentComponentCarePlans); } } form.gridCarePlans().sort(2, SortOrder.ASCENDING); } }