vaadin

How to set value on click of link in vaadin

爷,独闯天下 提交于 2019-12-12 10:17:09
问题 I am new to vaadin. I have one Link like Link link = new Link("", new ExternalResource(redirectURL)); my requirement is, I have to set value when user clicks the link. Can I add listener when user click the link. Or is there alternate ways of setting value if link is clicked. 回答1: To capture onClick on a link or a label, I always create a HorizontalLayout and put the component inside it: HorizontalLayout hor = new HorizontalLayout(); final Link link = new Link("Click on Me!", new

Get the exactly width and height of a component in Vaadin

此生再无相见时 提交于 2019-12-12 09:43:27
问题 In vaadin, if I set width and height to undefined, I will get -1 when using getHeight()/getWidth() function. if I use sizeful(), I will get 100%. But how can I get the exactly width and height of a component? 回答1: In Vaadin, the layout is realized by the client side engine in the browser and the concrete sizes of layout components usually depend on the size of the browser window. Component sizes are not sent back to the server by the Vaadin standard components. Since all of your code is

How to write a Vaadin theme I can include in my other webapps?

与世无争的帅哥 提交于 2019-12-12 09:05:09
问题 I'm trying to create a simple theme (using Chameleon and some custom css and images, etc), which I've done. The problem is I want to wrap it up in a maven project and reference from other Vaadin projects as a dependency, so I can theme all my Vaadin apps the same way - or even better have it as a dependency of the parent project so that the whole app gets styled the same way and I can re-skin it for different customers. I'm not sure how to package and deploy the theme project so that it will

Architecture Question: GWT or Vaadin to create Desktop Application?

拟墨画扇 提交于 2019-12-12 08:15:04
问题 We're planning on creating a feedreader as a windows desktop- and iPad application . As we want to be able to show Websites AND to run (our own) JavaScript in this application, we thought about delivering the application as HTML/CSS/JavaScript, just wrapped by some .NET control or a Cocoa Touch webbrowser component. So the task at hand is to find out which framework to use to create the HTML/CSS/JS files to embed in the application. For the development of the HTML/CSS/JavaScript we would be

How do I fix 'com.vaadin.DefaultWidgetSet' does not contain implementation for com.vaadin.addon.charts.Chart

感情迁移 提交于 2019-12-12 07:49:02
问题 By using "Spring Stater Project" in Eclipse/STS, I was able to have a Vaadin project up and running quickly. I want to add charting via Vaadin-Addon to the project. I have Googled trying to find how to properly add and use Vaadin Chart addon to the project. But I am confused because there so many "Guides/Tutorial", but a lot are not for spring boot or they are outdated or partial. So I am looking for a complete Guide/Tutorial for Vaadin-SpringBoot-VaadinChart-AddOn. This is what I have so far

Vaadin valo background image

岁酱吖の 提交于 2019-12-12 06:49:10
问题 mytheme.scss file: @import "../valo/valo.scss"; @mixin mytheme { @include valo; background-image: url("img/light-background.jpg"); } my image is in ...VAADIN/themes/mytheme/img/light-background.jpg where is no compiling/running errors, why image isn't displayed as a background? 回答1: Edit: On hold until additional details are provided. Try setting it as the background image for your UI's generated div: @mixin mytheme { @include valo; .v-ui { background-image: url("img/light-background.jpg"); }

How to close window in vaadin?

岁酱吖の 提交于 2019-12-12 06:22:46
问题 I have got class MyCustomWindow which extends Window (com.vaadin.ui) from vaadin. When you click some button MyCustomWindow will show. Now I would like to add button to this window and when you push this buton it will close the window. I have got problem what to use to remove this window. I have found: Window w = getWindow(); getApplication().removeWindow(w); or Window w = this.findAncestor(Window.class); w.close(); But it doesn't work. I would like to remove window from inside the class, not

Vaadin Adding Javascript to Custom Layout

柔情痞子 提交于 2019-12-12 06:15:28
问题 I've read the other posts regarding this topic already. I just want to clarify, is there really no way in vaadin to: Create a custom layout html file, like custom.html; Import a java script file to it, then...; Call the js functions from within the html file, like one would normally? Currently I have home.html in my Vaadin\themes(project)\layouts and a javascript library in Vaadin\js\custom.js. In my Panel class i have annotation @JavaScript({"vaadin://js/custom.js"}) , and in my html i tried

use spring in vaadin

ε祈祈猫儿з 提交于 2019-12-12 05:04:22
问题 i want to use spring in vaadin it's my config: web.xml <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> <listener> <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class> </listener> <servlet> <servlet-name>VaadinApplicationServlet</servlet-name> <servlet

Binding foreign key in Vaadin (EclipseLink)

99封情书 提交于 2019-12-12 04:36:32
问题 I'm using Vaadin and EclipseLink. There are 2 tables, one is Mail , second in Customer . PK for Customer is customer_id, PK for mail is mail_id. Table Mail has Customer_id as a foreign key. How do I bind it? I tried: binder.forField(fkCustomerId) .withConverter(new StringToBigDecimalConverter(FormMessages.NUMBERS_ONLY)) .bind(Mail::getCustomerId, Mail::setCustomerId); Then I checked the Mail-entity class and found @JoinColumn(name = "CUSTOMER_ID", referencedColumnName = "CUSTOMER_ID")