Project

General

Profile

« Previous | Next » 

Revision defbfd3c

Added by Katja Luther over 2 years ago

ref #9836: show name in source only for taxa

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/SecundumSourceElement.java
17 17
import eu.etaxonomy.cdm.model.reference.NamedSourceBase;
18 18
import eu.etaxonomy.cdm.model.reference.Reference;
19 19
import eu.etaxonomy.cdm.model.taxon.SecundumSource;
20
import eu.etaxonomy.cdm.model.taxon.Taxon;
20 21
import eu.etaxonomy.taxeditor.model.AbstractUtility;
21 22
import eu.etaxonomy.taxeditor.preference.Resources;
22 23
import eu.etaxonomy.taxeditor.store.StoreUtil;
......
53 54

  
54 55
        setEntityWithoutUpdate(HibernateProxyHelper.deproxy(entity));
55 56

  
56
        this.selection_Ref = formFactory.createSelectionElement(Reference.class, formElement, "Secundum", null, EntitySelectionElement.ALL, style);
57
        this.selection_Ref = formFactory.createSelectionElement(Reference.class, formElement, "Secundum", getEntity()!= null? getEntity().getCitation(): null, EntitySelectionElement.ALL, style);
57 58

  
58
        if (getEntity() != null){
59
            selection_Ref.setEntity(getEntity().getCitation());
60
        }
61 59
        selection_Ref.setBackground(this.getPersistentBackground());
62 60
        for (ICdmFormElement element: selection_Ref.getElements()){
63 61
            element.setBackground(getPersistentBackground());
......
68 66
        Label sep = formFactory.createLabel(formElement.getLayoutComposite(), "");
69 67
        sep.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
70 68
        
71
        select_nameUsedInSource = formFactory.createSelectionElement(TaxonName.class, formElement, "Name in Source", entity != null? ((NamedSourceBase)entity).getNameUsedInSource(): null, EntitySelectionElement.DELETABLE, style);
72
//        select_nameUsedInSource.setBackground(background);
73

  
69
        
74 70
        externalLinks = formFactory.createExternalLinksSection(getConversationHolder(), formElement, "Links", false, StoreUtil.getSectionStyle(ExternalLinksSection.class, DescriptionElementSource.class.getCanonicalName()));
75 71
        externalLinks.setEmptySectionString("No links yet.");
76 72
        externalLinks.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 3));
77 73
        externalLinks.setEntity(getEntity());
78 74
        externalLinks.setFont(AbstractUtility.getFont(Resources.COLOR_FONT_DEFAULT));
79

  
80

  
75
        
81 76
        addControl(externalLinks);
82 77
        addElement(externalLinks);
83

  
84
//        advancedSection = formFactory.createOriginalSourceAdvancedSection(getConversationHolder(), formElement, null, StoreUtil.getSectionStyle(OriginalSourceAdvancedSection.class, INomenclaturalReference.class.getCanonicalName()));
85
//        TableWrapData layoutData = LayoutConstants.FILL_HORIZONTALLY(2, 1);
86
//
87
//        advancedSection.setLayoutData(layoutData);
88
//        advancedSection.setBackground(this.getPersistentBackground());
89
//        advancedSection.setEntity(entity);
90
//        advancedSection.setFont(AbstractUtility.getFont(Resources.COLOR_FONT_DEFAULT));
91
//        addControl(advancedSection);
92
//        addElement(advancedSection);
93 78
        this.getLayoutComposite().layout();
79
        
94 80
    }
95 81
    @Override
96 82
    public void handleEvent(Object eventSource) {

Also available in: Unified diff