Revision cc1302bd
Added by Katja Luther almost 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/AvailableVocabularyWizard.java | ||
---|---|---|
84 | 84 |
Object[] checkedElements = aPage.getViewer().getCheckedElements(); |
85 | 85 |
|
86 | 86 |
ArrayList<UUID> listUIIDChecked = new ArrayList<UUID>(); |
87 |
int countChecked = 0; |
|
87 | 88 |
for (Object o : checkedElements) { |
88 | 89 |
if(o instanceof TermVocabularyDto){ |
89 | 90 |
TermVocabularyDto vocDto = (TermVocabularyDto) o; |
90 | 91 |
listUIIDChecked.add(vocDto.getUuid()); |
92 |
countChecked++; |
|
91 | 93 |
} |
92 | 94 |
} |
93 | 95 |
String saveCheckedElements = StringUtils.join(listUIIDChecked, ";"); //$NON-NLS-1$ |
94 |
|
|
96 |
int countVoc = aPage.getVocabularies().size(); |
|
95 | 97 |
String predicate = null; |
96 | 98 |
pref = aPage.getPreference(); |
97 | 99 |
if (pref != null){ |
... | ... | |
99 | 101 |
} |
100 | 102 |
|
101 | 103 |
if (!localPref){ |
102 |
if (StringUtils.isBlank(saveCheckedElements)){ |
|
104 |
if (StringUtils.isBlank(saveCheckedElements) || countChecked == countVoc){
|
|
103 | 105 |
saveCheckedElements = null; |
104 | 106 |
} |
105 | 107 |
CdmPreference savePref = CdmPreference.NewInstance(PreferenceSubject.NewTaxEditorInstance(), PreferencePredicate.getByKey(predicate), saveCheckedElements); |
Also available in: Unified diff
ref #8045: check whether all db preferences are deleted from DB if value is default value