This repository has been archived by the owner on Jun 7, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vaadin version updates, added next Vaadin LTS demo (V14)
- Loading branch information
1 parent
d8d81f5
commit 8c263db
Showing
7 changed files
with
225 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
<modules> | ||
<module>vaadin08</module> | ||
<module>vaadin10</module> | ||
<module>vaadin14</module> | ||
</modules> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>examples-vaadin</artifactId> | ||
<groupId>io.thorntail.examples</groupId> | ||
<version>2.4.1.Final-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>example-vaadin-14</artifactId> | ||
<name>Thorntail Examples: CDI and Vaadin 14 (LTS)</name> | ||
<description>Thorntail Examples: CDI and Vaadin 14</description> | ||
|
||
<packaging>war</packaging> | ||
|
||
<repositories> | ||
<!-- Repository used by many Vaadin add-ons --> | ||
<repository> | ||
<id>Vaadin Directory</id> | ||
<url>http://maven.vaadin.com/vaadin-addons</url> | ||
</repository> | ||
<!-- Repository needed for prerelease versions of Vaadin --> | ||
<repository> | ||
<id>Vaadin - Prereleases</id> | ||
<url>https://maven.vaadin.com/vaadin-prereleases</url> | ||
<snapshots> | ||
<enabled>false</enabled> | ||
</snapshots> | ||
</repository> | ||
</repositories> | ||
|
||
<pluginRepositories> | ||
<!-- Repository needed for prerelease versions of Vaadin --> | ||
<pluginRepository> | ||
<id>Vaadin - Prereleases</id> | ||
<url>https://maven.vaadin.com/vaadin-prereleases</url> | ||
<snapshots> | ||
<enabled>false</enabled> | ||
</snapshots> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<configuration> | ||
<failOnMissingWebXml>false</failOnMissingWebXml> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>io.thorntail</groupId> | ||
<artifactId>thorntail-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>package</id> | ||
</execution> | ||
<execution> | ||
<id>start</id> | ||
</execution> | ||
<execution> | ||
<id>stop</id> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.vaadin</groupId> | ||
<artifactId>vaadin-bom</artifactId> | ||
<version>14.0.0.rc1</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
|
||
<!-- Wildfly Swarm Fractions --> | ||
<dependency> | ||
<groupId>io.thorntail</groupId> | ||
<artifactId>jaxrs</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.thorntail</groupId> | ||
<artifactId>cdi</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.thorntail</groupId> | ||
<artifactId>undertow</artifactId> | ||
</dependency> | ||
|
||
|
||
<dependency> | ||
<groupId>io.thorntail.examples</groupId> | ||
<artifactId>examples-base</artifactId> | ||
</dependency> | ||
|
||
<!--Vaadin related --> | ||
<dependency> | ||
<groupId>com.vaadin</groupId> | ||
<artifactId>vaadin</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>javax.enterprise</groupId> | ||
<artifactId>cdi-api</artifactId> | ||
<version>2.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
47 changes: 47 additions & 0 deletions
47
vaadin/vaadin14/src/main/java/org/wildfly/swarm/examples/vaadin/VaadinUI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package org.wildfly.swarm.examples.vaadin; | ||
|
||
import com.vaadin.flow.component.Composite; | ||
import com.vaadin.flow.component.button.Button; | ||
import com.vaadin.flow.component.html.Div; | ||
import com.vaadin.flow.component.html.Label; | ||
import com.vaadin.flow.component.notification.Notification; | ||
import com.vaadin.flow.component.orderedlayout.VerticalLayout; | ||
import com.vaadin.flow.router.Route; | ||
import com.vaadin.flow.theme.Theme; | ||
import com.vaadin.flow.theme.lumo.Lumo; | ||
|
||
|
||
/** | ||
* @author Sven Ruppert | ||
*/ | ||
|
||
@Route("") | ||
@Theme(value = Lumo.class, variant = Lumo.DARK) | ||
public class VaadinUI | ||
extends Composite<Div> { | ||
|
||
public VaadinUI() { | ||
getContent() | ||
.add(new Button() { | ||
{ | ||
setText("click me!"); | ||
addClickListener(event -> { | ||
final Notification notification = new Notification(); | ||
notification.add( | ||
new VerticalLayout( | ||
new Label("Hello, I am a notification with components!"), | ||
new Button() { | ||
{ | ||
setText("Bye!"); | ||
addClickListener(e -> notification.close()); | ||
} | ||
} | ||
)); | ||
notification.setPosition(Notification.Position.MIDDLE); | ||
notification.open(); | ||
}); | ||
} | ||
} | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters