@Override protected void onBtnSaveClick() throws ims.framework.exceptions.PresentationLogicException { IClinicalCodingValue result = form.customControlCodingItem().getValue(); String[] errors = validateUIRules(); if (errors != null && errors.length > 0) { engine.showErrors(errors); return; } ValueObject vo = result.getIClinicalCodingValue(); if(vo instanceof ProcedureLiteVo) { SubProceduresVo voSub = new SubProceduresVo(); voSub.setProcedure((ProcedureLiteVo) result.getIClinicalCodingValue()); voSub.setSubProcedureDescription(result.getIClinicalCodingValueDescription()); form.getGlobalContext().Clinical.setSelectedSubProcedure(voSub); } else { throw new CodingRuntimeException("ProcedureLiteVo expected from component"); } engine.close(DialogResult.OK); }