Revision eaa9ba52
Added by Patrick Plitzner over 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java | ||
---|---|---|
477 | 477 |
@Override |
478 | 478 |
public void widgetSelected(SelectionEvent e) { |
479 | 479 |
|
480 |
AbstractNewEntityWizard wizard = getNewEntityWizard(e.text); |
|
481 |
|
|
482 |
wizard.init(null, null); |
|
483 |
if(wizard.getEntity() != null) { |
|
484 |
WizardDialog dialog = new WizardDialog(getShell(), wizard); |
|
485 |
int status = dialog.open(); |
|
486 |
|
|
487 |
if (status == IStatus.OK) { |
|
488 |
|
|
489 |
T entity = (T) wizard.getEntity(); |
|
490 |
model.add(new UuidAndTitleCache<T>(entity.getUuid(), |
|
491 |
entity.getId(), |
|
492 |
getTitle(entity))); |
|
493 |
refresh(); |
|
494 |
setPattern(entity); |
|
495 |
getConversationHolder().bind(); |
|
496 |
} |
|
497 |
//FIXME : Need to make sure this is a stable fix (ticket 3822) |
|
498 |
getConversationHolder().commit(); |
|
499 |
} |
|
480 |
AbstractNewEntityWizard wizard = getNewEntityWizard(e.text); |
|
481 |
if(wizard!=null){ |
|
482 |
wizard.init(null, null); |
|
483 |
if(wizard.getEntity() != null) { |
|
484 |
WizardDialog dialog = new WizardDialog(getShell(), wizard); |
|
485 |
int status = dialog.open(); |
|
486 |
|
|
487 |
if (status == IStatus.OK) { |
|
488 |
|
|
489 |
T entity = (T) wizard.getEntity(); |
|
490 |
model.add(new UuidAndTitleCache<T>(entity.getUuid(), |
|
491 |
entity.getId(), |
|
492 |
getTitle(entity))); |
|
493 |
refresh(); |
|
494 |
setPattern(entity); |
|
495 |
getConversationHolder().bind(); |
|
496 |
} |
|
497 |
//FIXME : Need to make sure this is a stable fix (ticket 3822) |
|
498 |
getConversationHolder().commit(); |
|
499 |
} |
|
500 |
} |
|
500 | 501 |
} |
501 | 502 |
}; |
502 | 503 |
} |
Also available in: Unified diff
Allow creating new taxa in taxon selection dialog #2402