<dependency>
<groupId>org.linkki-framework</groupId>
<artifactId>linkki-core-vaadin-flow</artifactId>
<version>2.4.9</version>
</dependency>
Getting Started
You can either add the required dependencies to an existing project or use one of the Maven archetypes to get started.
Maven dependencies
To create a linkki project, you need one of the following dependencies depending on the feature set you need:
<dependency>
<groupId>org.linkki-framework</groupId>
<artifactId>linkki-vaadin-flow-component</artifactId>
<version>2.4.9</version>
</dependency>
linkki-vaadin-flow-component
contains the following additional features:
-
Sidebar layout
<dependency>
<groupId>org.linkki-framework</groupId>
<artifactId>linkki-application-framework-vaadin-flow</artifactId>
<version>2.4.9</version>
</dependency>
linkki-application-framework
contains the following additional features:
-
Dialogs
-
LinkkiUi
withApplicationLayout
andApplicationConfig
as well as an adjusted theme -
UI Components to display validation messages
In addition to the linkki dependency, a linkki application with Vaadin may require a Vaadin Spring Boot starter.
Maven Archetypes
linkki can be used for a plain Vaadin web application or with Spring Boot. For each of those options, there is a matching Maven archetype that creates a new project with all necessary dependencies and some sample code to get started. They can be created from a command line:
mvn archetype:generate -DarchetypeGroupId=org.linkki-framework.archetypes -DarchetypeArtifactId=linkki-archetype-plain-application-vaadin-flow -DarchetypeVersion=2.4.9
The resulting application can be deployed to your application server of choice or simply started with mvn clean package org.eclipse.jetty:jetty-maven-plugin:run
, where it can be viewed at http://localhost:8080/
.
mvn archetype:generate -DarchetypeGroupId=org.linkki-framework.archetypes -DarchetypeArtifactId=linkki-archetype-spring-application-vaadin-flow -DarchetypeVersion=2.4.9
The resulting application can be started with java -jar target/*.jar
and be viewed at http://localhost:8080/
.
Initial project structure
BusinessPartner
-
A spring specific class which allows our project to be run as a Java application. This class will not be found in the plain archetype.
BusinessPartnerInfo
-
Defines basic information about our linkki application.
BusinessPartnerConfig
-
Provides an instance of our
BusinessPartnerInfo
class and providesApplicationMenuItemDefinition
items to create anApplicationMenu
for theApplicationHeader
. BusinessPartnerLayout
-
Uses the
BusinessPartnerConfig
class to provide information for our application. HelloPmo
-
Defines a section on the webpage which is used in the UI of the application. You can apply annotations like
@UITextfield
to your methods to create specific UI elements. For more information about creating a UI see UI elements. BusinessPartnerPage
-
Allows displaying and editing data in a certain layout and can consist of so called sections defined with multiple PMOs.
BusinessPartnerView
-
Defines the entrypoint of a our main page.