Revision e00acade
Added by Katja Luther about 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/AbstractIdentifiableEntityDetailElement.java | ||
---|---|---|
9 | 9 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
10 | 10 |
import eu.etaxonomy.cdm.model.common.IIdentifiableEntity; |
11 | 11 |
import eu.etaxonomy.cdm.persistence.hibernate.permission.CRUD; |
12 |
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys; |
|
13 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
|
14 | 12 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
15 | 13 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
16 | 14 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
... | ... | |
28 | 26 |
*/ |
29 | 27 |
private static final EnumSet<CRUD> UPDATE = EnumSet.of(CRUD.UPDATE); |
30 | 28 |
protected ToggleableTextElement toggleable_cache; |
31 |
protected boolean isAdvancedView ; |
|
29 |
|
|
32 | 30 |
|
33 | 31 |
public AbstractIdentifiableEntityDetailElement(CdmFormFactory formFactory, ICdmFormElement formElement) { |
34 | 32 |
super(formFactory, formElement); |
35 | 33 |
updateToggleableCacheState(); |
36 |
initIsAdvancedDetailsView(); |
|
34 |
|
|
37 | 35 |
|
38 | 36 |
} |
39 | 37 |
|
... | ... | |
67 | 65 |
toggleable_cache.setEnabled(getEntity() != null && CdmStore.currentAuthentiationHasPermission((CdmBase) getEntity(), UPDATE)); |
68 | 66 |
} |
69 | 67 |
} |
70 |
protected void initIsAdvancedDetailsView(){ |
|
71 |
if(PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){ |
|
72 |
isAdvancedView = false; |
|
73 |
} else{ |
|
74 |
isAdvancedView = true; |
|
75 |
} |
|
76 |
} |
|
68 |
|
|
77 | 69 |
|
78 | 70 |
|
79 | 71 |
} |
Also available in: Unified diff
use same saving strategie for local name details pref as for db name details pref