2 * Copyright (C) 2017 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.cdm
.vaadin
.view
;
11 import org
.springframework
.beans
.factory
.annotation
.Autowired
;
12 import org
.springframework
.beans
.factory
.config
.ConfigurableBeanFactory
;
13 import org
.springframework
.context
.annotation
.Scope
;
15 import com
.vaadin
.navigator
.View
;
16 import com
.vaadin
.navigator
.ViewChangeListener
.ViewChangeEvent
;
17 import com
.vaadin
.spring
.annotation
.SpringComponent
;
18 import com
.vaadin
.ui
.Alignment
;
19 import com
.vaadin
.ui
.Label
;
20 import com
.vaadin
.ui
.VerticalLayout
;
21 import com
.vaadin
.ui
.themes
.ValoTheme
;
23 import eu
.etaxonomy
.vaadin
.ui
.navigation
.NavigationManager
;
26 @Scope(ConfigurableBeanFactory
.SCOPE_PROTOTYPE
)
27 public class ErrorView
extends VerticalLayout
implements View
{
29 public static final String NAME
= "error";
32 private NavigationManager navigationManager
;
34 private static final long serialVersionUID
= -8763747518841365925L;
38 this.setWidth("100%");
39 Label header
= new Label("An error occurred");
40 header
.setStyleName(ValoTheme
.LABEL_FAILURE
);
41 header
.setWidthUndefined();
44 setComponentAlignment(header
, Alignment
.MIDDLE_CENTER
);
48 public void enter(ViewChangeEvent event
) {