PagedTable - Vaadin Add-on Directory
A Table component that uses pages instead of scrollingOnline Demo
Discussion Forum
Issue Tracker
Source Code
PagedTable version 0.1.0
Initial release.
PagedTable version 0.2.0
The component architecture is redone. The PagedTable now extends Table instead of PagedTable. This is a much cleaner solutioon but it means that it can't give you the controls directly. You can instead call myLayout.addComponent(table.createControls()) to get the standard control bar.
Features:
- Extends Table instead of CustomComponent
- Methods to get current and total page counts
- Methods to call next and previous page from the code.
- Get the standard controls with createControls()
- Give the user control to implement the next and previous button himself.
PagedTable version 0.3.0
New in version 0.3.0
- Changed handler to listners so that multiple items can listen to paged table events
- Changed the listener event to contain a PagedTableChangeEvent object with all data in it instead of providing separate primitives. This is more in line with the genreral way events are handled in Vaadin.
- Added a setCurrentPage(int) method for page jumping
- remade the default controls to contain page jumping and page size selector
- added style names to all components for theming
- implemented column sorting.
Big thanks goes to Kevin Ferrare for providing valuable feedback and improvements on the previous version.
PagedTable version 0.4.0
- Performance boost: generatedCells were called even thousands on times on page change. Now it is called only once per row so total call amount is the same as page length.
- Performance boost: Tables refreshRenderCells was called over a hundred times on page change and because of that all cells were rendered way too many times. Now it is called only 12 times.
- Bug fix: made the getCurrentPage() and getTotalAmountOfPages() to return value 1 when the container is empty. It caused some funky "page 1 of 0" states and it now shows "page 1 of 1" that is more logical
reordered the code in the default control bar so that it doesn't cause a page change event.
The issues reported have been fixed and as I've haven't got any new ones in a while. The component seems thus to work and I'm promoting it from it's Experimental stage to Beta stage.
PagedTable version 0.4.1
While making big performance boosts in 0.4.0, I accidentally introduced a bug which "nullified" some table features upon page change, like sorting and custom column headers. This problem is now fixed.
As a little extra bonus, this fix added a little more performance boost to the last fix. Version 0.4.0 dropped the calls on Table.refreshRenderedCells() from about a hundred per page change to six. This fix dropped it down to one. Seems like changing a container in a core Vaadin table calls refresh six times. Instead I disabled automatic item set change notifications from the container and fired one manually after the container item changes was done based on a page change.
PagedTable version 0.5.0
Added the feature to have the column sizes resized automatically on page change depending on the data in the table. Use table.setAlwaysRecalculateColumnWidths(true); to turn the feature on.
From now on I will have the version number of PagedTable in the file name so that you have a easier way to find out which version you are using. Remember to delete the old version
PagedTable version 0.5.1
Bugfix.
Some container return a id for container.getNextItemId(itemId) even when there is no next id, for example "return ++currentId;" Added a check that actually fetches the item before deciding if it should add it to the view or not.
PagedTable version 0.6.0
Changed the container implementation which is used behind the scenes to a totally new approach. New implementation should be a lot more robust and should not interfere with existing Table features.
Nearing 1.0..
PagedTable version 0.6.1
Proxy container now implements Container instead of extending AbstractContainer to make it compatible with Vaadin versions pre 6.6
PagedTable version 0.6.2
Three delegate methods did not delegate the data correctly, and the caused instead a infinite loop. These were fixed.
PagedTable version 0.6.3
PagedChangedListener is now public. Having default visiblilty on the interface caused problems in some environments.
PagedTable version 0.6.4
This release is form making the add-on Vaadin 7 compatible. This version will only work with Vaadin 7. Download 0.6.3 if you are using Vaadin 6!
PagedTable version 0.6.5
A big thank you to Roman Romanchuk for version 0.6.5. He pulled version 0.6.4 and updated it from Vaadin 7 alpha to Vaadin 7 beta, and then did a pull request of it back to me. The add-on is now compatible with the Vaadin 7 beta 7 and will most likely be compatible with Vaadin 7 final.
PagedTable version 0.7.0
This is the Vaadin 8 PagedTable in compatibility mode, for migrating from Vaadin 7 to Vaadin 8 projects. When you have migrated, I suggest you switch from Table to Grid. [GridExtensionPack Add-on](https://vaadin.com/directory#!addon/gridextensionpack-add-on) provides a Paged Container and that does similar things to Grid as this addon does to Table.
Thanks to Johannes for motivation :)