private List<T> customPreferredTerms;
+ private boolean useAbbrevLabel = false;
private boolean addEmptyElement;
public TermComboElement(CdmFormFactory formFactory,
ICdmFormElement parentElement, TermType termType, String labelString, T selection, boolean addEmptyElement,
- int style) {
- this(formFactory, parentElement, null, termType, null, labelString, selection, addEmptyElement, style);
+ int style, boolean useAbbrevLabel) {
+ this(formFactory, parentElement, null, termType, null, labelString, selection, addEmptyElement, style, useAbbrevLabel);
}
public TermComboElement(CdmFormFactory formFactory,
ICdmFormElement parentElement, TermVocabulary<?> termVocabulary, String labelString, T selection, boolean addEmptyElement,
int style) {
- this(formFactory, parentElement, null, null, termVocabulary, labelString, selection, addEmptyElement, style);
+ this(formFactory, parentElement, null, null, termVocabulary, labelString, selection, addEmptyElement, style, false);
}
public TermComboElement(CdmFormFactory formFactory,
ICdmFormElement parentElement, Class<T> termClass, String labelString, T selection, boolean addEmptyElement,
int style) {
- this(formFactory, parentElement, termClass, null, null, labelString, selection, addEmptyElement, style);
+ this(formFactory, parentElement, termClass, null, null, labelString, selection, addEmptyElement, style, false);
+ }
+ public TermComboElement(CdmFormFactory formFactory,
+ ICdmFormElement parentElement, Class<T> termClass, String labelString, T selection, boolean addEmptyElement,
+ int style, boolean useAbbrevLabel) {
+ this(formFactory, parentElement, termClass, null, null, labelString, selection, addEmptyElement, style, useAbbrevLabel);
+
}
private TermComboElement(CdmFormFactory formFactory,
ICdmFormElement parentElement, Class<T> termClass, TermType termType, TermVocabulary<?> termVocabulary, String labelString, T selection, boolean addEmptyElement,
- int style) {
+ int style, boolean useAbbrevLabel) {
super(formFactory, parentElement);
this.termType = termType;
this.termVocabulary = termVocabulary;
this.termClass = termClass;
this.addEmptyElement = addEmptyElement;
-
+ this.useAbbrevLabel = useAbbrevLabel;
if (labelString != null) {
label.setText(labelString);
}
if (term == null){
return "";
}else{
- String termLabel = term.getLabel(CdmStore.getDefaultLanguage());
+ String termLabel = null;
+ if (useAbbrevLabel){
+ termLabel = term.getIdInVocabulary();
+ }else{
+ termLabel = term.getLabel(CdmStore.getDefaultLanguage());
+ }
if (termLabel == null){
termLabel = term.getLabel();
}