private OriginalLabelDataElement textOriginalLabel;
private DerivedUnitMediaSection mediaDetailElement;
- private StatusCollectionDetailSection section_status;
+
/**
super.createControls(formElement, entity, style);
- section_status = formFactory.createStatusCollectionDetailSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(SourceCollectionDetailSection.class, entity.getClass().getCanonicalName()));
- section_status.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
- section_status.setEntity(entity);
section_source = formFactory.createSourceCollectionDetailSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(SourceCollectionDetailSection.class, entity.getClass().getCanonicalName()));
section_source.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
private GatheringEventUnitElement element_elevation;
private UriWithLabelElement uriPreferredStableUri;
private CheckboxElement checkIsPublish;
- private TermComboElement<DefinedTermBase> combo_status;
+ private StatusCollectionDetailSection section_status;
public DerivedUnitGeneralDetailElement(CdmFormFactory formFactory,
formElement, "Accession Number", entity.getAccessionNumber(),
style);
uriPreferredStableUri = formFactory.createUriWithLabelElement(formElement, "Pref. Stable URI", entity.getPreferredStableUri(), style);
- checkIsPublish = formFactory.createCheckbox(formElement, "Publish", entity.innerDerivedUnit().isPublish(), style);
+ section_status = formFactory.createStatusCollectionDetailSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(SourceCollectionDetailSection.class, entity.getClass().getCanonicalName()));
+ section_status.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+ section_status.setEntity(entity);
+
+ checkIsPublish = formFactory.createCheckbox(formElement, "Publish", entity.innerDerivedUnit().isPublish(), style);
}
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
import eu.etaxonomy.cdm.model.occurrence.OccurrenceStatus;
import eu.etaxonomy.cdm.model.reference.OriginalSourceType;
+import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
public boolean allowAddExisting() {
return false;
}
+
+ @Override
+ protected void setSectionTitle() {
+ DerivedUnitFacade entity = getEntity();
+ Collection<OccurrenceStatus> collection = getCollection(entity);
+ if(collection != null && collection.size() > 0){
+ String concatenatedLabels = "";
+ for (OccurrenceStatus status: collection){
+ concatenatedLabels += ", "+ (status != null && status.getType() != null? status.getType().getPreferredRepresentation(CdmStore.getDefaultLanguage()) : " - ");
+ }
+ concatenatedLabels = concatenatedLabels.replaceFirst(", ", ": ");
+ this.setText(getTitleString() + concatenatedLabels + " +");
+ }else{
+ this.setText(getTitleString());
+ }
+ }
}