@Override protected void onFormOpen(Object[] args) throws ims.framework.exceptions.PresentationLogicException { if( form.getGlobalContext().Oncology.getSelectedDiagnosisForPrimaryTumourDetailsIsNotNull() && form.getGlobalContext().Oncology.getSelectedDiagnosisForPrimaryTumourDetails().getBasisofDiagnosisIsNotNull() ) { for(int i = 0 ; i < form.getGlobalContext().Oncology.getSelectedDiagnosisForPrimaryTumourDetails().getBasisofDiagnosis().size() ; i++) { DiagnosisBasisofDiagnosis basisVo = form.getGlobalContext().Oncology.getSelectedDiagnosisForPrimaryTumourDetails().getBasisofDiagnosis().get(i); form.chklistBasis().newRow(basisVo, basisVo.getText()); } } }
@Override protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException { DiagnosisBasisofDiagnosis[] selectedValues = form.chklistBasis().getValues(); if (selectedValues == null || selectedValues.length == 0) { engine.showMessage("Please either choose a Basis of Diagnosis or Cancel.", "Warning", MessageButtons.OK, MessageIcon.WARNING); return; } form.getGlobalContext().Oncology.setSelectedBasisOfDiagnosis(selectedValues[0]); engine.close(DialogResult.OK); }