Revision d98abaef
Added by Patrick Plitzner almost 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractCdmDetailSection.java | ||
---|---|---|
29 | 29 |
import eu.etaxonomy.cdm.model.description.TextData; |
30 | 30 |
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase; |
31 | 31 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
32 |
import eu.etaxonomy.taxeditor.store.StoreUtil; |
|
32 | 33 |
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection; |
33 | 34 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
34 | 35 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
... | ... | |
74 | 75 |
} |
75 | 76 |
} |
76 | 77 |
|
78 |
@Override |
|
79 |
public void setText(String title) { |
|
80 |
super.setText(StoreUtil.cleanTitleString(title)); |
|
81 |
} |
|
82 |
|
|
77 | 83 |
protected void createControlsByType(AbstractCdmDetailSection<ENTITY> formElement, Class<ENTITY> entityClass, int style) { |
78 | 84 |
TableWrapLayout layout = (TableWrapLayout) getLayoutComposite().getLayout(); |
79 | 85 |
layout.topMargin = 10; |
... | ... | |
159 | 165 |
label =((IdentifiableEntity) getEntity()).getTitleCache(); |
160 | 166 |
} |
161 | 167 |
title = ": " + label; |
162 |
|
|
163 |
// we have to duplicate ampersands otherwise they are treated as |
|
164 |
// mnenomic (see Label.setText() documentation) |
|
165 |
// see also #4302 |
|
166 |
title = title.replace("&", "&&"); |
|
167 | 168 |
} |
168 | 169 |
this.setText(String.format("%s%s", getHeading(), title)); |
169 | 170 |
setTextClient(createToolbar()); |
Also available in: Unified diff
ref #4302 Escape '&' in section titles