Project

General

Profile

Revision fab52cf2

IDfab52cf2e9a0cbd4a12e5386c72d6e45eb8abf79
Parent cec27740
Child 44bc51cb

Added by Katja Luther about 1 year ago

ref #7849: check all voc if no pref exist

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/AbstractTermSelectionWizardPage.java
85 85

  
86 86
    protected void rememberCheckedValues(String checkedValues) {
87 87
        initialiseVocabularies();
88

  
88 89
        treeComposite.getViewer().setInput(getVocabularies());
89 90

  
90 91
        if (checkedValues != null && checkedValues != "") { //$NON-NLS-1$
......
103 104
        }
104 105
    }
105 106

  
106
    private List<AbstractTermDto> getTermsFromStringValues(List<String> listValue) {
107
    protected List<AbstractTermDto> getTermsFromStringValues(List<String> listValue) {
107 108
        List<AbstractTermDto> termlist = new ArrayList<>();
108 109
        for (String s : listValue) {
109 110
            if (!StringUtils.isBlank(s)){
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/AvailableAreaVocabulariesPage.java
8 8
*/
9 9
package eu.etaxonomy.taxeditor.preference.wizard;
10 10

  
11
import java.util.ArrayList;
12
import java.util.Arrays;
11 13
import java.util.Collection;
12 14
import java.util.List;
13 15
import java.util.Map;
......
18 20
import eu.etaxonomy.cdm.model.common.CdmBase;
19 21
import eu.etaxonomy.cdm.model.common.TermType;
20 22
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
23
import eu.etaxonomy.cdm.persistence.dto.AbstractTermDto;
21 24
import eu.etaxonomy.cdm.persistence.dto.TermVocabularyDto;
22 25
import eu.etaxonomy.taxeditor.editor.definedterm.RootElementsOnlyTreeContentProvider;
23 26
import eu.etaxonomy.taxeditor.l10n.Messages;
......
98 101
        // TODO Auto-generated method stub
99 102
        return null;
100 103
    }
104
    @Override
105
    protected void rememberCheckedValues(String checkedValues) {
106
        initialiseVocabularies();
107

  
108
        treeComposite.getViewer().setInput(getVocabularies());
109

  
110
        if (checkedValues != null && checkedValues != "") { //$NON-NLS-1$
111
            String[] listChecked = checkedValues.split(";"); //$NON-NLS-1$
112
            String[] listCheckedComma = checkedValues.split(","); //$NON-NLS-1$
113
            List<String> checked = new ArrayList<>();
114
            if (listChecked != null ){
115
                checked = Arrays.asList(listChecked);
116
            }
117
            if (listCheckedComma != null && checkedValues.contains(",")){ //$NON-NLS-1$
118
                checked = Arrays.asList(listCheckedComma);
119
            }
120
            List<AbstractTermDto> termsFromStringValues = getTermsFromStringValues(checked);
121
            treeComposite.setCheckedElements(termsFromStringValues.toArray());
122

  
123
        }else{
124

  
125
            treeComposite.getViewer().setAllChecked(true);
126
        }
127
    }
101 128

  
102 129

  
103 130

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)