Directory

← Back

Flow Viritin

The commons library for Vaadin 10+. Uploads, downloads, Geolocation, forms, fieds, fluent API...

Author

Rating

Popularity

1600+

Note:

  • 2.x series for Vaadin 24 (Maven central)
  • 1.7.1+ for Vaadin 23.3+ (distribution via Maven central, directory repository is not necessary needed, "coordinates": in.virit:viritin)
  • 0.9.0 for Vaadin 22+ (distribution via Maven central, directory repository is not necessary needed, "coordinates": in.virit:viritin)
  • 0.4.0 for Vaadin 14

Flow Viritin continues with the same mission as Viritin with earlier Vaadin version. Let's add small handy components and Java API extensions to put all Vaadin developers to Flow.

Feature summary (not a complete list):

Fluent API wrappers for most vaadin-core components

"V" prefixed components provide most core APIs are available with a version that returns the component itself. These methods typically start with "with" instead of "set". This allows configuration of objects e.g. in field declaration or without declaring an extra variable. When used in appropriate places, this can produce more concise and readable code.

Uploads & Download like they should be

  • UploadFileHandler aka Upload component with a proper Java API.
    • Simply passes the input stream for you to handle, no weird Vaadin specific APIs
    • Read/handle the contents while it is being uploaded, also works with Spring Boot
    • Throttles amount of concurrent connections used, instead of choking the network
  • DynamicFileDownloader for simple generation of dynamically generated file downloads. No need to buffer content in memory, but simply write it to the OutputStream, like you would do with e.g. raw Servlet API
  • ByteArrayUploadField to bind a file upload to a byte[] field with Binder.

Access to browser API & others

  • Geolocation API using a pure Java API
  • BrowserCookie helper that works well with web sockets too
  • LumoProps, Java enumeration for easier discoverability (& redefining/using) of the handy Lumo theme css properties.
  • WebStorage helper to save data in the browsers localStorage or sessionStorage (available for backwards compatibility, but the same implementation found in core as well these days)

VGrid

Forms & Fields

  • AbstractForm, configures binder properly for naming convention based binding and provides basic for features such as save and cancel buttons that enable themselves based on the user actions.
  • CommaSeparatedStringField to edit List with Binder
  • SubListSelector to pick a List from a large set of Ts with Binder (note, no re-ordering yet).
  • DeleteButton, shows confirm dialog and is styled so that one don't accidentally click it
  • Tree component to visualise hierarchical structures
  • EnumSelect
  • ElementCollectionField a field to edit e.g. List
    type structure
  • LocalDateTimeField for editing LocalDateTime objects with Binder Use DateTimePicker from core, that is available these days.

Uncategorised helpers

  • RichText component to easily show Html or Markdown formatted text. Online demo
  • Traditional paging with PagingGrid. Online demo
  • CustomLayout component (renders raw html superfast, while you can still place Vaadin components inside it)
  • BorderLayout (like in ~ Swing, implemented with CSS Grid)
  • A generic MainLayout suitable for many small to medium sized projects, based on the AppLayout and SideNave components. Populates your views to the menu automatically and this way removes a ton of boilerplate code of your app.
  • TreeTable. Like TreeGrid in the core, but with much easier API to populate items. Also properly supports lazy loading and scrolling to given item without extra hacks.
  • ResizeObserver, Java API for similarly named JS API. Handy way to detect the size( and react to changes) of any UI component for devices optimal configuration.

Documentation

The test directory contains usage examples for components. Some components have decent JavaDocs. An actual manual would be great and an easy way to contribute back if you find the helpers useful.

Contributing

Yes please! TIP: Check the project out alongside your app project and create handy helpers directly to Viritin. Send in pull requests and join the effort!

Mirjan Merruko and Stefan Freude are so far the most active contributors to this great tool.

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Released
2024-05-20
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 24
Vaadin 10+ in 0.1.4
Vaadin 18+ in 0.5.0
Vaadin 14+ in 0.2.6
Vaadin 21+ in 0.7.0
Vaadin 13+ in 0.2.0
Vaadin 19+ in 0.8.2
Vaadin 23 in 1.0.0
Browser
N/A

Flow Viritin - Vaadin Add-on Directory

