Table caching rate shouldn't be causing additional calls of getItemIds #3280

Closed
vaadin-bot opened this Issue Dec 6, 2012 · 1 comment

Projects

None yet

1 participant

@vaadin-bot
Collaborator

Originally by ondrej-kvasnovsky


When we create table and container like this:

Table table = new Table("Lazy loaded table");
table.setCacheRate(50);

LazyLoadedContainer container = new LazyLoadedContainer(User.class);
table.setContainerDataSource(container);

class LazyLoadedContainer extends BeanContainer {

    // ...

    @Override
    public int size() {
        return userService.count();
    }

    @Override
    public List getItemIds(int startIndex, int numberOfIds) {
        int endIndex = startIndex + numberOfIds;
        List list = userService.list(startIndex, endIndex);
        return list;
    }
}

Then (I would say) only one call of getItemIds should happen when the table is rendered first time. But two calls are done actually.

startIndex: 0, endIndex: 15
startIndex: 0, endIndex: 766

Would it be possible to avoid the first call?

startIndex: 0, endIndex: 15

Imported from https://dev.vaadin.com/ issue #10473

@vaadin-bot
Collaborator

Originally by @Artur-


A lot of tickets have been left hanging in the issue tracker through the years. Some of them are still relevant, some of them have been fixed a long time ago and some are no longer valid. To get a better look on what is important and still relevant, we are closing old tickets which have not been touched in a long time.

No further work will be done on this ticket unless someone indicates that it's still relevant.

If this ticket is still relevant to you, please reopen it.

@vaadin-bot vaadin-bot closed this Dec 9, 2014
@vaadin-bot vaadin-bot added the bug label Dec 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment