- protected void createControls(ICdmFormElement formElement,
- DerivedUnitFacade entity, int style) {
- // Disable for now
-// text_derivedUnitDefinitions = formFactory.createTextWithLabelElement(formElement, "Specimen Definition", facade.getDerivedUnitDefinition(CdmStore.getDefaultLanguage()), style);
- text_accessionNumber = formFactory.createTextWithLabelElement(formElement, "Accession Number", entity.getAccessionNumber(), style);
- text_catalogNumber = formFactory.createTextWithLabelElement(formElement, "Catalog Number", entity.getCatalogNumber(), style);
- text_collectorsNumber = formFactory.createTextWithLabelElement(formElement, "Collectors Number", entity.getCollectorsNumber(), style);
-
- try {
- combo_preservationMethod = (PreservationMethodComboElement) formFactory.createTermComboElement(TermComboType.PRESERVATION_METHOD, formElement, "Preservation Method", entity.getPreservationMethod(), style);
- } catch (MethodNotSupportedByDerivedUnitTypeException e) {
- // we ignore this
- StoreUtil.info(e.getMessage());
- }
- selection_storedUnder = (NameSelectionElement) formFactory.createSelectionElement(SelectionType.NAME, getConversationHolder(), formElement, "Stored Under", entity.getStoredUnder(), style);
-
- try {
- text_exsicatum = formFactory.createTextWithLabelElement(formElement, "Exsiccatum", entity.getExsiccatum(), style);
- } catch (MethodNotSupportedByDerivedUnitTypeException e) {
- // we ignore this
- StoreUtil.info(e.getMessage());
- }
- // source
-
- section_determinations = (DeterminationEventDetailSection) formFactory.createEntityDetailSection(EntityDetailType.DETERMINATION_EVENT, getConversationHolder(), formElement, Section.TWISTIE);
- section_determinations.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
- section_determinations.setEntity(entity);
-
- section_duplicates = (SpecimenCollectionDetailSection) formFactory.createEntityDetailSection(EntityDetailType.SPECIMEN_COLLECTION, getConversationHolder(), formElement, Section.TWISTIE);
- section_duplicates.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
- section_duplicates.setEntity(entity);
-
- section_source = (SourceCollectionDetailSection) formFactory.createEntityDetailSection(EntityDetailType.IDENTIFIABLE_SOURCE_COLLECTION, getConversationHolder(), formElement, Section.TWISTIE);
- section_source.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
- section_source.setEntity(entity);
- }
+ protected void createControls(ICdmFormElement formElement, DerivedUnitFacade entity, int style) {
+ // Disable for now
+ // text_derivedUnitDefinitions =
+ // formFactory.createTextWithLabelElement(formElement,
+ // "Specimen Definition",
+ // facade.getDerivedUnitDefinition(CdmStore.getDefaultLanguage()),
+ // style);
+ text_barcode = formFactory.createTextWithLabelElement(formElement, "Barcode", entity.getBarcode(), style);
+ text_catalogNumber = formFactory.createTextWithLabelElement(formElement, "Catalog Number", entity.getCatalogNumber(), style);
+
+ try {
+ combo_preservationMethod = formFactory.createTermComboElement(PreservationMethod.class, formElement, "Preservation Method", entity.getPreservationMethod(), style);
+ } catch (MethodNotSupportedByDerivedUnitTypeException e) {
+ // we ignore this
+ AbstractUtility.info(e.getMessage());
+ }
+ selection_storedUnder = formFactory.createSelectionElement(TaxonNameBase.class, getConversationHolder(), formElement, "Stored Under", entity.getStoredUnder(), EntitySelectionElement.ALL, style);
+
+ try {
+ text_exsicatum = formFactory.createTextWithLabelElement(formElement, "Exsiccatum", entity.getExsiccatum(), style);
+ } catch (MethodNotSupportedByDerivedUnitTypeException e) {
+ // we ignore this
+ AbstractUtility.info(e.getMessage());
+ }
+
+ section_duplicates = formFactory.createSpecimenCollectionDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
+ section_duplicates.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+ section_duplicates.setEntity(entity);
+
+ section_source = formFactory.createSourceCollectionDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
+ section_source.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+ section_source.setEntity(entity);
+ }