c1e536f02ce0d5f561fc45e43b09ed308405c69e
1 package eu
.etaxonomy
.cdm
.remote
.vaadin
.uiset
.redlist
.views
;
3 import javax
.annotation
.PostConstruct
;
5 import org
.springframework
.context
.annotation
.Scope
;
6 import org
.springframework
.stereotype
.Component
;
8 import ru
.xpoft
.vaadin
.VaadinView
;
10 import com
.vaadin
.navigator
.View
;
11 import com
.vaadin
.navigator
.ViewChangeListener
.ViewChangeEvent
;
12 import com
.vaadin
.server
.ExternalResource
;
13 import com
.vaadin
.server
.Page
;
14 import com
.vaadin
.ui
.CustomComponent
;
15 import com
.vaadin
.ui
.Label
;
16 import com
.vaadin
.ui
.Link
;
17 import com
.vaadin
.ui
.VerticalLayout
;
21 * This view is intended to be the default error view. It doesn't work yet as intended, but it will be only
22 * a matter of time until the right wiring is found, so this view will serve its purpose in the near future.
30 @VaadinView(ErrorView
.NAME
)
31 public class ErrorView
extends CustomComponent
implements View
{
34 * automatically generated ID
36 private static final long serialVersionUID
= -5247307478297680373L;
38 public final static String NAME
= "error";
42 public void PostConstruct(){// throws GeneralSecurityException
43 Page
.getCurrent().setLocation("/");
45 VerticalLayout layout
= new VerticalLayout();
46 layout
.setSpacing(true);
47 layout
.setMargin(true);
50 Label header
= new Label("ERROR");
51 header
.setStyleName("h1");
53 Label message
= new Label("We are sorry for the inconvenience, but the site you were trying to reach is not registered in our System.");
54 Link startpage
= new Link("Go to the startpage", new ExternalResource("/"));
56 layout
.addComponent(header
);
57 layout
.addComponent(message
);
58 layout
.addComponent(startpage
);
59 setCompositionRoot(layout
);
66 public void enter(ViewChangeEvent event
) {