• 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.

    gallery-user-patch-2529808 (gallery-user-patch-2529808) on cdn

    Last Updated: 07/21/11
    + 0 -

    Adrian Lanning

    YUI Contributor

    Created: 05/14/11
    Last CDN Push: 05/18/11
    Build Tag: gallery-2011.05.18-19-11
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.3.0
    Free for use.

    Fix for Bug Ticket #2529808
    http://yuilibrary.com/projects/yui3/ticket/2529808

    The 3.3.0 datatable-scroll plugin assumes that the datatable's underlying recordset will already be populated with data and will throw an error if it is empty. This patch wraps the offending function to check for the empty case and also registers an 'after' event handler to re-sync the UI whenever the underlying recordset is changed.

    Thanks to eamonb (a.k.a mosen) for his peer review and help testing.
    Thanks to rgrove for defining the naming convention for user patches.

    *** For anyone else interested in submitting user patches ***

    User patch naming convention: "gallery-user-patch-<version #>-<ticket #>" <-- use this naming convention

    Only Yahoo! employees can use the official patch naming convention: "gallery-patch-330-toggleview"

    • Tags:
    • alanning
    • datatable
    • datatable-scroll
    • datasource
    • 2529808
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Allows loading of table data from external source after scrollable datatable has been rendered.

    Github src/test directory contains a complete example:
    https://github.com/alanning/yui3-gallery/blob/master/src/gallery-user-patch-2529808/test/test-patch-2529808.html

    Code Sample

    <script src="http://yui.yahooapis.com/3.3.0/build/yui/yui-min.js"></script>
    YUI({
        filter:"debug",
        gallery: 'gallery-2011.05.18-19-11'
        }).use('datasource', 'datatable', 'gallery-user-patch-2529808', function(Y) {
     
     
        var myDataSource = new Y.DataSource.Get({
            source:"http://query.yahooapis.com/v1/public/yql?format=json&"});
     
        myDataSource.plug(Y.Plugin.DataSourceJSONSchema, {
            schema: {
                resultListLocator: "query.results.place",
                resultFields: ["name","woeid"]
            }
        });
        var columnSet2 = [ "name", "woeid" ];
     
     
        // render datatable before load
     
        var dataTable2 = new Y.DataTable.Base({
            caption:"DataTable with DataSource and Scroll plugins",
            columnset:columnSet2
        })
            .plug(Y.Plugin.DataTableScroll, {height: "200px"})
            .plug(Y.Plugin.DataTableDataSource, {datasource:myDataSource})
            .render("#datatable2")
            ;
     
        // now load data
        dataTable2.datasource.load(
        {
            request:"q=select%20*%20from%20geo.counties%20where%20place%3D%22TN%22"
     
        });
     
    });

    © 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