List of usage examples for com.vaadin.server VaadinServletService setSystemMessagesProvider
public void setSystemMessagesProvider(SystemMessagesProvider systemMessagesProvider)
From source file:com.freebox.engeneering.application.web.common.ApplicationServlet.java
License:Apache License
@Override protected VaadinServletService getService() { final VaadinServletService service = super.getService(); service.setSystemMessagesProvider(new ApplicationMessagesProvider()); return service; }
From source file:com.klwork.explorer.web.CustomVaadinServlet.java
License:Apache License
@Override protected VaadinServletService createServletService(DeploymentConfiguration deploymentConfiguration) throws ServiceException { final VaadinServletService service = super.createServletService(deploymentConfiguration); // Spring system messages provider if (systemMessagesBeanName != null && systemMessagesBeanName != "") { SpringVaadinSystemMessagesProvider messagesProvider = new SpringVaadinSystemMessagesProvider( applicationContext, systemMessagesBeanName); logger.debug("set SpringVaadinSystemMessagesProvider"); service.setSystemMessagesProvider(messagesProvider); }/*from w w w .j ava 2 s .c om*/ String uiProviderProperty = service.getDeploymentConfiguration() .getApplicationOrSystemProperty(Constants.SERVLET_PARAMETER_UI_PROVIDER, null); // Add SpringUIProvider if custom provider doesn't defined. if (uiProviderProperty == null) { service.addSessionInitListener(new SessionInitListener() { @Override public void sessionInit(SessionInitEvent event) throws ServiceException { //UIPROVIDER,CommunicationManager event.getSession().addUIProvider(new SpringUIProvider()); } }); } return service; }
From source file:pl.exsio.frameset.vaadin.bootstrap.servlet.FramesetServlet.java
License:Open Source License
protected void initializeApplication(VaadinServletService service) { if (this.systemMessagesBeanName != null && !"".equals(this.systemMessagesBeanName)) { FramesetSystemMessagesProvider messagesProvider = new FramesetSystemMessagesProvider( this.applicationContext, this.systemMessagesBeanName); service.setSystemMessagesProvider(messagesProvider); }/* w w w .j a v a 2 s . c o m*/ String uiProviderProperty = service.getDeploymentConfiguration() .getApplicationOrSystemProperty(Constants.SERVLET_PARAMETER_UI_PROVIDER, null); if (uiProviderProperty == null) { service.addSessionInitListener(new SessionInitListener() { @Override public void sessionInit(SessionInitEvent event) throws ServiceException { event.getSession().addUIProvider(new FramesetUIProvider()); } }); } }