import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.description.DescriptionElementSource;
+import eu.etaxonomy.cdm.model.name.TaxonName;
+import eu.etaxonomy.cdm.model.reference.NamedSourceBase;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.SecundumSource;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
*/
public class SecundumSourceElement extends OriginalSourceElement<SecundumSource> {
+ protected EntitySelectionElement<TaxonName> select_nameUsedInSource;
/**
* @param formFactory
* @param formElement
Label sep = formFactory.createLabel(formElement.getLayoutComposite(), "");
sep.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
-
+
+ select_nameUsedInSource = formFactory.createSelectionElement(TaxonName.class, formElement, "Name in Source", entity != null? ((NamedSourceBase)entity).getNameUsedInSource(): null, EntitySelectionElement.DELETABLE, style);
+// select_nameUsedInSource.setBackground(background);
externalLinks = formFactory.createExternalLinksSection(getConversationHolder(), formElement, "Links", false, StoreUtil.getSectionStyle(ExternalLinksSection.class, DescriptionElementSource.class.getCanonicalName()));
externalLinks.setEmptySectionString("No links yet.");
// addElement(advancedSection);
this.getLayoutComposite().layout();
}
+ @Override
+ public void handleEvent(Object eventSource) {
+ if (eventSource.equals(select_nameUsedInSource)){
+ getEntity().setNameUsedInSource(select_nameUsedInSource.getEntity());
+ }else{
+ super.handleEvent(eventSource);
+ }
+ }
+
}