lsmith/yui3 — Issue #16: Create Paginator widget
Author: lsmith
Created: 2011-12-13 10:10:48+00:00
State: open

The widget should be a standalone instantiable class with no coupling to DataTable.

See what can be done using submodules to break up the UI component implementation. At this point, the plan is to implement something much like YUI 2 Paginator, but try to simplify the API if possible. I'm fine sticking with rendering a single container of controls or rendering individual controls. No need to allow configuring multiple containers. If pagination controls are wanted above and below, two Paginators can be rendered and event-bound to one another.

Alternately, build Paginator in a way similar to DT, in that a View is configured. The default view might support multiple containers, whereas a DT might consume Paginator in a `footerView` implementation.

In terms of how pagination will be applied to the data in the DT ML, it seems a separate ML for the `bodyView` instance should be used that held only those Models in the current page. This should be a class extension that adds pagination APIs to the DT proto and is activated by the `rowsPerPage` or `itemsPerPage` config. It should be smart about conflicts with existing `footerViews`, though. But now I'm too tired to think this one through.zzzzzzz