Skip to content

Resized table has wrong pageLength #20

Description

@consros

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions