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

DtoDataProvider#iterator(int offset, int amount) behaves unexpectedly #30

Closed
messo opened this Issue Apr 10, 2012 · 0 comments

Comments

Projects
None yet
2 participants
@messo
Copy link

messo commented Apr 10, 2012

In general it works fine, because Wicket internals invoke this method depending on which page we are, and how many items we would like to show to end users. But one would like to use the same provider for other purposes, for example: exporting the whole dataset to a CSV for example.
In this case the developer would invoke provider.interator(0, provider.size()); but this behaves unexpectedly, because it returns only the first page of the results, but clearly provider.size() > itemsPerPage.
I will attach a pull request to fix this.

mattbrictson added a commit that referenced this issue Apr 10, 2012

Ensure params passed to iterator() always honored
Refactor to make it more clear when implicit amount/offset are being used based on the pageable component, vs explicit amount/offset are being used as passed into the `iterator` method.

* `getCachedResultOrLoad()` -- implicit version
* `getCachedResultOrLoad(int, int)` -- explicit version

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