List of usage examples for com.vaadin.server ErrorHandler ErrorHandler
ErrorHandler
From source file:org.lunifera.ecview.vaadin.ide.preview.web.EcviewMobilePreviewUI.java
License:Open Source License
@Override protected void init(VaadinRequest request) { setErrorHandler(new ErrorHandler() { @Override//from w w w . jav a2 s. c o m public void error(com.vaadin.server.ErrorEvent event) { if (EcviewMobilePreviewUI.this.isClosing() || !EcviewMobilePreviewUI.this.isAttached()) { return; } UI.setCurrent(EcviewMobilePreviewUI.this); disconnectAndClose(event.getThrowable()); } }); if (!Activator.getMobilePreviewHandler().setPreviewUI(this)) { worksWithCopy = true; } setStyleName(Reindeer.LAYOUT_BLUE); VaadinObservables.getRealm(getUI()); layout = new CssLayout(); layout.setSizeFull(); setContent(layout); modelChanged(); }
From source file:org.lunifera.ecview.vaadin.ide.preview.web.EcviewPreviewUI.java
License:Open Source License
@Override protected void init(VaadinRequest request) { setErrorHandler(new ErrorHandler() { @Override/*ww w . ja v a 2s . c o m*/ public void error(com.vaadin.server.ErrorEvent event) { if (EcviewPreviewUI.this.isClosing() || !EcviewPreviewUI.this.isAttached()) { return; } UI.setCurrent(EcviewPreviewUI.this); disconnectAndClose(event.getThrowable()); } }); if (!Activator.getIDEPreviewHandler().setPreviewUI(this)) { worksWithCopy = true; } setStyleName(Reindeer.LAYOUT_BLUE); VaadinObservables.getRealm(getUI()); layout = new CssLayout(); layout.setSizeFull(); setContent(layout); modelChanged(); }
From source file:pl.exsio.frameset.vaadin.ui.FramesetUI.java
License:Open Source License
protected void setProductionErrorHandlerIfAppropriate() { DeploymentConfiguration conf = getSession().getConfiguration(); if (conf.isProductionMode()) { this.setErrorHandler(new ErrorHandler() { @Override/* w w w . ja v a 2s .c o m*/ public void error(com.vaadin.server.ErrorEvent event) { Notification.show(event.getThrowable().getMessage(), Notification.Type.TRAY_NOTIFICATION); } }); } }