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
- git clone https://github.com/tsuoanttila/GridExtensionPack.git
- mvn clean install
- cd GridExtensionPack-demo
- mvn jetty:run
To see the demo, navigate to http://localhost:8080/
For further development of this add-on, the following tool-chain is recommended:
- Eclipse IDE
- m2e wtp plug-in (install it from Eclipse Marketplace)
- Vaadin Eclipse plug-in (install it from Eclipse Marketplace)
- Chrome browser
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.
- Vaadin 8 support
- Most old features ported for the Vaadin 8 version
- Requires the use of SelectGrid instead of Grid to allow TableSelectionModel
- Removed features available in the Framework itself
- CacheStrategyExtension has been added
- Many previously private methods are now protected
- A bug with filtering in PagedContainer has been fixed
- New version of header wrapping extension
- Header wrapping can now be used with alternative header row heights with other themes than Valo
- Header wrapping is now compatible with resizable columns
- Based on Vaadin 7.6
- TableSelectionModel instead of a extension hack
- TableSelectionModel now has simple Shift selection logic
- GridRefresher for forcing redraw an item
- Removed ContextClickExtension
- ContextClick and SidebarMenu bug fixes
- Header wrapping extension
- Bug fixes
- Server-side ContextClickEvent
- Table-like client-side selection UX
- PagedContainer
- SidebarMenuExtension
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:
- Not much for now
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:
- Fork this project
- Create an issue to this project about the contribution (bug or feature) if there is no such issue about it already. Try to keep the scope minimal.
- Develop and test the fix or functionality carefully. Only include minimum amount of code needed to fix the issue.
- Refer to the fixed issue in commit
- Send a pull request for the original project
- Comment on the original issue that you have implemented a fix for it
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).