public/javascripts/yui/datatable/datatable.js
function (e) {
    if (e.prevValue === e.newValue) { return; }

    var newPag     = e.newValue,
        oldPag     = e.prevValue,
        containers = this._defaultPaginatorContainers();

    if (oldPag) {
        if (oldPag.getContainerNodes()[0] == containers[0]) {
            oldPag.set('containers',[]);
        }
        oldPag.destroy();

        // Convenience: share the default containers if possible.
        // Otherwise, remove the default containers from the DOM.
        if (containers[0]) {
            if (newPag && !newPag.getContainerNodes().length) {
                newPag.set('containers',containers);
            } else {
                // No new Paginator to use existing containers, OR new
                // Paginator has configured containers.
                for (var i = containers.length - 1; i >= 0; --i) {
                    if (containers[i]) {
                        containers[i].parentNode.removeChild(containers[i]);
                    }
                }
            }
        }
    }

    if (!this._bInit) {
        this.render();

    }

    if (newPag) {
        this.renderPaginator();
    }

}
function (e) {
    if (e.prevValue === e.newValue) { return; }

    var newPag     = e.newValue,
        oldPag     = e.prevValue,
        containers = this._defaultPaginatorContainers();

    if (oldPag) {
        if (oldPag.getContainerNodes()[0] == containers[0]) {
            oldPag.set('containers',[]);
        }
        oldPag.destroy();

        // Convenience: share the default containers if possible.
        // Otherwise, remove the default containers from the DOM.
        if (containers[0]) {
            if (newPag && !newPag.getContainerNodes().length) {
                newPag.set('containers',containers);
            } else {
                // No new Paginator to use existing containers, OR new
                // Paginator has configured containers.
                for (var i = containers.length - 1; i >= 0; --i) {
                    if (containers[i]) {
                        containers[i].parentNode.removeChild(containers[i]);
                    }
                }
            }
        }
    }

    if (!this._bInit) {
        this.render();

    }

    if (newPag) {
        this.renderPaginator();
    }

}
function ( e ) { if ( e . prevValue === e . newValue ) { return ; } var newPag = e . newValue , oldPag = e . prevValue , containers = this . _defaultPaginatorContainers ( ) ; if ( oldPag ) { if ( oldPag . getContainerNodes ( ) [ 0 ] == containers [ 0 ] ) { oldPag . set ( 'containers' , [ ] ) ; } oldPag . destroy ( ) ; // Convenience: share the default containers if possible. // Otherwise, remove the default containers from the DOM. if ( containers [ 0 ] ) { if ( newPag && ! newPag . getContainerNodes ( ) . length ) { newPag . set ( 'containers' , containers ) ; } else { // No new Paginator to use existing containers, OR new // Paginator has configured containers. for ( var i = containers . length - 1 ; i >= 0 ; -- i ) { if ( containers [ i ] ) { containers [ i ] . parentNode . removeChild ( containers [ i ] ) ; } } } } } if ( ! this . _bInit ) { this . render ( ) ; } if ( newPag ) { this . renderPaginator ( ) ; } }
Update the UI infrastructure in response to a "paginator" attribute change.

@method _handlePaginatorChange
@param e {Object} Change event object containing keys 'type','newValue',
and 'prevValue'
@private
Update the UI infrastructure in response to a paginator attribute change .