Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resized table has wrong pageLength #20

Open
consros opened this issue Aug 29, 2014 · 0 comments
Open

Resized table has wrong pageLength #20

consros opened this issue Aug 29, 2014 · 0 comments

Comments

@consros
Copy link

consros commented Aug 29, 2014

If user resizes a PagedTable, in current vaadin implementation (7.2.6) the pageLength property is being changed not over setter (setPageLength) but directly. Therefore the PagedTable doesn't know about this change.

There are two possible ways to fix it.

  1. The risky one. The property is being updated in Table.changeVariables() method. We can override this method and there call the setter. However there is no warranty there will be no new direct property sets in up coming vaadin releases. Therefore it is risky.

  2. The inconsistent one. We can manipulte the getter. We can override the getPageLengh() method in the PagedTable as following:

    @OverRide
    public int getPageLength() {
    return null == container ? super.getPageLength() :
    container.getPageLength();
    }

And use it everywhere the pageLength is needed in the PagedTable class (it is so already)
So, the pageLength of the container will be used and it will differ(!) from the pageLength of the Table class.

Please check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant