YUI recommends YUI 3.

YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.

Yahoo! UI Library

DataTable Widget  2.5.0

Yahoo! UI Library > datatable > YAHOO.widget.Paginator.ui.RowsPerPageDropdown

Show Private Show Protected

Class YAHOO.widget.Paginator.ui.RowsPerPageDropdown

ui Component to generate the rows-per-page dropdown

Constructor

YAHOO.widget.Paginator.ui.RowsPerPageDropdown ( p )
Parameters:
p <Pagintor> Paginator instance to attach to

Properties

select - private HTMLElement

select node

Methods

destroy

private void destroy ( )
Removes the onChange listener from the select in preparation for content removal.
Returns: void

init

static void init ( p )
Decorates Paginator instances with new attributes. Called during Paginator instantiation.
Parameters:
p <Paginator> Paginator instance to decorate
Returns: void

onChange

void onChange ( e )
Listener for the select's onchange event. Sent to setRowsPerPage method.
Parameters:
e <DOMEvent> The change event
Returns: void

rebuild

void rebuild ( )
(Re)generate the select options.
Returns: void

render

HTMLElement render ( id_base )
Generate the select and option nodes and returns the select node.
Parameters:
id_base <string> used to create unique ids for generated nodes
Returns: HTMLElement

update

void update ( e )
Select the appropriate option if changed.
Parameters:
e <CustomEvent> The calling change event
Returns: void

Events

beforeRowsperpagedropdownclassChange

beforeRowsperpagedropdownclassChange ( eventInfo )
Fires before the value for the configuration attribute 'rowsPerPageDropdownClass' changes. Return false to cancel the attribute change.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the current attribute value and the new value.

beforeRowsperpageoptionsChange

beforeRowsperpageoptionsChange ( eventInfo )
Fires before the value for the configuration attribute 'rowsPerPageOptions' changes. Return false to cancel the attribute change.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the current attribute value and the new value.

rowsPerPageDropdownClassChange

rowsPerPageDropdownClassChange ( eventInfo )
Fires when the value for the configuration attribute 'rowsPerPageDropdownClass' changes.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

rowsPerPageOptionsChange

rowsPerPageOptionsChange ( eventInfo )
Fires when the value for the configuration attribute 'rowsPerPageOptions' changes.
Parameters:
eventInfo <{oldValue: any, newValue: any}> An object containing the previous attribute value and the new value.

Configuration Attributes

rowsPerPageDropdownClass - object

CSS class assigned to the select node
Default Value: 'yui-pg-rpp-options'

rowsPerPageOptions - object

Array of available rows-per-page sizes. Converted into select options. Array values may be positive integers or object literals in the form
{ value : NUMBER, text : STRING }
Default Value: []


Copyright © 2007 Yahoo! Inc. All rights reserved.