Project

General

Profile

« Previous | Next » 

Revision 13d6411b

Added by Katja Luther over 5 years ago

show authorship cache as title of authorship details section

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AuthorshipDetailSection.java
14 14
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
15 15
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
16 16
import eu.etaxonomy.cdm.model.name.INonViralName;
17
import eu.etaxonomy.cdm.model.name.TaxonName;
17 18
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
18 19
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
19 20
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
......
41 42
	@Override
42 43
    public void setTaxonBase(TaxonBase entity) {
43 44
		this.taxonBase = entity;
44
		INonViralName name = (INonViralName) HibernateProxyHelper.deproxy(entity.getName());
45
		INonViralName name = HibernateProxyHelper.deproxy(entity.getName());
45 46
		setEntity(name);
46 47
	}
47 48

  
......
56 57
		return taxonBase;
57 58
	}
58 59

  
60
	@Override
61
	protected void setSectionTitle() {
62
        String title = "";
63
        String label = "";
64
        if (getEntity() != null && (getEntity() instanceof TaxonName) ) {
65
            label =((TaxonName) getEntity()).getAuthorshipCache();
66
            title = ": " + label;
67
        }
68
        this.setText(String.format("%s%s", getHeading(), title));
69
        setTextClient(createToolbar());
70
    }
71

  
59 72
	@Override
60 73
	protected AbstractCdmDetailElement<INonViralName> createCdmDetailElement(
61 74
			AbstractCdmDetailSection<INonViralName> parentElement, int style) {
62 75
	    return formFactory.createAuthorshipDetailElement(parentElement, style);
63 76
	}
64
	
77

  
65 78
	public void updateContent(){
66 79
		((AuthorshipDetailElement)this.detailElement).updateContent();
67 80
	}

Also available in: Unified diff