Revision 9ef8582f
Added by Patrick Plitzner over 5 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/association/TaxonAssociationDetailElement.java | ||
---|---|---|
57 | 57 |
/** {@inheritDoc} */ |
58 | 58 |
@Override |
59 | 59 |
protected void createControls(ICdmFormElement formElement, DerivedUnitFacade entity, int style) { |
60 |
//FIXME constructor code is just copied to update method |
|
61 |
//this has to be separated so that the elements are only once created in the constructor |
|
62 |
//and updated in the update() method |
|
63 |
this.update(entity); |
|
64 |
} |
|
65 |
|
|
66 |
@Override |
|
67 |
protected void update(DerivedUnitFacade entity) { |
|
68 |
super.update(entity); |
|
60 | 69 |
Collection<TaxonBase<?>> associatedTaxa = CdmStore.getService(IOccurrenceService.class).listIndividualsAssociationTaxa(entity.innerDerivedUnit(), null, null, null, null); |
61 | 70 |
Collection<SpecimenTypeDesignation> typeDesignations = CdmStore.getService(IOccurrenceService.class).listTypeDesignations(entity.innerDerivedUnit(), null, null, null, null); |
62 | 71 |
Collection<DeterminationEvent> determinationEvents = CdmStore.getService(IOccurrenceService.class).listDeterminationEvents(entity.innerDerivedUnit(), null, null, null, null); |
... | ... | |
106 | 115 |
MenuItem openInItem = new MenuItem(menu, SWT.PUSH); |
107 | 116 |
openInItem.setText("Open"); |
108 | 117 |
if(cdmBase.isInstanceOf(SpecimenTypeDesignation.class)){ |
109 |
openInItem.setData(HibernateProxyHelper.deproxy(cdmBase, SpecimenTypeDesignation.class));
|
|
118 |
openInItem.setData(HibernateProxyHelper.deproxy(cdmBase, SpecimenTypeDesignation.class));
|
|
110 | 119 |
} |
111 | 120 |
openInItem.setData(cdmBase); |
112 | 121 |
openInItem.addSelectionListener(new SelectionListener() { |
113 |
|
|
114 |
@Override
|
|
115 |
public void widgetSelected(SelectionEvent e) {
|
|
116 |
new CdmViewerChooser(TaxonAssociationDetailElement.this.getLayoutComposite().getShell()).chooseViewer(e.widget.getData());
|
|
117 |
}
|
|
118 |
@Override
|
|
119 |
public void widgetDefaultSelected(SelectionEvent e) {
|
|
120 |
}
|
|
122 |
|
|
123 |
@Override
|
|
124 |
public void widgetSelected(SelectionEvent e) {
|
|
125 |
new CdmViewerChooser(TaxonAssociationDetailElement.this.getLayoutComposite().getShell()).chooseViewer(e.widget.getData());
|
|
126 |
}
|
|
127 |
@Override
|
|
128 |
public void widgetDefaultSelected(SelectionEvent e) {
|
|
129 |
}
|
|
121 | 130 |
}); |
122 | 131 |
styledTextWidget.setMenu(menu); |
123 | 132 |
} |
Also available in: Unified diff
ref #6554 Cache form section for taxon and derived unit details view