vaithu / holon-vaadin-flow

Holon Platform Vaadin Flow (10+) integration module. Provides the platform integration with the Vaadin Flow web applications platform, focusing on the user interface components and data binding features using the Holon Platform Property model.
Apache License 2.0
1 stars 0 forks source link

Holon platform Vaadin Flow module

Latest release: 5.5.3

This is the Vaadin Flow UI module of the Holon Platform, which represents the platform support for the Vaadin Flow web applications platform, focusing on the user interface components, navigation and data binding features.

See the module documentation for details.

Just like any other platform module, this artifact is part of the Holon Platform ecosystem, but can be also used as a stand-alone library.

See Getting started and the platform documentation for further details.

Previous Vaadin versions

The Holon platform Vaadin module is also available for previous Vaadin platform versions:

At-a-glance overview

Component builders:

Div label = Components.label()
  .text("Label text")
  .width("200px")
  .build();

Dialog:

Components.dialog.question(confirm -> {
    // handle user response (true/false)
  }).text("Default text", "message.code")
  .open();

Item listing:

PropertyListing listing = PropertyListing.builder(SUBJECT) 
  .dataSource(datastore, TARGET)
  .withQueryFilter(NAME.isNotNull())
  .withQuerySort(ID.asc())
  .frozenColumns(1) 
  .withComponentColumn(item -> new Button(item.getValue(NAME)))
    .sortUsing(NAME)
    .displayAsFirst()
    .add()
  .multiSelect()
  .withSelectionListener(event -> {
    // ...
  })
  .build();

listing.refresh();

Input components and forms:

Input<String> input = Input.string()
  .label("My label", "label.message.code")
  .maxLength(50)
  .build();

SingleSelect<String> singleSelect = Input.singleSelect(ID)
  .dataSource(datastore, TARGET, SUBJECT)
  .build();

PropertyInputForm form = PropertyInputForm.formLayout(SUBJECT)
  .hidden(ID)
  .propertyCaption(NAME, "My name", "name.message.code")
  .build();

form.validate();

PropertyBox value = form.getValue();

Query parameters injection:

@Route("some/path")
public class View extends Div {

  @QueryParameter
  private String parameter1;

  @QueryParameter("myparam2")
  private Integer parameter2;

  @QueryParameter(value = "myparam3", required = true)
  private LocalDate parameter3;

}

Navigator API:

Navigator navigator = Navigator.get();

navigator.navigateTo("some/path");

navigator.navigateBack();

navigator.navigation(View.class)
  .withQueryParameter("myparam", new Integer(1))
  .withQueryParameter("multi", "a", "b", "c")
  .navigate();

Code structure

See Holon Platform code structure and conventions to learn about the "real Java API" philosophy with which the project codebase is developed and organized.

Getting started

System requirements

The Holon Platform is built using Java 8, so you need a JRE/JDK version 8 or above to use the platform artifacts.

Releases

See releases for the available releases. Each release tag provides a link to the closed issues.

Obtain the artifacts

The Holon Platform is open source and licensed under the Apache 2.0 license. All the artifacts (including binaries, sources and javadocs) are available from the Maven Central repository.

The Maven group id for this module is com.holon-platform.vaadin and a BOM (Bill of Materials) is provided to obtain the module artifacts:

Maven BOM:

<dependencyManagement>
    <dependency>
        <groupId>com.holon-platform.vaadin</groupId>
        <artifactId>holon-vaadin-flow-bom</artifactId>
        <version>5.5.3</version>
        <type>pom</type>
        <scope>import</scope>
    </dependency>
</dependencyManagement>

See the Artifacts list for a list of the available artifacts of this module.

Using the Platform BOM

The Holon Platform provides an overall Maven BOM (Bill of Materials) to easily obtain all the available platform artifacts:

Platform Maven BOM:

<dependencyManagement>
    <dependency>
        <groupId>com.holon-platform</groupId>
        <artifactId>bom</artifactId>
        <version>${platform-version}</version>
        <type>pom</type>
        <scope>import</scope>
    </dependency>
</dependencyManagement>

See the Artifacts list for a list of the available artifacts of this module.

Build from sources

You can build the sources using Maven (version 3.3.x or above is recommended) like this:

mvn clean install

Getting help

Examples

See the Holon Platform examples repository for a set of example projects.

Contribute

See Contributing to the Holon Platform.

Gitter chat Join the contribute Gitter room for any question and to contact us.

License

All the Holon Platform modules are Open Source software released under the Apache 2.0 license.

Artifacts list

Maven group id: com.holon-platform.vaadin

Artifact id Description
holon-vaadin-flow Core artifact
holon-vaadin-flow-navigator The Navigator API
holon-vaadin-flow-spring Spring integration
holon-vaadin-flow-spring-boot Spring Boot integration
holon-starter-vaadin-flow Spring Boot starter
holon-starter-vaadin-flow-undertow Spring Boot starter using Undertow as embedded servlet container
holon-vaadin-flow-bom Bill Of Materials
documentation-vaadin-flow Documentation