Project

General

Profile

« Previous | Next » 

Revision 7f6f8587

Added by Andreas Kohlbecker over 2 years ago

ref #9884 refactoring UI enablement:

  • ui beans never are null
  • disabled beans have state.enabled=false
  • uis throw UIDisabledException
  • ErrorView to show UIDisabledException
  • UIDisabledErrorHandle delegates to the ErrorView

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/ui/CdmBaseUI.java
12 12
import com.vaadin.server.VaadinRequest;
13 13
import com.vaadin.ui.UI;
14 14

  
15
import eu.etaxonomy.cdm.addon.config.UIDisabledException;
15 16
import eu.etaxonomy.cdm.vaadin.util.CdmSQLStringDecorator;
16 17
import eu.etaxonomy.cdm.vaadin.util.CdmVaadinSessionUtilities;
17 18

  
......
29 30
    protected void init(VaadinRequest request) {
30 31
        // TODO: Need to evaluate the various sql dialects and make sure that these
31 32
        // queries are compatible with all
33

  
34
        if(!isEnabled()) {
35
            throw new UIDisabledException(getClass().getSimpleName());
36
        }
32 37
        QueryBuilder.setStringDecorator(new CdmSQLStringDecorator());
33 38

  
34 39
        CdmVaadinSessionUtilities.initCdmDataChangeService();
......
38 43
        CdmVaadinSessionUtilities.initBasicEventService();
39 44
    }
40 45

  
46

  
41 47
}

Also available in: Unified diff