GridExtensionPack is a collection of more or less useful extensions for tweaking Grid UX.
Online demos for extensions are not available right now.
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
To see the demo, navigate to http://localhost:8080/
For further development of this add-on, the following tool-chain is recommended:
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.
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:
The issues for this add-on are tracked on its GitHub page. All bug reports and feature requests are appreciated.
Contributions are welcome, but there are no guarantees that they are accepted as such. Process for contributing is the following:
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
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
TableSelectionModel gives you client-side selection UX similar to Table. It supports Multiple selection in simple mode and with ctrl + click.
A simple data provider wrap. Works through paging and provides its own PagingControls for a cleaner API.
This does not work with Table.
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.
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.
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.
A simple helper extension that gives you an API that you can use to force the repaint of a row.
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
No online JavaDoc available (for now at least).