Published on Vaadin  Directory Stars on Vaadin Directory

GridExtensionPack Add-on for Vaadin

GridExtensionPack is a collection of more or less useful extensions for tweaking Grid UX.

Online demo

Online demos for extensions are not available right now.

Download release

Official releases of this add-on are available at Vaadin Directory. For Maven instructions, download and reviews, go to https://vaadin.com/directory/component/gridextensionpack-add-on

Building and running demo

To see the demo, navigate to http://localhost:8080/

Development with Eclipse IDE

For further development of this add-on, the following tool-chain is recommended:

Importing project

Choose File > Import... > Existing Maven Projects

Note that Eclipse may give "Plugin execution not covered by lifecycle configuration" errors for pom.xml. Use "Permanently mark goal resources in pom.xml as ignored in Eclipse build" quick-fix to mark these errors as permanently ignored in your project. Do not worry, the project still works fine.

Release notes

Version 2.0.0

Version 1.1.0

Version 1.0.0

Version 0.2.4

Version 0.2.3

Version 0.2.2

Roadmap

This component is developed as a hobby with no public roadmap or any guarantees of upcoming releases. That said, the following features are planned for upcoming releases:

Issue tracking

The issues for this add-on are tracked on its GitHub page. All bug reports and feature requests are appreciated.

Contributions

Contributions are welcome, but there are no guarantees that they are accepted as such. Process for contributing is the following:

License & Author

Add-on is distributed under Apache License 2.0. For license terms, see LICENSE.txt.

GridExtensionPack is written by Teemu Suo-Anttila

SidebarMenuExtension is written by Anna Koskinen

Developer Guide

Getting started

Every extension has it's own API that you can read from the classes. TableSelectionModel is (as the name indicates) a SelectionModel. Use it like this

TableSelectionModel model = new TableSelectionModel();
model.setMode(TableSelectionMode.SIMPLE);
grid.setSelectionModel(model);

Using the PagedDataProvider:

// This is your existing data
PagedDataProvider<?> dataProvider = new PagedDataProvider<>(
                DataProvider.ofCollection(data));
Grid grid = new Grid();
grid.setDataProvider(dataProvider);

// PagedDataProvider has a helper class for page manipulation
PagingControls controls = container.setGrid(grid);

// Set grid to certain size
controls.setPageLength(5);

// Jump to fourth page (0-based indexing)
controls.setPage(3);

// Jump to next (fifth) page
controls.nextPage();

For a more comprehensive example, see DemoUI.java in GridExtensionPack-demo

Features

TableSelectionModel

TableSelectionModel gives you client-side selection UX similar to Table. It supports Multiple selection in simple mode and with ctrl + click.

PagedDataProvider

A simple data provider wrap. Works through paging and provides its own PagingControls for a cleaner API.

This does not work with Table.

PagedContainer (Vaadin 7.x only)

A simple Container wrap on top of any indexed container. Works through paging and provides its own PagingControls for a cleaner API.

This also works with Table, but I don't intend to track any possible issues with it.

SidebarMenuExtension

This extension provides a way to add custom items in the Grids SidebarMenu. Setting styles and custom captions along with running certain code when the menu item is clicked, this is the easiest way to get your special actions in to said menu.

WrappingGridExtension

This extension makes possible to wrap text in headers. Sometimes you need long header description in columns where the data content is short (e.g. number). With this extension you can enable wrapping text in header row and it auto adjusts the header row height accordingly.

GridRefresher

A simple helper extension that gives you an API that you can use to force the repaint of a row.

CacheStrategyExtension

This extensions provides an easy way to configure a custom cache strategy for Grid client-side. It uses an int value and a double value with a simple equation to count the limits. See class JavaDoc for example values

API

No online JavaDoc available (for now at least).