Add-on Directory

← Back

Viritin

What apache-commons and Guava libraries does for Java, Viritin does it for Vaadin

Author

Contributors

Rating

Popularity

400+

Note, this add-on is available also for Vaadin versions 10+

Viritin is a server side enhancement library for Vaadin. It fixes some bad defaults in the core framework and provides more fluent and intelligent API for existing components. It also provides several major enhancements to databinding and provides completely new components made with server side composition (no widgetset is needed).

  • Better typed API for Table, Grid and various select components, easier to get started, better readability, safer refactoring. Endorsing java.util.collections and basic Java beans over proprietary Container-Item-Property.
  • Enhanced developer experience with extended basic layouts
  • Lots of handy Field implementations e.g. for common relation types (@ManyToMany, @OneToMany, @ElementCollection in JPA terminology, but not tied to JPA)
  • AbstractForm - a base class to avoid boilerplate code for basic entity editing
  • Enhancements to core Fields and BeanFieldGroup, better defaults, enhanced end user UX with on the fly validation
  • Setting browser cookies from basic Java code
  • Really scalable "lazy loading" solutions for Vaadin Components (see MTable, LazyComboBox, ListContainer + LazyList)
  • Often needed component compositions: PrimaryButton, ConfirmButton, DisclosurePanel ...
  • Cross-field validation support
  • Improved input fields
    • Support for custom HTML5 input properties (autocomplete, autocorrect...)
    • IntegerField (numeric keyboard on mobile devices, only accepts numbers, type of the field is Integer)
    • DoubleField
    • EmailField (email keyboard on mobile devices)

There is already a huge set of enhancements, couple of them are highlighted below. For a more complete view of what is provided, check out the project page in github for more details listing of examples. There is always room for enhancements and the project is easy to check out for development, so join the effort in github!

Sample code

MTable<Entity> t = new MTable(findBeans())
        .withProperties("property", "another")
        .withColumnHeaders("Property 1", "Second");
t.addMValueChangeListener(new MValueChangeListener<Entity>() {
    @Override
    public void valueChange(MValueChangeEvent<Entity> event) {
        editEntity(event.getValue());
    }
});
// with Viritin
setContent(new MVerticalLayout(new MHorizontalLayout(c, d).withFullWidth())
                .expand(new MHorizontalLayout(menu).expand(mainContent)));

// same without Viritin

  VerticalLayout wrapper = new VerticalLayout();
        wrapper.setMargin(true);
        wrapper.setSpacing(true);
        wrapper.setHeight("100%");
        HorizontalLayout toolbar = new HorizontalLayout(c, d);
        toolbar.setWidth("100%");
        toolbar.setMargin(false);
        toolbar.setSpacing(true);
        HorizontalLayout wrapper2 = new HorizontalLayout();
        wrapper2.addComponent(menu);
        wrapper2.addComponent(mainContent);
        wrapper2.setSizeFull();
        mainContent.setSizeFull();
        wrapper2.setExpandRatio(mainContent, 1);
        wrapper.addComponents(toolbar, wrapper2);
        wrapper.setExpandRatio(wrapper2, 1);
        setContent(wrapper);
MTable<Update> table;

@Inject
GPSRouteService s;

@PostConstruct
void init() {
    add(table = new MTable<>(s::fetchUpdates, s::getEntityCount));
}

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

Slightly backwards incompatible release preparing for jsoup upgrade in next Vaadin version (moderate security issue)

Released
2022-09-02
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 8.0+
Vaadin 8.1+ in 2.1
Vaadin 7.6+ in 1.61
Vaadin 7.4+ in 2.12
Vaadin 7.3+ in 1.31
Browser
Browser Independent

Animator - Vaadin Add-on Directory

Animator allows you to add CSS transitions and animations to any component from the server side. Animator - Vaadin Add-on Directory
Version 2.0 ========= The Animator is an extension that can animate any component in your Vaadin application using an easy-to-use server side API. The animations are implemented using CSS transitions and animations in the browser. It provides low level methods for defining your animations just as you like and not limiting you to a set of predefined animation types (unlike the previous version of Animator and AnimatorProxy). The Animator is well suited for adding UI flourishes to your app, without overwhelming the user. It's not well suited for building complex animation sequences. DEPENDENCIES (you need to add these for Maven explicitly in your pom.xml): - DOM add-on 0.1.0 (see links on the right side) Previous versions (1.7 and 1.6) ======================== Animate any component, even sub-windows with a small set of usable animations. The AnimatorProxy is an invisible component that animates other components directly, without additional component hierarchy or DOM element overhead. In principal, you only need one AnimatorProxy in your application, and you can then animate any other components in that same application: size, position, fading and rolling/curtaining. The AnimatorProxy also provides a convenient listener mechanism for all animations that are run through it, allowing you to make actions after an animation has finished. See the online demo for available animation types and examples. All animations allow you to specify the duration and delay of the animation. The animations are atomic, so they won't repeat automatically each time the user reloads the application. Version summary ============= 3.0 == Vaadin 8 2.0 == Vaadin 7, connector extension, CSS transitions and animations 1.7 == Vaadin 7, legacy component, JS animations 1.6 == Vaadin 6, JS animations
Source Code
Discussion Forum
Author Homepage
Issue Tracker
DOM add-on (required for 2.0)
Online Demo (v 1.7 & 1.6)

