vaadin

How to integrate Vaadin 7 with OSGi?

巧了我就是萌 提交于 2019-12-05 21:20:35
I want to integrate vaadin 7 with osgi but there is no longer any AbstractApplicationServlet class. I've followed the integration using the vaadin bridge by Neil Bartlett https://github.com/njbartlett/VaadinOSGi . I've tried using the VaadinServlet somehow but with no luck. I've also searched for other solutions but found none. Do you have any suggestions? Thanks Vaadin 7 has a lot of design changes that are not visible for default use cases, but especially for OSGi integration you have to do some extra work. To get you started you should try to understand the initialization process concerning

How to change default HTML template in Vaadin

徘徊边缘 提交于 2019-12-05 21:18:14
I'm using Vaadin with maven application. What I want is changing the default html template. When I run the application, the generated HTML looks like this : <html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=10;chrome=1"> <style type="text/css">html, body {height:100%;margin:0;}</style> <link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./VAADIN/themes/customBootstrap/favicon.ico"> <link rel="icon" type="image/vnd.microsoft.icon" href="./VAADIN/themes/customBootstrap/favicon.ico"> <link rel="stylesheet"

How to create a secure view with Vaadin and SpringViewProvider

江枫思渺然 提交于 2019-12-05 20:41:56
There is a tutorial about Vaadin III - Views and Navigation with Vaadin Spring If I want to use Apache Shiro. How should I use ViewAccessControl? @SpringComponent @SpringView(name = SecuredView.VIEW_NAME) public class SecuredView extends VerticalLayout implements View, ViewAccessControl { public static final String VIEW_NAME = "view"; @PostConstruct void init() { addComponent(new Label("This is a secured view scoped view")); } @Override public boolean isAccessGranted(UI ui, String string) { return true; } } I get the exception: org.springframework.beans.factory.BeanCreationException: Error

Restricting file types upload component

廉价感情. 提交于 2019-12-05 18:30:35
I'm using the upload component of vaadin(7.1.9), now my trouble is that I'm not able to restrict what kind of files that can be sent with the upload component to the server, but I haven't found any API for that purpose. The only way is that of discarding file of wrong types after the upload. public OutputStream receiveUpload(String filename, String mimeType) { if(!checkIfAValidType(filename)){ upload.interruptUpload(); } return out; } Is this a correct way? No, its not the correct way. The fact is, Vaadin does provide many useful interfaces that you can use to monitor when the upload started,

Controling the size of a Portlet in Liferay

不想你离开。 提交于 2019-12-05 16:59:55
I have a simple Vaadin portlet which displays an Embedded page e.g www.stackoverflow..com. In Liferay I set the page layout where the portlet is to 1 column Layout so that the portlet fills out the full page. Now if I resize my browser (Firefox 11) the portlet is not being effected at all. Is there a way to make my Portlet resize itself if I resize my Browser ? I checked the ?debug console there are no layout errors and if I resize my broswer vaadin seems to call some resize funktions to set the new height, Width Running layout functions due to window resize New window width: 1265 New window

Getting a NoClassDefFoundError after installing Vaadin

牧云@^-^@ 提交于 2019-12-05 16:43:17
I want to do a project using Vaadin and am facing some issues. Here's what I did. I downloaded Eclipse and installed the Vaadin for Eclipse plugin. Then, I created a new Vaadin 7 project. It downloaded some Ivy dependencies but then, when I pressed Run, I get this error: java.lang.NoClassDefFoundError:com/vaadin/server/VaadinServlet. I searched a bit on the Internet but to no avail. One thing is that in the web-app's WEB-INF/lib folder, there are no jars. I have attached a screenshot of the error and also web.xml and ivy.xml. ivy.xml: <?xml version="1.0"?> <!DOCTYPE ivy-module [ <!ENTITY

How to stop vaadin stealing all url-patterns (and play nicely with spring mvc)

偶尔善良 提交于 2019-12-05 15:30:08
I have a vaadin application and I am trying to provide some REST Urls provided by spring MVC alongside - my web.xml is below. I only get 404s at /info - it seems like Vaadin steals all the url patterns. If I remove Vaadin, I can reach /info and get content at that url. How to I get them to play nicely together? <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml </param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <description>Vaadin

Using Clojure with Vaadin

拥有回忆 提交于 2019-12-05 13:28:45
问题 Has anyone tried implementing a web application with Clojure ( using Compojure ) and Vaadin ? I had seen an article on using Clojure with JWT for creating web apps. Vaadin is based on GWT so you get a lot of the advantages of GWT ( though Vaadin is completely Server-centric). And Clojure gives the advantage that you can use any Java Based Framework, so what thoughts on the Clojure + Vaadin based web application ? 回答1: I've created an article in Vaadin Trac wiki describing such integration:

How to use HTML template with Vaadin?

試著忘記壹切 提交于 2019-12-05 09:46:26
I am new to Vaadin. I have created template for my web application in HTML and JS. How to use the developed template with Vaadin as am not sure if I will be able to develop same template using Vaadin only? It may be possible to re-use some of the layout of the template using the CustomLayout layout component in Vaadin. You can also render the contents of a template into a Label component, and display the label in the application. See http://demo.vaadin.com/sampler#LabelRich for a small demo. Generally, though, the idea of templates and "pages" is orthogonal to developing applications in Vaadin

Vaadin + Spring Boot errors: “Cannot enhance @Configuration” and “More than one Servlet Mapping defined”

删除回忆录丶 提交于 2019-12-05 09:15:59
I'm new to Spring and Vaadin. I'm trying to go through tutorial for views navigation. I'd like to enable @Push in future to update views periodically with data fetched from DB. The project is very, very simple. I use no configuration class nor any XML - only Java annotations. Could anyone help me to fix the example code? Because I'm getting following warnings and I'm not sure what can be done with it and what will be the result of ignoring them. First one is: onClassPostProcessor : Cannot enhance @Configuration bean definition 'com.vaadin.spring.VaadinConfiguration' since its singleton