@Override protected void onGrdAssessmentsSelectionChanged() { if (form.grdAssessments().getValue() instanceof OtherAssessmentSummaryVo) { form.getLocalContext().setSelectedRecord(form.grdAssessments().getValue()); populateScreenFromData(form.getLocalContext().getSelectedRecord()); form.ctnDetails().setCollapsed(false); } }
@Override protected void populateScreenFromData(OtherAssessmentSummaryVo value) { clearInstanceControls(); if (value == null) return; super.populateScreenFromData(value); form.ctnDetails().ccBy().setValue(value.getCarriedOutBy()); }
@Override protected OtherAssessmentSummaryVo populateDataFromScreen(OtherAssessmentSummaryVo value) { value = super.populateDataFromScreen(value); value.setCarriedOutBy((HcpLiteVo) form.ctnDetails().ccBy().getValue()); if (!value.getID_OtherAssessmentSummaryIsNotNull()) { value.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); } return value; }
private void populateListScreenFromData(OtherAssessmentSummaryVoCollection listOtherAssessments) { clear(); if (listOtherAssessments == null) return; for (int i = 0 ; i < listOtherAssessments.size() ; i++) { OtherAssessmentSummaryVo assessmentVo = listOtherAssessments.get(i); if (assessmentVo == null) continue; addRowToGrid(assessmentVo); } }
private grdAssessmentsRow addRowToGrid(OtherAssessmentSummaryVo assessmentVo) { grdAssessmentsRow newRow = form.grdAssessments().getRows().newRow(); newRow.setValue(assessmentVo); newRow.setColumnDate(assessmentVo.getAssessmentDateIsNotNull()?assessmentVo.getAssessmentDate().toString():null); newRow.setColumnName(assessmentVo.getAssessmentNameIsNotNull()?assessmentVo.getAssessmentName().getText():null); newRow.setColumnBy(assessmentVo.getCarriedOutByIsNotNull()?assessmentVo.getCarriedOutBy().getIHcpName():null); newRow.setColumnScore(assessmentVo.getScoreIsNotNull()?assessmentVo.getScore():null); return newRow; }