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/AbstractAuthenticatedUI.java
31 31

  
32 32
	private boolean ignoreAuthentication = false;
33 33

  
34
    private boolean enabled;
35

  
34 36
	private final static Logger logger =
35 37
			Logger.getLogger(AbstractAuthenticatedUI.class.getName());
36 38

  
......
44 46
        AuthenticationView av = new AuthenticationView();
45 47
        navigator.addView(AUTHENTICATION_VIEW, av);
46 48

  
47

  
48

  
49 49
        // Create and register the views
50 50
        CdmVaadinAuthentication cvAuthentication = (CdmVaadinAuthentication) VaadinSession.getCurrent().getAttribute(CdmVaadinAuthentication.KEY);
51 51

  
......
70 70
	    this.ignoreAuthentication = ignoreAuthentication;
71 71
	}
72 72

  
73
	 @Override
74
    public void setEnabled(boolean state) {
75
	     this.enabled = state;
76
	 }
77

  
78
	 @Override
79
    public boolean isEnabled() {
80
	     return enabled;
81
	 }
82

  
73 83
}

Also available in: Unified diff