+
+ /**
+ * Updates all widgets to display the latest data
+ */
+ protected void updateContent() {
+ // if (this.getParentElement() instanceof NameDetailSection
+
+ }
+
+
+ public void removeReferenceControls(){
+ for (Iterator<ICdmFormElement> iterator = getElements().iterator();iterator.hasNext();) {
+ ICdmFormElement childElement = iterator.next();
+ // recursion
+ if (childElement instanceof EntitySelectionElement && ((EntitySelectionElement)childElement).equals(selection_reference)) {
+ childElement.removeElements();
+
+ // unregister selection arbitrator
+ if(childElement instanceof ISelectableElement){
+ SelectionArbitrator selectionArbitrator = ((ISelectableElement) childElement).getSelectionArbitrator();
+ if(selectionArbitrator != null){
+ formFactory.destroySelectionArbitrator(selectionArbitrator);
+ }
+ }
+
+ // unregister from property changes
+ formFactory.removePropertyChangeListener(childElement);
+ selection_reference = null;
+ }
+ if (childElement instanceof TextWithLabelElement && ((TextWithLabelElement)childElement).equals(text_referenceDetail)) {
+
+ childElement.removeElements();
+
+ // unregister selection arbitrator
+ if(childElement instanceof ISelectableElement){
+ SelectionArbitrator selectionArbitrator = ((ISelectableElement) childElement).getSelectionArbitrator();
+ if(selectionArbitrator != null){
+ formFactory.destroySelectionArbitrator(selectionArbitrator);
+ }
+ }
+
+ // unregister from property changes
+ formFactory.removePropertyChangeListener(childElement);
+ text_referenceDetail = null;
+
+
+ }
+ }
+
+ }
+
+ public void removeNotDesignatedControls(){
+ for (Iterator<ICdmFormElement> iterator = getElements().iterator();iterator.hasNext();) {
+ ICdmFormElement childElement = iterator.next();
+ // recursion
+ if (childElement instanceof CheckboxElement && ((CheckboxElement)childElement).equals(this.checkbox_notDesignated)) {
+ childElement.removeElements();
+
+ // unregister selection arbitrator
+ if(childElement instanceof ISelectableElement){
+ SelectionArbitrator selectionArbitrator = ((ISelectableElement) childElement).getSelectionArbitrator();
+ if(selectionArbitrator != null){
+ formFactory.destroySelectionArbitrator(selectionArbitrator);
+ }
+ }
+
+ // unregister from property changes
+ formFactory.removePropertyChangeListener(childElement);
+ checkbox_notDesignated = null;
+ }
+
+ }
+
+ }
+ @Override
+ public void handleEvent(Object eventSource) {
+ if (eventSource == selection_reference) {
+ getEntity().setCitation(selection_reference.getEntity());
+ setEntity(entity);
+ }
+ if (eventSource == text_referenceDetail) {
+ getEntity().setCitationMicroReference(text_referenceDetail.getText());
+ setEntity(entity);
+ }
+ if (eventSource == checkbox_notDesignated) {
+ getEntity().setNotDesignated(checkbox_notDesignated.getSelection());
+ }
+ }
+