public DataValue getDataValue() { if (_selectedCode != null) { Term term = _controller.getCurrentTermDefinition().getTerms().get(_selectedCode); return new DvCodedText(term.getText(), OpenEHRConst.LOCAL, _selectedCode); } else { return null; } }
private void setSelection(String selectedCode) { _selectedCode = selectedCode; Term term = null; if (_selectedCode != null) { term = _controller.getCurrentTermDefinition().getTerms().get(selectedCode); if (term != null) { getCodedTextButton().setText(term.getText()); getCodedTextButton().setToolTipText(term.getDescription()); } } if (term == null) { String label = OpenEHRLanguageManager.getMessage("SelectTerm"); getCodedTextButton().setText(label); getCodedTextButton().setToolTipText(label); } }