Revision e458e14a
Added by Patrick Plitzner almost 10 years ago
- changed "Original Label Data Field" to use data binding
- added property change listener support for the field
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/CdmSectionPart.java | ||
---|---|---|
12 | 12 |
|
13 | 13 |
import org.eclipse.jface.util.IPropertyChangeListener; |
14 | 14 |
import org.eclipse.jface.util.PropertyChangeEvent; |
15 |
import org.eclipse.swt.widgets.Control; |
|
15 | 16 |
import org.eclipse.ui.forms.SectionPart; |
16 | 17 |
|
17 | 18 |
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade; |
... | ... | |
120 | 121 |
if (event != null) { |
121 | 122 |
|
122 | 123 |
Object eventSource = event.getSource(); |
124 |
Control[] children = formSection.getLayoutComposite().getChildren(); |
|
125 |
boolean containsElement = false; |
|
126 |
for (Control control : children) { |
|
127 |
if(eventSource.equals(control)){ |
|
128 |
containsElement = true; |
|
129 |
break; |
|
130 |
} |
|
131 |
} |
|
132 |
if(containsElement){ |
|
133 |
markDirty(); |
|
134 |
} |
|
123 | 135 |
|
124 |
if (formSection.equals(eventSource)){ |
|
136 |
else if (formSection.equals(eventSource)){
|
|
125 | 137 |
markDirty(); |
126 | 138 |
} |
127 |
if(( |
|
128 |
(eventSource instanceof ICdmFormElement) |
|
129 |
&& formSection.containsFormElement((ICdmFormElement) eventSource)) |
|
130 |
) { |
|
131 |
markDirty(); |
|
139 |
else if(((eventSource instanceof ICdmFormElement)&& formSection.containsFormElement((ICdmFormElement) eventSource))) { |
|
140 |
markDirty(); |
|
132 | 141 |
} |
133 | 142 |
} |
134 | 143 |
} |
Also available in: Unified diff