Project

General

Profile

« Previous | Next » 

Revision 6d9a00e0

Added by Katja Luther over 2 years ago

ref #9821: disable sources for computed and cloned descriptions - continue

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionElementSourceElement.java
21 21
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
22 22
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
23 23
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
24
import eu.etaxonomy.taxeditor.ui.element.IEnableableFormElement;
24 25
import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
25 26
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
26 27
import eu.etaxonomy.taxeditor.ui.section.common.ExternalLinksSection;
......
58 59

  
59 60
		externalLinks = formFactory.createExternalLinksSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(ExternalLinksSection.class, DescriptionElementSource.class.getCanonicalName()));
60 61
        externalLinks.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
62
        if (!isEnabled){
63
        	setEnabled(isEnabled);
64
        }
61 65
	}
62 66

  
63 67

  
......
110 114
		}
111 115

  
112 116
	}
117
	
118
	
113 119

  
114 120
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionElementSourceSection.java
73 73
		if(changed) {
74 74
            firePropertyChangeEvent(this);
75 75
        }
76
		if (getEntity() != null && getEntity().getInDescription() != null &&(getEntity().getInDescription().isComputed() || getEntity().getInDescription().isCloneForSource())){
77
    		this.setEnabled(false);;
78
    	}
76 79
	}
77 80
    @Override
78 81
    protected void renderContent(boolean forceExpansion){
......
91 94
		}
92 95

  
93 96
		this.setExpanded(forceExpansion);
94
		if (getEntity() != null && getEntity().getInDescription() != null &&(getEntity().getInDescription().isComputed() || getEntity().getInDescription().isCloneForSource())){
95
    		this.setEnabled(false);;
96
    	}
97
		
97 98

  
98 99
		
99 100
		

Also available in: Unified diff