# Yahoo! UI Library

### paginator 2.8.0r4

Yahoo! UI Library > paginator > YAHOO.widget.Paginator.ui.YourComponent
Search:
Filters Show Private Show Protected Show Deprecated

## 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

Returns: `void`

#### destroy

`private void destroy ( )`
Remove the generated DOM structure

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`

#### initListeners

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

Returns: `void`

#### 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

Returns: `void`

#### 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

Returns: `void`

#### rebuild

`void rebuild ( e )`
Make more substantial changes in a separate method if necessary

Parameters:
  `e <CustomEvent>` the calling change event

Returns: `void`

#### 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

Returns: `HTMLElement`

#### update

`void update ( e )`
Make any necessary changes to the component nodes

Parameters:
  `e <CustomEvent>` The calling change event

Returns: `void`

### 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 © 2009 Yahoo! Inc. All rights reserved.