The commons library for Vaadin 10+. Uploads, downloads, Geolocation, forms, fieds, fluent API... Flow Viritin - Vaadin Add-on Directory
*Note:* * 2.x series for Vaadin 24 (Maven central) * 1.7.1+ for Vaadin 23.3+ (distribution via Maven central, directory repository is not necessary needed, "coordinates": in.virit:viritin) * 0.9.0 for Vaadin 22+ (distribution via Maven central, directory repository is not necessary needed, "coordinates": in.virit:viritin) * 0.4.0 for Vaadin 14 Flow Viritin continues with the same mission as Viritin with earlier Vaadin version. Let's add small handy components and Java API extensions to put all Vaadin developers to Flow. ## Feature summary (not a complete list): ### Fluent API wrappers for most vaadin-core components "V" prefixed components provide most core APIs are available with a version that returns the component itself. These methods typically start with "with" instead of "set". This allows configuration of objects e.g. in field declaration or without declaring an extra variable. When used in appropriate places, this can produce more concise and readable code. ### Uploads & Download like they should be * UploadFileHandler aka Upload component with [a proper Java API](https://vaadin.com/blog/uploads-and-downloads-inputs-and-outputs). * Simply passes the input stream for you to handle, no weird Vaadin specific APIs * Read/handle the contents while it is being uploaded, also works with Spring Boot * Throttles amount of concurrent connections used, instead of choking the network * DynamicFileDownloader for simple generation of dynamically generated file downloads. No need to buffer content in memory, but simply write it to the OutputStream, like you would do with e.g. raw Servlet API * ByteArrayUploadField to bind a file upload to a `byte[]` field with Binder. ### Access to browser API & others * Geolocation API using a pure Java API * BrowserCookie helper that works well with web sockets too * LumoProps, Java enumeration for easier discoverability (& redefining/using) of the handy Lumo theme css properties. * ~WebStorage helper to save data in the browsers localStorage or sessionStorage~ (available for backwards compatibility, but the same implementation found in core as well these days) ### VGrid * Fluent API configuring like with other Viritin components * [Supports Java `record`s](https://github.com/viritin/flow-viritin/blob/v24/src/test/java/org/vaadin/firitin/RecordsWithGrid.java) * [CellFormatter](https://github.com/viritin/flow-viritin/blob/v24/src/test/java/org/vaadin/firitin/Grids.java#L45-L63) to modify all "raw data cells" columns or based on column details. ### Forms & Fields * AbstractForm, configures binder properly for naming convention based binding and provides basic for features such as save and cancel buttons that enable themselves based on the user actions. * CommaSeparatedStringField to edit List with Binder * SubListSelector to pick a List from a large set of Ts with Binder (note, no re-ordering yet). * DeleteButton, shows confirm dialog and is styled so that one don't accidentally click it * Tree component to visualise hierarchical structures * EnumSelect * ElementCollectionField a field to edit e.g. List
type structure * ~LocalDateTimeField for editing LocalDateTime objects with Binder~ Use DateTimePicker from core, that is available these days. ### Uncategorised helpers * RichText component to easily show Html or Markdown formatted text. [Online demo](https://addons.dokku1.parttio.org/) * Traditional paging with PagingGrid. [Online demo](https://addons.dokku1.parttio.org/paginggrid) * CustomLayout component (renders raw html superfast, while you can still place Vaadin components inside it) * BorderLayout (like in ~ Swing, implemented with CSS Grid) * A generic MainLayout suitable for many small to medium sized projects, based on the AppLayout and SideNave components. Populates your views to the menu automatically and this way removes a ton of boilerplate code of your app. * TreeTable. Like TreeGrid in the core, but with much easier API to populate items. Also properly supports [lazy loading](https://vaadin.com/blog/lazy-loading-hierarchical-data-from-ui-to-database) and scrolling to given item without extra hacks. * [ResizeObserver](https://github.com/viritin/flow-viritin/blob/v24/src/test/java/org/vaadin/firitin/ResizeObserverView.java), Java API for similarly named JS API. Handy way to detect the size( and react to changes) of any UI component for devices optimal configuration. ## Documentation The [test directory](https://github.com/viritin/flow-viritin/tree/v24/src/test/java/org/vaadin/firitin) contains usage examples for components. Some components have decent JavaDocs. An actual manual would be great and an easy way to contribute back if you find the helpers useful. ## Contributing Yes please! TIP: Check [the project](https://github.com/viritin/flow-viritin) out alongside your app project and create handy helpers directly to Viritin. Send in pull requests and join the effort! Mirjan Merruko and Stefan Freude are so far the most active contributors to this great tool.
Online