import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.model.common.TimePeriod;
import eu.etaxonomy.cdm.model.description.DescriptionElementSource;
import eu.etaxonomy.cdm.model.reference.INomenclaturalReference;
import eu.etaxonomy.cdm.model.reference.NamedSourceBase;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.TimePeriodElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
import eu.etaxonomy.taxeditor.ui.section.common.ExternalLinksSection;
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
protected EntitySelectionElement<Reference> selection_Ref;
protected TextWithLabelElement microReference;
+ protected TimePeriodElement accessed;
protected OriginalSourceAdvancedSection advancedSection;
protected String label = "Source";
protected CdmBase cdmEntity;
for (ICdmFormElement element: selection_Ref.getElements()){
element.setBackground(getPersistentBackground());
}
+
+ //TODO preliminary #10057
+ if (entity != null && entity.getCitation() != null && entity.getCitation().isDynamic()){
+ TimePeriod acc =entity.getAccessed(); // (entity != null? entity.getAccessed(): null);
+ accessed = formFactory.createTimePeriodElement(formElement, "Accessed", acc, style);
+ }
+
externalLinks = formFactory.createExternalLinksSection(getConversationHolder(), formElement, "Link(s)", StoreUtil.getSectionStyle(ExternalLinksSection.class, DescriptionElementSource.class.getCanonicalName()));
externalLinks.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 3));
externalLinks.setEntity(HibernateProxyHelper.deproxy(entity));
getEntity().setCitation(selection_Ref.getEntity());
}else if (eventSource.equals(microReference)){
getEntity().setCitationMicroReference(microReference.getText());
+ }else if(eventSource == accessed){
+ getEntity().setAccessed(accessed.getTimePeriod());
}
}