vaadin7

Hook for my Vaadin web app starting and stopping?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-27 04:35:37
问题 How do I know when my Vaadin 7 web app first starting/launching, so I can do some initial set-up work? Likewise, how do I know when my web app is ending, getting shutdown/exiting? 回答1: ServletContextListener Vaadin is built on top of Java Servlet technology. A “context” is the technical term for your web app in Servlet terms. So the answer here is not Vaadin-specific, it applies to any Servlet -- and at the end of the day, Vaadin is just one big Servlet. Since Servlet spec version 2.3, a

Hook for my Vaadin web app starting and stopping?

让人想犯罪 __ 提交于 2020-01-27 04:33:25
问题 How do I know when my Vaadin 7 web app first starting/launching, so I can do some initial set-up work? Likewise, how do I know when my web app is ending, getting shutdown/exiting? 回答1: ServletContextListener Vaadin is built on top of Java Servlet technology. A “context” is the technical term for your web app in Servlet terms. So the answer here is not Vaadin-specific, it applies to any Servlet -- and at the end of the day, Vaadin is just one big Servlet. Since Servlet spec version 2.3, a

Does detach() method call after attach() method?

微笑、不失礼 提交于 2020-01-25 03:49:39
问题 I have a simple UI class public class HelloWorldUI extends UI { @Override protected void init(VaadinRequest request) { System.out.println("Initialized !"); final VerticalLayout layout = new VerticalLayout(); layout.addComponent(new Label("Hello World !")); setContent(layout); } @Override public void detach() { System.out.println("Detach !"); super.detach(); } @Override public void attach() { System.out.println("Attach !"); super.attach(); } } When first time my UI was loaded , I see outputs

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

北战南征 提交于 2020-01-22 21:29:09
问题 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? 回答1: read the fine manual: https://vaadin.com/book

Where to put Flyway migrations in a Vaadin project (Java Servlet web app)?

笑着哭i 提交于 2020-01-14 06:12:09
问题 Where does one put their Flyway migration files in a Vaadin 7 project created with the multi-module Maven archetype? I will activate the migrations through the Java API in Flyway (not the command-line). Might the solution for Vaadin work in any Java Servlet based web app project running in a web container such as Tomcat or Jetty? 回答1: Update As of 2018-06, the Vaadin 8 archetype named vaadin-archetype-application-multimodule no longer provides an existing folders for Web Pages , META-INF ,

Using Thread with Vaadin?

谁说我不能喝 提交于 2020-01-10 03:57:32
问题 I'm trying to use Thread in my project to send emails. When I click on a Button , a Thread is started and a ProgressBar is displayed. As soon as all mails are sent, the ProgressBar doesn't disappear. This is my code: Button btnSendMail = new Button("Mail"); btnSendMail.addClickListener(this); @Override public void buttonClick(ClickEvent event) { if(event.getButton() == btnSendMail){ sendMail(); } } } private void sendMail(){ List<String> list = new ArrayList<String>(); list.add("mymail@domain

How to upload an image using ByteArrayOutputStream in Vaadin?

眉间皱痕 提交于 2020-01-07 05:58:06
问题 I want to receive an uploaded image as a byte array (so that it can be inserted into a sql database). I also want to show the uploaded image as a preview. I have tried the following code but im not receiving the bytes of the full image. (if i print the byte array it prints only a few characters) final Embedded preview = new Embedded("Uploaded Image"); preview.setVisible(false); final Upload upload = new Upload(); upload.setCaption("Image"); // Create upload stream final ByteArrayOutputStream

Error when creating a new Vaadin project in eclipse

不打扰是莪最后的温柔 提交于 2020-01-06 01:25:34
问题 When creating a new Vaadin 7 project in eclipse I'm getting this error: Failed while installing Dynamic Web Module 3.1 (see screenshot). Anyone knows why? The sources are not begin populated. I'm using Vaadin 7.3.6, Tomcat 8, Eclipse Luna Service Release 1 (4.4.1). Thanks for your help! This is the error in the log !ENTRY org.eclipse.jst.j2ee 4 0 2014-12-15 20:41:55.090 !MESSAGE No IModelProvider exists for project P/test of version: Dynamic Web Module 3.1 !STACK 0 java.lang

How to create a Complex Table in Vaadin 7 (Complex header is not required)

女生的网名这么多〃 提交于 2020-01-05 05:27:08
问题 I am trying to create a table similar to the below figure in Vaadin 7. Figure: http://i.stack.imgur.com/dvkO1.png I was thinking of these 3 possibilities. Still I don't have a clarity on what I should go ahead with implementation. 1) Using Column Generator. I referred https://vaadin.com/book/vaadin7/-/page/components.table.html 2) Having a table inside a table item. But I am finding difficulty in creating that also. I am unhappy about the look and feel. 3) Searching for if there is anyway we

Vaadin - center custom component

霸气de小男生 提交于 2020-01-04 17:39:46
问题 Using Grails 2.3.9 and Vaadin plugin 7.3.9 class MyUI extends UI { @Override protected void init(VaadinRequest vaadinRequest) { VerticalLayout layout = new VerticalLayout() layout.setMargin(true) SignInForm signInForm = new SignInForm() layout.addComponent(signInForm) layout.setComponentAlignment(signInForm, Alignment.MIDDLE_CENTER) layout.setSizeFull() setContent(layout) } } Custom component class SignInForm extends CustomComponent { Panel p = new Panel() public SignInForm() { p