Project

General

Profile

« Previous | Next » 

Revision 9e44d75d

Added by Katja Luther over 6 years ago

fix #6974: set vocUUid at the beginning to the uuid of the preselected vocabulary

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/e4/in/ImportFromFileAndChooseVocIdWizardPageE4.java
66 66
        }
67 67
        getLabelAndValues(vocs);
68 68
        vocabularyCombo.select(0);
69
        setVocUuidFromVocCombo();
69 70
        vocabularyCombo.addSelectionListener(new SelectionAdapter(){
70 71

  
71 72
            @Override
72 73
            public void widgetSelected(SelectionEvent e) {
73 74
                String name = vocabularyCombo.getText();
74

  
75
                for (String[] labelAndValue: labelAndValues){
76
                    if (labelAndValue[0].equals(name)){
77
                        String uuidString = labelAndValue[1];
78
                        vocUuid = UUID.fromString(uuidString);
79
                        setPageComplete(isPageComplete());
80
                    }
75
                setVocUuidFromVocCombo();
76
                if (vocUuid != null){
77
                    setPageComplete(isPageComplete());
81 78
                }
82

  
83 79
            }
84 80

  
85 81
        });
86 82
    }
87 83

  
84
    /**
85
     * @return
86
     */
87
    private void setVocUuidFromVocCombo() {
88
        String name = vocabularyCombo.getText();
89

  
90
        for (String[] labelAndValue: labelAndValues){
91
            if (labelAndValue[0].equals(name)){
92
                String uuidString = labelAndValue[1];
93
                vocUuid = UUID.fromString(uuidString);
94
            }
95
        }
96

  
97
    }
98

  
88 99
    public UUID getVocUuid() {
89 100
        return vocUuid;
90 101
    }

Also available in: Unified diff