}
getLabelAndValues(vocs);
vocabularyCombo.select(0);
+ setVocUuidFromVocCombo();
vocabularyCombo.addSelectionListener(new SelectionAdapter(){
@Override
public void widgetSelected(SelectionEvent e) {
String name = vocabularyCombo.getText();
-
- for (String[] labelAndValue: labelAndValues){
- if (labelAndValue[0].equals(name)){
- String uuidString = labelAndValue[1];
- vocUuid = UUID.fromString(uuidString);
- setPageComplete(isPageComplete());
- }
+ setVocUuidFromVocCombo();
+ if (vocUuid != null){
+ setPageComplete(isPageComplete());
}
-
}
});
}
+ /**
+ * @return
+ */
+ private void setVocUuidFromVocCombo() {
+ String name = vocabularyCombo.getText();
+
+ for (String[] labelAndValue: labelAndValues){
+ if (labelAndValue[0].equals(name)){
+ String uuidString = labelAndValue[1];
+ vocUuid = UUID.fromString(uuidString);
+ }
+ }
+
+ }
+
public UUID getVocUuid() {
return vocUuid;
}