YUI recommends YUI 3.

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

Yahoo! UI Library

paginator  2.8.1

Yahoo! UI Library > paginator > YAHOO.widget.Paginator.ui.YourComponent
Search:
 
Filters

Class YAHOO.widget.Paginator.ui.YourComponent

Describe the ui Component

Constructor

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

Properties

button - private HTMLElement

Describe the node that will be stored in this property

Methods

bindUI

private void bindUI ( )
Attach DOM event listeners to the nodes managed by this component

destroy

private void destroy ( )
Remove the generated DOM structure

init

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

initListeners

void initListeners ( )
Subscribe to the Paginator's events that will affect this component's ui

initUI

private void initUI ( id_base )
Initialize the DOM nodes managed by this component
Parameters:
id_base <string> used to create unique ids for generated nodes

onClick

void onClick ( e )
Listener for a DOM event from a managed element. Pass new value to Paginator.setStartIndex(..), .setPage(..) etc to fire off changeRequest events. DO NOT modify the managed element's state here. That should happen in response to the Paginator's recordOffsetChange event (et al)
Parameters:
e <DOMEvent> The click event

rebuild

void rebuild ( e )
Make more substantial changes in a separate method if necessary
Parameters:
e <CustomEvent> the calling change event

render

HTMLElement render ( id_base )
Generate the nodes and return the appropriate node given the current pagination state.
Parameters:
id_base <string> used to create unique ids for generated nodes

update

void update ( e )
Make any necessary changes to the component nodes
Parameters:
e <CustomEvent> The calling change event

Events

beforeMyAttrChange

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

myAttrChange

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

Configuration Attributes

myAttr - object

Describe your attribute
Default Value: 'foo'


Copyright © 2010 Yahoo! Inc. All rights reserved.