Project

General

Profile

« Previous | Next » 

Revision 4fbac559

Added by Cherian Mathew almost 7 years ago

Add check for remoting before setting new entity listener

View differences:

eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationState.java
45 45
    public static CdmApplicationState getInstance() {
46 46
        if(cdmApplicationState == null) {
47 47
            cdmApplicationState = new CdmApplicationState();
48
            CdmBase.setNewEntityListener(new DefaultNewEntityListener());
49 48
        }
50 49

  
51 50
        return cdmApplicationState;
......
53 52

  
54 53
    public void setAppConfig(ICdmApplicationConfiguration appConfig) {
55 54
        this.appConfig = appConfig;
55
        if(appConfig instanceof CdmApplicationRemoteController) {
56
            CdmBase.setNewEntityListener(new DefaultNewEntityListener());
57
        } else {
58
            CdmBase.setNewEntityListener(null);
59
        }
56 60
    }
57 61

  
58 62
    public ICdmApplicationConfiguration getAppConfig() {

Also available in: Unified diff