...
The Pager component fires the following eventsevent:
Event | Type | Description | Parameters | Parameter Description |
---|---|---|---|---|
| default | Fired whenever the pager's "model" changes - that is, whenever there is a change to the displayed range of data for the pager, caused by a change to the page index, page size or underlying data |
| |
Functions
...
fluid.pager.next();
Selects the next page in the list of pages. If the current page is the last one, no action is taken.In addition, in this release, the Pager also supports the following events, which are however implementation-specific, and part of a transitional implementation strategy before the adoption of the Data Binder and BeanInvalidationModel:
Event | Type | Description | Parameters | Parameter Description |
---|---|---|---|---|
| default | Fired when the implementation wishes to initiate the change of state corresponding to the selection of a new page |
| A structure which includes either the member |
| default | Fired when the implementation wishes to initiate the change of state corresponding to an updated page size for the visible range | newPageSize | an integer representing the desired new page size |
...
that
organization
Where the component that
is constructed by a line such as
Code Block | ||||
---|---|---|---|---|
| ||||
var that = fluid.pager.previous(component, options); |
Selects the previous page in the list of pages. If the current page is the first one, no action is taken.
...
fluid.pager.selectPage(pageNum);
Selects a particular page in the list of pages. If the given page number (pageNum
) is invalid, or is the same as the current page, no action is taken, the returned object will have the following top-level organisation in terms of subcomponents and model:
Code Block | ||||
---|---|---|---|---|
| ||||
that.model
|
The "model" of the pager - note to distinguish carefully between the pager's model, and the data model of the user. The pager's model consists of the state of the paging component, which specifies the page index position, overall data range and page size. The user's data model consists of the actual data being paged, which is stored in that.options.dataModel
. This, the pager's model, should be treated as read-only via this interface, and should only be manipulated by use of the component's event system.
The pager model is laid out as following:
Field | Type | Primary/Computed | Description | ||
---|---|---|---|---|---|
pageIndex | integer | Primary | The current index of the page, expressed 0-based amongst the range of pages | ||
pageSize | integer | Primary | The number of "items" which may be shown on a page | ||
totalRange | integer | Primary | The total count of "items" in the underlying user's data model | ||
pageCount | integer | Computed | The limit of the range in which pageIndex is expressed | ||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="29035548-0edf-4633-bb5d-09572c8827ff"><ac:plain-text-body><![CDATA[ | [pageLimit] | integer | Computed | The limit of the range of items shown on the current page represented by the model | ]]></ac:plain-text-body></ac:structured-macro> |
(pageLimit is not actually stored within the model at any point, but is supplied a computation function computePageLimit
to match computePageCount
by which pageCount
is derived from the primary fields.
...
Anchor | ||||
---|---|---|---|---|
|
Options
...