private void populateGrid(DischargeSummaryScheduleVo dischargeSummary) { if (dischargeSummary == null) return; form.grdList().getRows().clear(); FailedEmailsDetailsVoCollection failedEmails = dischargeSummary.getFailedEmails(); for (int j = 0 ; failedEmails != null && j < failedEmails.size() ; j++) { FailedEmailsDetailsVo failedEmail = failedEmails.get(j); grdListRow row = form.grdList().getRows().newRow(); row.setValue(failedEmail); if (failedEmail.getJobTypeIsNotNull()) row.setColJobType(failedEmail.getJobType().getText()); if (failedEmail.getGPNameIsNotNull()) row.setColGPName(failedEmail.getGPName()); if (failedEmail.getEmailAddressIsNotNull()) row.setColEmailAddress(failedEmail.getEmailAddress()); if (failedEmail.getPatientNameIsNotNull()) row.setColPatient(failedEmail.getPatientName()); if (failedEmail.getInitialDateTimeIsNotNull()) row.setColInitialDateTime(failedEmail.getInitialDateTime().toString()); if (failedEmail.getFailedDateTimeIsNotNull()) row.setColFailedDateTime(failedEmail.getFailedDateTime().toString()); if (failedEmail.getSuccessfulDateTimeIsNotNull()) row.setColSuccessfulSent(failedEmail.getSuccessfulDateTime().toString()); } }