Project

General

Profile

« Previous | Next » 

Revision fc3e5e6e

Added by Katja Luther over 4 years ago

ref #8385: fixes in preferences - continue

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/databaseAdmin/preferencePage/ChecklistEditorGeneralAdminPreference.java
16 16
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
17 17
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
18 18
import eu.etaxonomy.cdm.model.metadata.PreferenceSubject;
19
import eu.etaxonomy.taxeditor.l10n.Messages;
20 19
import eu.etaxonomy.taxeditor.preference.ChecklistEditorGeneralPreference;
21 20
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
22 21
import eu.etaxonomy.taxeditor.store.CdmStore;
......
64 63
            service.set(pref);
65 64
        }
66 65

  
67
        if (displayStatus.startsWith(Messages.Preference_Use_Default)){
66
        if (displayStatus == null){
68 67
            service.remove(CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.DisplayOfStatus));
69 68
        }else{
70 69
            pref = CdmPreference.NewTaxEditorInstance( PreferencePredicate.DisplayOfStatus, this.displayStatus);
......
79 78
            pref.setAllowOverride(allowOverrideRankButton.getSelection());
80 79
            service.set(pref);
81 80
        }
82
        if (orderAreas.startsWith(Messages.Preference_Use_Default)){
81
        if (orderAreas == null){
83 82
            service.remove(CdmPreference.NewKey(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.AreasSortedInDistributionEditor));
84 83
        }else{
85 84
            pref = CdmPreference.NewTaxEditorInstance( PreferencePredicate.AreasSortedInDistributionEditor, this.orderAreas);
......
119 118
        if (prefAreaDisplay != null){
120 119
            this.displayArea = prefAreaDisplay.getValue();
121 120
        }else{
122
            this.displayArea = Messages.Preference_Use_Default;
121
            this.displayArea = null;
123 122
        }
124 123

  
125 124

  
126 125
        if (prefStatusDisplay != null){
127 126
            this.displayStatus = prefStatusDisplay.getValue();
128 127
        }else{
129
            this.displayStatus = Messages.Preference_Use_Default;
128
            this.displayStatus = null;
130 129
        }
131 130

  
132 131
        if (prefStatusDisplayInCombo != null){
133 132
            this.displayStatusCombo = prefStatusDisplayInCombo.getValue();
134 133
        }else{
135
            this.displayStatusCombo = Messages.Preference_Use_Default;
134
            this.displayStatusCombo = null;
136 135
        }
137 136

  
138 137

  
......
140 139
            if (prefAreaSort.getValue() != null){
141 140
                this.orderAreas = prefAreaSort.getValue().toString();
142 141
            }else{
143
                this.orderAreas = Messages.Preference_Use_Default;
142
                this.orderAreas = null;
144 143
            }
145 144

  
146 145
        }else{
147
            this.orderAreas = Messages.Preference_Use_Default;
146
            this.orderAreas = null;
148 147

  
149 148
        }
150 149

  
......
160 159
        if (prefOwnDescription != null){
161 160
            this.ownDescriptionForDistributionEditor = Boolean.valueOf(prefOwnDescription.getValue().toString());
162 161
        }else{
163
            this.ownDescriptionForDistributionEditor = Boolean.valueOf(PreferencePredicate.OwnDescriptionForDistributionEditor.getDefaultValue().toString());
162
            this.ownDescriptionForDistributionEditor = null;
164 163
        }
165 164

  
166 165

  

Also available in: Unified diff