Add a base collection for resources.
Review Request #4221 — Created June 7, 2013 and submitted
Add a base collection for resources. BaseResourceCollection ties into our resource pagination mechanisms to allow paging through collections of models. The caller can do an initial fetch() to get the first page, and then call fetchNext()/fetchPrev() to get subsequent pages. Or, the caller can call fetchAll() to get every instance from the server.
Unit test pass. Tested with my review dialog change.
Description | From | Last Updated |
---|---|---|
I'm kind of confused--does this replace the list or add to it? fetchAll seems to indicate that it adds... |
david |
- Change Summary:
-
Made the docs more clear about how models are replaced on each page load, how it differs from fetchAll, and how that behavior can be changed.
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/settings.py Ignored Files: reviewboard/static/rb/js/collections/baseCollection.js reviewboard/static/rb/js/collections/tests/resourceCollectionTests.js reviewboard/static/rb/js/collections/resourceCollection.js
- Change Summary:
-
fetchAll now grabs 50 items at a time, instead of 25, in order to reduce the number of fetches.