vaadin7

How to create different Themes on top of Valo in Vaadin?

老子叫甜甜 提交于 2019-12-04 07:07:20
Now vaadin 7.3 has came out and it has the very nice Valo Theme . But I don't know how to import it to my project? Now I am using a default theme with my custom scss files. I would like to taste Valo . Please somebody help me how to import valo theme to my project. More over, how can I choose theme styles? Valo Theme Demo has different theme styles such as Default, Blueprint, Dark, Metro, Flat . How to choose this categories as I wish? read the fine manual: https://vaadin.com/book/vaadin7/-/page/themes.valo.html#themes.valo.use there is a whole section dedicated to Valo the different themes on

How to specify a button to open an URL?

南楼画角 提交于 2019-12-04 01:40:22
I want to write a web application that triggers the default email client of the user to send an email. Thus, I created a Link, that leads to an URL conforming to the mailto URI scheme ( http://en.wikipedia.org/wiki/Mailto ): Link emailLink = new Link("Send Email", new ExternalResource("mailto:someone@example.com")); However, instead of using a Link, I want to provide a Button that allows to trigger the respective functionality. But, for buttons I cannot set an ExternalResource to be opened. Does anybody know to solve this problem for Buttons, or how to create a Link that looks and behaves

How can I compile only necessary widgets in Vaadin 7 with Maven?

时光总嘲笑我的痴心妄想 提交于 2019-12-03 18:30:30
问题 I am new to the Vaadin framework which I looks very interesting, using eclipse and maven to develop and build my application I find pretty annoying that every time I do a mvn clean install it will take so long time to build the app, I found that this is because it compiles the whole set of widgets. Even if I am only using a Button in my layout it will take so much on building the app. I have researched for some time in the Internet and 2 books but cannot find enough information about how to

Vaadin - download the file / save as

这一生的挚爱 提交于 2019-12-03 16:23:18
I try to add button with function to download the file from external resource Button saveAsButton = new Button(); private FileDownloader fileDownloader; fileDownloader = new FileDownloader(new ExternalResource(........)); fileDownloader.extend(saveAsButton); This doesn't work for me :/ no errors in the background Referred from this link . A custom file downloader can give you this functionality. Here is the custom class and demo. The main advantage of using this AdvancedFileDownloader over inbuilt com.vaadin.server.FileDownloader is that you can change file path on each button click. In

Vaadin 7.1 + Spring-Security Integration running in Tomcat Server

二次信任 提交于 2019-12-03 14:02:21
问题 Im new on vaadin and spring security, I want to know if anyone had a complete project example of the vaadin 7.1 + spring-security integration running in a tomcat server (not in jetty). 回答1: Vaadin 7 easy integrate with Spring Security. You should configure only 2 files. First - web.xml and second one spring-security.xml (user credentials and security settings). This is small example how to use base form for authentification. web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi=

How to start a file download in vaadin without button?

社会主义新天地 提交于 2019-12-03 09:11:06
问题 I know that it is really easy to create a FileDownloader and call extend with a Button . But how do I start a download without the Button ? In my specific situation right now I have a ComboBox and the file I'd like to send to the user is generated after changing its value, based on the input. The file should be sent immediately without waiting for another click. Is that easily possible? Thanks raffael 回答1: I found a solution myself. Actually two. The first one uses the deprecated method Page

Spring Boot Security with Vaadin Login

点点圈 提交于 2019-12-03 05:13:34
问题 I try to build an application based on Spring Boot (1.2.7.RELEASE) and Vaadin (7.6.3). My problem is that I'm not able to integrate Spring Security with Vaadin. I want a custom Vaadin built LoginScreen and Spring Security control. My project setup is as follows: @Configuration @EnableWebSecurity public class SpringSecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { http.csrf().disable(). exceptionHandling()

JPA relationship JPAContainer with ComboBox?

ぃ、小莉子 提交于 2019-12-02 17:53:19
问题 I'm looking for a way to use a jpa relationship @OneToMany/@OneToOne/@ManyToOne/@ManyToMany with a ComboBox. @Entity public class State { @Id @GeneratedValue private Integer id; @NotNull @NotEmpty @Size(min=5, max=50) private String state; @OneToOne private Governor governor; } @Entity public class Governor { @Id @GeneratedValue private Integer id; @NotNull @NotEmpty @Size(min=5, max=50) private String governor; } //app public class StateView extends VerticalLayout { //jpacontainer private

VAADIN 7: What is the simplest way to refresh a Vaadin View in 5 minute intervals?

你说的曾经没有我的故事 提交于 2019-12-02 13:20:02
问题 I'm trying to implement an automatic refresh on a List of components in a Vaadin view. The list gets its contents from a database. I can refresh the list with a button, that is already implemented. However, I would like to know what is the simplest way to make it so, that this refresh event, that I already have, would automatically refresh in 5 minute (300 000 milliseconds) intervals? Here's what I tried and it keeps refreshing even after I exit the view so it doesn't really work. I'd like

JPA relationship JPAContainer with ComboBox?

半城伤御伤魂 提交于 2019-12-02 10:12:58
I'm looking for a way to use a jpa relationship @OneToMany/@OneToOne/@ManyToOne/@ManyToMany with a ComboBox. @Entity public class State { @Id @GeneratedValue private Integer id; @NotNull @NotEmpty @Size(min=5, max=50) private String state; @OneToOne private Governor governor; } @Entity public class Governor { @Id @GeneratedValue private Integer id; @NotNull @NotEmpty @Size(min=5, max=50) private String governor; } //app public class StateView extends VerticalLayout { //jpacontainer private final CustomJPAContainer<State> datasource = new CustomJPAContainer<State>(State.class); //attributes