Project

General

Profile

« Previous | Next » 

Revision 4c154cfa

Added by Katja Luther about 6 years ago

name selection for supplemental data view

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AuthorshipDetailElement.java
82 82
    				getConversationHolder(),
83 83
    				formElement, "Author",
84 84
    				entity.getCombinationAuthorship(),
85
    				EntitySelectionElement.ALL, style);
85
    				EntitySelectionElement.DELETABLE | EntitySelectionElement.SELECTABLE | EntitySelectionElement.EDITABLE, style);
86 86
    		addElement(selectionCombinationAuthor);
87 87
    		selectionExCombinationAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class,
88 88
    				getConversationHolder(),
89 89
    				formElement, "Ex Author",
90 90
    				entity.getExCombinationAuthorship(),
91
    				EntitySelectionElement.ALL, style);
91
    				EntitySelectionElement.DELETABLE | EntitySelectionElement.SELECTABLE | EntitySelectionElement.EDITABLE, style);
92 92
    		addElement(selectionExCombinationAuthor);
93 93
    		if (code != null){
94 94
                if (code.equals(NomenclaturalCode.ICZN)){
......
98 98
             }
99 99
    		selectionBasionymAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class, getConversationHolder(),
100 100
                    formElement, "Basionym Author", entity.getBasionymAuthorship(),
101
                    EntitySelectionElement.ALL, style);
101
                    EntitySelectionElement.DELETABLE | EntitySelectionElement.SELECTABLE | EntitySelectionElement.EDITABLE, style);
102 102
    		addElement(selectionBasionymAuthor);
103 103
    		selectionExBasionymAuthor = formFactory.createSelectionElementWithAbbreviatedTitle(TeamOrPersonBase.class, getConversationHolder(),
104 104
    		        formElement, "Ex Basionym Author",entity.getExBasionymAuthorship(),
105
    		        EntitySelectionElement.ALL, style);
105
    		        EntitySelectionElement.DELETABLE | EntitySelectionElement.SELECTABLE | EntitySelectionElement.EDITABLE, style);
106 106

  
107 107
    		addElement(selectionExBasionymAuthor);
108 108
    		 if (code != null){
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameDetailElement.java
58 58
	private CheckboxElement checkbox_anamorphic;
59 59
	private TextWithLabelElement text_cultivarName;
60 60
	private TextWithLabelElement text_subGenusAuthorship;
61
	
61

  
62 62
	private TextWithLabelElement text_breed;
63 63
	//private NumberWithLabelElement text_publicationYear;
64 64
	//private NumberWithLabelElement text_originalPublicationYear;
......
76 76
			int style) {
77 77
		super(cdmFormFactory, formElement);
78 78
		// make this element selectable
79
		if(cdmFormFactory.getSelectionProvider() != null){
80
			selectionArbitrator = cdmFormFactory.createSelectionArbitrator(this);
81
		}
79

  
82 80
	}
83 81

  
84 82
	/** {@inheritDoc} */
......
97 95
		}
98 96
	    if (isAdvancedView){
99 97
	    	toggleable_cache = formFactory.createToggleableTextField(this, "Name Cache", nonViralName.getNameCache(), nonViralName.isProtectedNameCache(), style);
100
	    	
98

  
101 99
	    	combo_rank = formFactory.createDefinedTermComboElement(TermType.Rank, this, "Rank", nonViralName.getRank(), style, comparator);
102 100
	    	createGenusOrUninomialControls(this, nonViralName, style);
103 101
            createInfragenerericEpithetControls(this, nonViralName, style);
......
125 123
    				text_appendedPhrase = formFactory.createTextWithLabelElement(formElement, "Appended Phrase", nonViralName.getAppendedPhrase(), style);
126 124
           	}
127 125
	    }
126
	    if(this.getFormFactory().getSelectionProvider() != null){
127
            selectionArbitrator = this.getFormFactory().createSelectionArbitrator(this);
128
        }
128 129

  
129 130
	}
130 131

  
......
203 204
		IBacterialName bacterialName = (IBacterialName) nonViralName;
204 205
		text_subGenusAuthorship = formFactory.createTextWithLabelElement(formElement, "Subgenus Authorship", bacterialName.getSubGenusAuthorship(), style);
205 206
//		text_nameApprobation = formFactory.createTextWithLabelElement(formElement, "Name Approbation", bacterialName.getNameApprobation(), style);
206
		
207

  
207 208
	}
208 209

  
209 210
	private void createCultivarNameParts(ICdmFormElement formElement, INonViralName nonViralName, int style) {
210 211
		ICultivarPlantName cultivarName = (ICultivarPlantName)nonViralName;
211 212
		text_cultivarName = formFactory.createTextWithLabelElement(formElement, "Cultivar Name", cultivarName.getCultivarName(), style);
212
		
213

  
213 214
	}
214 215

  
215 216
	private void createBotanicalNameParts(ICdmFormElement formElement, INonViralName nonViralName, int style){
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NonViralNameDetailSection.java
25 25
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants;
26 26
import eu.etaxonomy.taxeditor.model.ImageResources;
27 27
import eu.etaxonomy.taxeditor.model.MessagingUtils;
28
import eu.etaxonomy.taxeditor.remoting.CdmEagerLoadingException;
28 29
import eu.etaxonomy.taxeditor.ui.dialog.selection.NameSelectionDialog;
29 30
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
30 31
import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
......
117 118

  
118 119

  
119 120
	private boolean checkForMultipleNameUsages(INonViralName nonViralName) {
120
		return nonViralName.getTaxonBases().size() != 1;
121
	    try{
122
	        return nonViralName.getTaxonBases().size() != 1;
123
	    }catch (CdmEagerLoadingException e){
124
	        System.out.println(e.getLocalizedMessage());
125
	        return false;
126
	    }
121 127
	}
122 128

  
123 129
	/** {@inheritDoc} */

Also available in: Unified diff