• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • API Docs
    • Environments
    • Tutorials
  • Community
    • Gallery
    • Blog
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • Shifter »
    • Yogi »
    • YUI 2
    • YUI Doc »
    • YUI Test
    • YUI Website
    • YUI Compressor »
    • YUI Builder »
    • YUI PHP Loader
    • Grid Builder »
    • Skin Builder »
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • Yogi Documentation
  • Shifter Documentation
  • Developer Guide
  • Module Setup

Tag Cloud

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    MultiObject (gallery-multiobject)

    Last Updated: 04/17/13
    + 0 -

    John Lindal

    YUI Contributor

    See 50 more by this user.

    Created: 06/10/10
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.5.1
    Free for use.

    A MultiObject exposes the same API as each individual object (both functions and events), and the state of all the objects is kept in sync. The objects must maintain all state via Y.Attribute. One example use-case is for multiple Paginator widgets in different locations, e.g., one on top and one at the bottom of a table.

    • Tags:
    • collection
    • jafl
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Create several paginators and manage them all via MultiObject.

    Code Sample

    YUI().use('gallery-multiobject', 'gallery-paginator', function(Y)
    {
    	function update(
    		/* object */	state)
    	{
    		this.setPage(state.page, true);
    		this.setRowsPerPage(state.rowsPerPage, true);
    	}
     
    	var p1 = new Y.Paginator(...);
    	var p2 = new Y.Paginator(...);
    	var p3 = new Y.Paginator(...);
     
    	var p = new Y.MultiObject([p1, p2, p3]);
    	p.on('changeRequest', update, p);
    });

    © 2006-2013 Yahoo! Inc. All rights reserved.
    All code on this site is licensed under the BSD License unless stated otherwise.
    About This Site · Security Contact Info