Project

General

Profile

« Previous | Next » 

Revision c4c36f8e

Added by Patrick Plitzner over 5 years ago

ref #7810 Fix creation of local specimen preferences

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/SpecimenAdminPreferences.java
25 25
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
26 26
import eu.etaxonomy.cdm.model.metadata.PreferenceSubject;
27 27
import eu.etaxonomy.taxeditor.l10n.Messages;
28
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
28 29
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
29 30
import eu.etaxonomy.taxeditor.preference.menu.CdmPreferencePage;
30 31
import eu.etaxonomy.taxeditor.store.CdmStore;
......
143 144
             @Override
144 145
             public void widgetSelected(SelectionEvent e) {
145 146
                 isUseLocalPreference = useLocalPreference.getSelection();
146

  
147
                 PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_SPECIMEN_ALLOW_OVERRIDE, isUseLocalPreference);
147 148
              }
148 149
         });
149 150
        return composite;
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/SpecimenOrObservationPreferences.java
29 29
 */
30 30
public class SpecimenOrObservationPreferences extends FieldEditorPreferencePageE4 {
31 31

  
32
    private static final String LOCAL_SETTINGS_NOT_ALLOWED = "The CDM settings don't allow to set the preferences for the display of specimen and obeservations locally. If you need to make local settings, please ask an administrator.";
33
    private static final String DESCRIPTION = "Set the preferences for the display of specimen and observations.";
34

  
32 35
    public SpecimenOrObservationPreferences(){
33 36
        super();
34 37
        setPreferenceStore(PreferencesUtil.getPreferenceStore());
35
        if (getPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY)){
36
            setDescription("Set the preferences for the display of specimen and obeservations.");
38
        if (getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SPECIMEN_ALLOW_OVERRIDE)){
39
            setDescription(DESCRIPTION);
37 40
        }else{
38
            setDescription("The CDM settings don't allow to set the preferences for the display of specimen and obeservations locally. If you need to make local settings, please ask an administrator.");
41
            setDescription(LOCAL_SETTINGS_NOT_ALLOWED);
39 42
        }
40 43
    }
41 44

  
......
63 66
            getPreferenceStore().setValue(IPreferenceKeys.SHOW_LIFE_FORM_ALLOW_OVERRIDE, prefTaxonAssociation == null? true : prefTaxonAssociation.isAllowOverride());
64 67
         }
65 68
        if (getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS_OVERRIDE)) {
66
            setDescription("Set the preferences for the display of specimen and obeservations.");
69
            setDescription(DESCRIPTION);
67 70
        }else{
68
            setDescription("The CDM settings don't allow to set the preferences for the display of specimen and obeservations locally. If you need to make local settings, please ask an administrator.");
71
            setDescription(LOCAL_SETTINGS_NOT_ALLOWED);
69 72

  
70 73
        }
71 74
    }

Also available in: Unified diff