Add-on Directory

VelocityComponent - Vaadin Add-on Directory

A Helper Library to build JavaScript components for Vaadin using Velocity templating engine powered JS. VelocityComponent - Vaadin Add-on Directory
This is a "meta-add-on", a library for add-on developers. This enhances the Element API and its executeJs method with the powers of the [Velocity template engine](https://velocity.apache.org). This helper library is intended to be used only temporarily, until StringTemplate based API is ready in both Java itself and Vaadin. Check the usage from the GitHub projects `src/test` directory. A real world usage example is available at [MapLibre GL integration](https://github.com/parttio/maplibre). Compared to standard `getElement().executeJs()` style API, this library provides the following benefits: * Parameter values are more readable in the JS snippets, e.g. '$foo' instead of '$0' * Possibility to pass JS objects and/or JSON to JS snippets, without transferring as string (less code, better performance). **Note, Vaadin 25 supports this as well now** * Velocity template based JS code generation in general, e.g. generate JS code using loops and conditionals
View on GitHub

VelocityComponent version 0.0.2
Only tested with Vaadin 24.1.

VelocityComponent version 0.0.3

VelocityComponent version 0.0.4
Vaadin 25 compatibility