From 4c2590c4566478a81d4d26e824f9c2db37ba157b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 13 Mar 2017 00:38:54 +0100 Subject: java : vaadin : simple Hello World --- java/vaadin/Application.properties | 3 + java/vaadin/build.xml | 139 +++++++++++++++++++++ java/vaadin/ivy.xml | 20 +++ java/vaadin/ivysettings.xml | 22 ++++ java/vaadin/src/main/WebContent/WEB-INF/web.xml | 45 +++++++ java/vaadin/src/main/java/ch/asynk/HelloWorld.java | 34 +++++ java/vaadin/tomcat.properties | 4 + 7 files changed, 267 insertions(+) create mode 100644 java/vaadin/Application.properties create mode 100644 java/vaadin/build.xml create mode 100644 java/vaadin/ivy.xml create mode 100644 java/vaadin/ivysettings.xml create mode 100644 java/vaadin/src/main/WebContent/WEB-INF/web.xml create mode 100644 java/vaadin/src/main/java/ch/asynk/HelloWorld.java create mode 100644 java/vaadin/tomcat.properties diff --git a/java/vaadin/Application.properties b/java/vaadin/Application.properties new file mode 100644 index 0000000..193ca7f --- /dev/null +++ b/java/vaadin/Application.properties @@ -0,0 +1,3 @@ +app.name=VaadinHelloWorld +app.version=0.0.1 +app.path=/hello diff --git a/java/vaadin/build.xml b/java/vaadin/build.xml new file mode 100644 index 0000000..6702c7a --- /dev/null +++ b/java/vaadin/build.xml @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/vaadin/ivy.xml b/java/vaadin/ivy.xml new file mode 100644 index 0000000..033e347 --- /dev/null +++ b/java/vaadin/ivy.xml @@ -0,0 +1,20 @@ + + +]> + + + + + + + + + + + + + + diff --git a/java/vaadin/ivysettings.xml b/java/vaadin/ivysettings.xml new file mode 100644 index 0000000..e5fc415 --- /dev/null +++ b/java/vaadin/ivysettings.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/vaadin/src/main/WebContent/WEB-INF/web.xml b/java/vaadin/src/main/WebContent/WEB-INF/web.xml new file mode 100644 index 0000000..f4b7f85 --- /dev/null +++ b/java/vaadin/src/main/WebContent/WEB-INF/web.xml @@ -0,0 +1,45 @@ + + + + Hello World Vaadin + + Hello World in Vaadin + + + + Vaadin production mode + productionMode + false + + + + 60 + + + + + default + com.vaadin.server.VaadinServlet + + Vaadin application class to start + UI + ch.asynk.HelloWorld + + true + + + default + /* + + + + + + + + + + + diff --git a/java/vaadin/src/main/java/ch/asynk/HelloWorld.java b/java/vaadin/src/main/java/ch/asynk/HelloWorld.java new file mode 100644 index 0000000..65ef27d --- /dev/null +++ b/java/vaadin/src/main/java/ch/asynk/HelloWorld.java @@ -0,0 +1,34 @@ +package ch.asynk; + +import com.vaadin.annotations.Theme; +import com.vaadin.annotations.Title; +import com.vaadin.server.VaadinRequest; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; +import com.vaadin.ui.Label; +import com.vaadin.ui.Notification; +import com.vaadin.ui.UI; +import com.vaadin.ui.VerticalLayout; + +@Title("Hello!!") +@Theme("valo") +public class HelloWorld extends UI +{ + private static final long serialVersionUID = 511085335415683713L; + @Override + protected void init(VaadinRequest request) + { + VerticalLayout content = new VerticalLayout(); + setContent(content); + + content.addComponent(new Label("Hello World!")); + content.addComponent(new Button("Push Me!", new ClickListener() { + private static final long serialVersionUID = 5808429544582385114L; + @Override + public void buttonClick(ClickEvent event) { + Notification.show("Pushed!"); + } + })); + } +} diff --git a/java/vaadin/tomcat.properties b/java/vaadin/tomcat.properties new file mode 100644 index 0000000..7ec1b73 --- /dev/null +++ b/java/vaadin/tomcat.properties @@ -0,0 +1,4 @@ +manager.username=manager +manager.password=h46bh2j0 +manager.url=http://127.0.0.1:8080/manager/text +catalina.home=/usr/share/tomcat7 -- cgit v1.1-2-g2b99