Project

General

Profile

« Previous | Next » 

Revision d90a6c9f

Added by Patrick Plitzner over 9 years ago

  • added publish flag to DetailsView for SpecimenOrObservationBases (fixes #3951)

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/DerivedUnitGeneralDetailElement.java
16 16
import eu.etaxonomy.cdm.model.location.NamedArea;
17 17
import eu.etaxonomy.cdm.model.occurrence.Collection;
18 18
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
19
import eu.etaxonomy.taxeditor.model.AbstractUtility;
20
import eu.etaxonomy.taxeditor.model.IDerivedUnitFacadePart;
21 19
import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
22 20
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
21
import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
23 22
import eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement;
24 23
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
25 24
import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement;
......
54 53
	private EntitySelectionElement<Collection> selection_collection;
55 54
	private TextWithLabelElement text_accessionNumber;
56 55
	private GatheringEventUnitElement element_elevation;
56
	private CheckboxElement checkIsPublish;
57 57

  
58 58

  
59 59
	/**
......
78 78
		toggleableText_titleCache = formFactory.createToggleableTextField(
79 79
				formElement, "Title Cache", entity.getTitleCache(),
80 80
				entity.isProtectedTitleCache(), style);
81
        //TODO for DerivateEditor do not use facade anyore to avoid this special case handling #4539
81
        //TODO for DerivateEditor do not use facade anymore to avoid this special case handling #4539
82 82
		if(showOnlyDerivedUnitData){
83 83
		    toggleableText_titleCache.setEnabled(false);
84 84
		}
......
114 114
		text_accessionNumber = formFactory.createTextWithLabelElement(
115 115
				formElement, "Accession Number", entity.getAccessionNumber(),
116 116
				style);
117
        checkIsPublish = formFactory.createCheckbox(formElement, "Publish", entity.isPublish(), style);
117 118

  
118 119
	}
119 120

  
......
151 152
			getEntity().setAccessionNumber(text_accessionNumber.getText());
152 153
		} else if (eventSource == combo_specorobstype) {
153 154
			getEntity().setType(combo_specorobstype.getSelection());
155
		} else if (eventSource == checkIsPublish) {
156
		    getEntity().innerDerivedUnit().setPublish(checkIsPublish.getSelection());
154 157
		}
155 158

  
156 159
		if (eventSource != toggleableText_titleCache) {
157 160
			toggleableText_titleCache.setText(getEntity().getTitleCache());
158 161
		}
159 162
	}
160
	
163

  
161 164
    public void setShowOnlyDerivedUnitData(boolean showOnlyDerivedUnitData) {
162 165
        this.showOnlyDerivedUnitData = showOnlyDerivedUnitData;
163 166
    }

Also available in: Unified diff