Animator version 1.0
null

Animator version 1.1
Compiled now with Java 5. Added methods for setting the Animator's initial state to rolled up/down and faded out/in. Added method to cancel all pending animations.

Animator version 1.5
- Fixed Animator fade animations for Internet Explorer 8. - Added AnimatorProxy component, allowing more animation types and sub-window animations. - Added new Disclosure component, which uses AnimatorProxy to create a collapsible panel. - Added new demo application.

Animator version 1.5.2
* Fixed Disclosure.setContent(Component newContent) to actually update the content to the component hierarchy as well * Made all the private members in Disclosure protected. * added Disclosure.isOpen() method

Animator version 1.6.2
* Added Disclosure.get/setDisclosureCaption(String caption) * Added preliminary size and position animation support for all components. Implementation might still change, but see the example application in the package how to use. * Added incremental size and position animation support (previously only absolute pixel values were supported) * Changed CSS: .v-disclosure-button is now .v-disclosure-caption

Animator version 1.6.3
- Fixed a bug in Disclosure.setContent() - Removed reference to VConsole (Vaadin 6.4 dependant) from VAnimatorProxy 1.6.2 - Added Disclosure.get/setDisclosureCaption(String caption) - Added preliminary size and position animation support for all components. Implementation might still change, but see the example application in the package how to use. - Added incremental size and position animation support (previously only absolute pixel values were supported) - Changed CSS: .v-disclosure-button is now .v-disclosure-caption

Animator version 1.6.4
* Renamed README:txt to README.txt (was causing troubles with Maven) 1.6.3 - Fixed a bug in Disclosure.setContent() - Removed reference to VConsole (Vaadin 6.4 dependant) from VAnimatorProxy 1.6.2 - Added Disclosure.get/setDisclosureCaption(String caption) - Added preliminary size and position animation support for all components. Implementation might still change, but see the example application in the package how to use. - Added incremental size and position animation support (previously only absolute pixel values were supported) - Changed CSS: .v-disclosure-button is now .v-disclosure-caption

Animator version 1.6.5
Added serial version uid's for all server side classes, which should make the add-on work in Google App Engine.

Animator version 1.6.6
Added AnimatorProxy.removeListener(AnimationListener). AnimatorProxy.cancelAll() now cancels any pending animations on the client as well.

Animator version 1.7.0
Initial quick'n'dirty port to Vaadin 7 (alpha2). Proper conversion at some point. Version 1.7 will be dedicated to Vaadin 7, while 1.6 will remain the branch for Vaadin 6 updates. New major features will only be available for the 1.7 version. 1.6 will only receive bug fixes from now on. 1.7 version will no longer include the Animator wrapper component, only the AnimatorProxy will be available.

Animator version 1.7.1
Added AnimatorProxy.removeListener(AnimationListener). AnimatorProxy.cancelAll() now cancels any pending animations on the client as well.

Animator version 1.7.3
Fixed the widgetset compilation issue which caused 1.7.2 to not compile (removed the server package and moved the classes to the root package). Moved shared dependencies to the shared package. Note: The package for Animator and Animator proxy is now org.vaadin.jouni.animator The package for AnimType is now org.vaadin.jouni.animator.shared

Animator version 1.7.4
Changed one WeakHashMap to a regular HashMap. JAR should not contain extra .class files or demo application classes. Tested with Vaadin 7.1.14

Animator version 2.0.0
New major version with a new API which is not backwards compatible with the old version. New features include a low level, more versatile API which is not limited to predefined animation types. The animations are implemented using CSS transitions and animations in the browser, meaning that Internet Explorer 8 and Internet Explorer 9 do not show the animations (they will transition to the end values instantly).

Animator version 3.0.0
Animator add-on now works with Vaadin 8

Online