Project

General

Profile

« Previous | Next » 

Revision e4e1656c

Added by Patrick Plitzner over 8 years ago

Add support for generic SpecimenOrObservationBase class to
EntitySelectionElement and selection wizard

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/detail/IndividualsAssociationDetailElement.java
1 1
// $Id$
2 2
/**
3 3
 * Copyright (C) 2007 EDIT
4
 * European Distributed Institute of Taxonomy 
4
 * European Distributed Institute of Taxonomy
5 5
 * http://www.e-taxonomy.eu
6
 * 
6
 *
7 7
 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 8
 * See LICENSE.TXT at the top of this package for the full license terms.
9 9
 */
......
16 16
import eu.etaxonomy.cdm.model.common.Language;
17 17
import eu.etaxonomy.cdm.model.common.LanguageString;
18 18
import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
19
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
19
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
20 20
import eu.etaxonomy.taxeditor.store.CdmStore;
21 21
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
22 22
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
......
24 24
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
25 25

  
26 26
/**
27
 * <p>
28
 * IndividualsAssociationDetailElement class.
29
 * </p>
30
 * 
31 27
 * @author n.hoffmann
32 28
 * @created Jun 10, 2010
33 29
 * @version 1.0
......
36 32
		AbstractDetailedDescriptionDetailElement<IndividualsAssociation> {
37 33

  
38 34
	private TextWithLabelElement text_description;
39
	private EntitySelectionElement<DerivedUnit> selection_derivedUnit;
35
	private EntitySelectionElement<SpecimenOrObservationBase> selection_derivedUnit;
40 36

  
41
	/**
42
	 * <p>
43
	 * Constructor for IndividualsAssociationDetailElement.
44
	 * </p>
45
	 * 
46
	 * @param formFactory
47
	 *            a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
48
	 *            object.
49
	 * @param formElement
50
	 *            a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
51
	 *            object.
52
	 * @param entity
53
	 *            a
54
	 *            {@link eu.etaxonomy.cdm.model.description.IndividualsAssociation}
55
	 *            object.
56
	 * @param style
57
	 *            a int.
58
	 */
59 37
	public IndividualsAssociationDetailElement(CdmFormFactory formFactory,
60 38
			ICdmFormElement formElement, IndividualsAssociation entity,
61 39
			int style) {
......
67 45
	protected void createControls(ICdmFormElement formElement,
68 46
			IndividualsAssociation entity, int style) {
69 47
		selection_derivedUnit = formFactory
70
				.createSelectionElement(DerivedUnit.class,
71
						getConversationHolder(), formElement, "Unit",
72
						CdmBase.deproxy(entity.getAssociatedSpecimenOrObservation(),DerivedUnit.class),
48
				.createSelectionElement(SpecimenOrObservationBase.class,
49
						getConversationHolder(), formElement, "Occurrence/Unit",
50
						CdmBase.deproxy(entity.getAssociatedSpecimenOrObservation(),SpecimenOrObservationBase.class),
73 51
						EntitySelectionElement.ALL, style);
74 52

  
75 53
		text_description = formFactory.createMultiLineTextWithLabel(

Also available in: Unified diff