src/cm/media/js/lib/yui/yui_3.10.3/docs/datatable/datatable-chkboxselect.html
changeset 525 89ef5ed3c48b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cm/media/js/lib/yui/yui_3.10.3/docs/datatable/datatable-chkboxselect.html	Tue Jul 16 14:29:46 2013 +0200
@@ -0,0 +1,664 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>Example: Checkbox select column</title>
+    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic">
+    <link rel="stylesheet" href="../../build/cssgrids/cssgrids-min.css">
+    <link rel="stylesheet" href="../assets/css/main.css">
+    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
+    <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
+    <script src="../../build/yui/yui-min.js"></script>
+    
+</head>
+<body>
+<!--
+<a href="https://github.com/yui/yui3"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
+-->
+<div id="doc">
+    <div id="hd">
+        <h1><img src="http://yuilibrary.com/img/yui-logo.png"></h1>
+    </div>
+    
+
+            <h1>Example: Checkbox select column</h1>
+    <div class="yui3-g">
+        <div class="yui3-u-3-4">
+            <div id="main">
+                <div class="content"><style scoped>
+/* css to counter global site css */
+.example table {
+    width: auto;
+}
+
+.yui3-skin-sam .yui3-datatable-col-select {
+    text-align: center;
+}
+
+#processed {
+   margin-top: 2em;
+   border: 2px inset;
+   border-radius: 5px;
+   padding: 1em;
+   list-style: none;
+}
+</style>
+
+<div class="intro">
+    <p>
+        This example shows one method for managing a selection checkbox column
+        in a DataTable.
+    </p>
+</div>
+
+<div class="example yui3-skin-sam">
+    <div id="dtable"></div>
+    <button id="btnSelected" class="yui3-button">Process Selections</button>
+    <button id="btnClearSelected" class="yui3-button">Clear Selections</button>
+
+    <h4>Processed:</h4>
+    <ul id="processed">
+        <li>(None)</li>
+    </ul>
+</div>
+<script>
+YUI({ filter: 'raw' }).use( "datatable-sort", "datatable-scroll", "cssbutton", function (Y) {
+
+    var ports = [
+        { port:20,  pname:'FTP_data',ptitle:'File Transfer Process Data' },
+        { port:21,  pname:'FTP',     ptitle:'File Transfer Process' },
+        { port:22,  pname:'SSH',     ptitle:'Secure Shell' },
+        { port:23,  pname:'TELNET',  ptitle:'Telnet remote communications' },
+        { port:25,  pname:'SMTP',    ptitle:'Simple Mail Transfer Protocol' },
+        { port:43,  pname:'WHOIS',   ptitle:'whois Identification' },
+        { port:53,  pname:'DNS',     ptitle:'Domain Name Service' },
+        { port:68,  pname:'DHCP',    ptitle:'Dynamic Host Control Protocol' },
+        { port:79,  pname:'FINGER',  ptitle:'Finger Identification' },
+        { port:80,  pname:'HTTP',    ptitle:'HyperText Transfer Protocol' },
+        { port:110, pname:'POP3',   ptitle:'Post Office Protocol v3' },
+        { port:115, pname:'SFTP',   ptitle:'Secure File Transfer Protocol' },
+        { port:119, pname:'NNTP',   ptitle:'Network New Transfer Protocol' },
+        { port:123, pname:'NTP',    ptitle:'Network Time Protocol' },
+        { port:139, pname:'NetBIOS',ptitle:'NetBIOS Communication' },
+        { port:143, pname:'IMAP',   ptitle:'Internet Message Access Protocol' },
+        { port:161, pname:'SNMP',   ptitle:'Simple Network Management Protocol' },
+        { port:194, pname:'IRC',    ptitle:'Internet Relay Chat' },
+        { port:220, pname:'IMAP3',  ptitle:'Internet Message Access Protocol v3' },
+        { port:389, pname:'LDAP',   ptitle:'Lightweight Directory Access Protocol' },
+        { port:443, pname:'SSL',    ptitle:'Secure Socket Layer' },
+        { port:445, pname:'SMB',    ptitle:'NetBIOS over TCP' },
+        { port:993, pname:'SIMAP',  ptitle:'Secure IMAP Mail' },
+        { port:995, pname:'SPOP',   ptitle:'Secure POP Mail' }
+    ];
+
+    var table = new Y.DataTable({
+        columns : [
+            {   key:        'select',
+                allowHTML:  true, // to avoid HTML escaping
+                label:      '<input type="checkbox" class="protocol-select-all" title="Toggle ALL records"/>',
+                formatter:      '<input type="checkbox" checked/>',
+                emptyCellValue: '<input type="checkbox"/>'
+            },
+            {   key: 'port',   label: 'Port No.' },
+            {   key: 'pname',  label: 'Protocol' },
+            {   key: 'ptitle', label: 'Common Name' }
+        ],
+        data      : ports,
+        scrollable: 'y',
+        height    : '250px',
+        sortable  : ['port','pname'],
+        sortBy    : 'port',
+        recordType: ['select', 'port', 'pname', 'ptitle']
+    }).render("#dtable");
+
+    // To avoid checkbox click causing harmless error in sorting
+    // Workaround for bug #2532244
+    table.detach('*:change');
+
+    //----------------
+    //   "checkbox" Click listeners ...
+    //----------------
+
+    // Define a listener on the DT first column for each record's "checkbox",
+    //   to set the value of <code>select</code> to the checkbox setting
+    table.delegate("click", function(e){
+        // undefined to trigger the emptyCellValue
+        var checked = e.target.get('checked') || undefined;
+
+        this.getRecord(e.target).set('select', checked);
+
+        // Uncheck the header checkbox
+        this.get('contentBox')
+            .one('.protocol-select-all').set('checked', false);
+    }, ".yui3-datatable-data .yui3-datatable-col-select input", table);
+
+
+    // Also define a listener on the single TH "checkbox" to
+    //   toggle all of the checkboxes
+    table.delegate('click', function (e) {
+        // undefined to trigger the emptyCellValue
+        var checked = e.target.get('checked') || undefined;
+
+        // Set the selected attribute in all records in the ModelList silently
+        // to avoid each update triggering a table update
+        this.data.invoke('set', 'select', checked, { silent: true });
+
+        // Update the table now that all records have been updated
+        this.syncUI();
+    }, '.protocol-select-all', table);
+
+    //----------------
+    //  CSS-Button click handlers ....
+    //----------------
+    function process() {
+        var ml  = table.data,
+            msg = '',
+            template = '<li>Record index = {index} Data = {port} : {pname}</li>';
+
+        ml.each(function (item, i) {
+            var data = item.getAttrs(['select', 'port', 'pname']);
+
+            if (data.select) {
+                data.index = i;
+                msg += Y.Lang.sub(template, data);
+            }
+        });
+
+        Y.one("#processed").setHTML(msg || '<li>(None)</li>');
+    }
+
+    Y.one("#btnSelected").on("click", process);
+
+    Y.one("#btnClearSelected").on("click",function () {
+        table.data.invoke('set', 'select', undefined);
+
+        // Uncheck the header checkbox
+        table.get('contentBox')
+            .one('.protocol-select-all').set('checked', false);
+
+        process();
+    });
+
+});
+
+</script>
+
+<h2>Sample Data</h2>
+
+<p>
+    This example will use a local Javascript array of data that includes some
+    common Internet port socket numbers and protocol names:
+</p>
+
+<pre class="code prettyprint">var ports = [
+    { port:20,  pname:&#x27;FTP_data&#x27;,ptitle:&#x27;File Transfer Process Data&#x27; },
+    { port:21,  pname:&#x27;FTP&#x27;,     ptitle:&#x27;File Transfer Process&#x27; },
+    { port:22,  pname:&#x27;SSH&#x27;,     ptitle:&#x27;Secure Shell&#x27; },
+    { port:23,  pname:&#x27;TELNET&#x27;,  ptitle:&#x27;Telnet remote communications&#x27; },
+    ... &#x2F;&#x2F; data continues
+];</pre>
+
+
+<h2>The DataTable</h2>
+
+<p>
+    Our DataTable for this example will utilize a custom formatter as the first
+    column, to display a standard HTML INPUT[type=checkbox] element as an
+    indication that the record is desired to be "selected" for additional
+    processing.  But that checkbox won't work on its own, because if a "sort"
+    action happens after the checkbox is clicked the "check" status is lost!
+</p>
+
+<p>
+    A way to get around this is to create a binding of the checkbox to an
+    attribute of <b>each record</b> which will remain with the record even upon
+    sorts, edits, or other modifications to the record.  This is accomplished
+    by defining a custom <code>recordType</code> for the DataTable that incorporates all
+    of our standard <code>data</code> for our table but also defines a new Attribute
+    (called <code>select</code> here) that is a boolean value to track whether the record
+    is selected.
+</p>
+
+<p>
+    The implementation of these methods is shown below, where we have defined a
+    custom <code>formatter</code> and <code>emptyCellValue</code> for the "select" column that
+    creates a checked or unchecked checkbox depending on the state of the
+    attribute, and defines a custom <code>recordType</code> with our new attribute added.
+    Additionally, we incorporate (a) scrolling and (b) sorting to demonstrate
+    that this technique works.
+</p>
+
+<pre class="code prettyprint">var table = new Y.DataTable({
+    columns : [
+        {   key:        &#x27;select&#x27;,
+            allowHTML:  true, &#x2F;&#x2F; to avoid HTML escaping
+            label:      &#x27;&lt;input type=&quot;checkbox&quot; class=&quot;protocol-select-all&quot; title=&quot;Toggle ALL records&quot;&#x2F;&gt;&#x27;,
+            formatter:      &#x27;&lt;input type=&quot;checkbox&quot; checked&#x2F;&gt;&#x27;,
+            emptyCellValue: &#x27;&lt;input type=&quot;checkbox&quot;&#x2F;&gt;&#x27;
+        },
+        {   key: &#x27;port&#x27;,   label: &#x27;Port No.&#x27; },
+        {   key: &#x27;pname&#x27;,  label: &#x27;Protocol&#x27; },
+        {   key: &#x27;ptitle&#x27;, label: &#x27;Common Name&#x27; }
+    ],
+    data      : ports,
+    scrollable: &#x27;y&#x27;,
+    height    : &#x27;250px&#x27;,
+    sortable  : [&#x27;port&#x27;,&#x27;pname&#x27;],
+    sortBy    : &#x27;port&#x27;,
+    recordType: [&#x27;select&#x27;, &#x27;port&#x27;, &#x27;pname&#x27;, &#x27;ptitle&#x27;]
+}).render(&quot;#dtable&quot;);</pre>
+
+
+<h2>The Checkbox Listeners</h2>
+
+<p>
+    Having a DataTable with a bunch of checkboxes in it may look cool (or
+    not!), but we also need to define what to do when they are checked.   Since
+    the column formatter for the first column creates the checkboxes, we 
+    delegate "click" listeners from the DataTable for the two types of
+    checkboxes&mdash;the "check all" checkbox in the header and the individual
+    checkboxes on each data row.
+</p>
+
+<p>
+    Be sure to <a href="../event/delegation.html">avoid subscribing to events
+    directly on elements in each row</a> of a DataTable.
+</p>
+
+<pre class="code prettyprint">&#x2F;&#x2F; Define a listener on the DT first column for each record&#x27;s checkbox,
+&#x2F;&#x2F;   to set the value of &#x60;select&#x60; to the checkbox setting
+table.delegate(&quot;click&quot;, function(e){
+    &#x2F;&#x2F; undefined to trigger the emptyCellValue
+    var checked = e.target.get(&#x27;checked&#x27;) || undefined;
+
+    this.getRecord(e.target).set(&#x27;select&#x27;, checked);
+
+    &#x2F;&#x2F; Uncheck the header checkbox
+    this.get(&#x27;contentBox&#x27;)
+        .one(&#x27;.protocol-select-all&#x27;).set(&#x27;checked&#x27;, false);
+}, &quot;.yui3-datatable-data .yui3-datatable-col-select input&quot;, table);
+
+
+&#x2F;&#x2F; Also define a listener on the single TH checkbox to
+&#x2F;&#x2F;   toggle all of the checkboxes
+table.delegate(&#x27;click&#x27;, function (e) {
+    &#x2F;&#x2F; undefined to trigger the emptyCellValue
+    var checked = e.target.get(&#x27;checked&#x27;) || undefined;
+
+    &#x2F;&#x2F; Set the selected attribute in all records in the ModelList silently
+    &#x2F;&#x2F; to avoid each update triggering a table update
+    this.data.invoke(&#x27;set&#x27;, &#x27;select&#x27;, checked, { silent: true });
+
+    &#x2F;&#x2F; Update the table now that all records have been updated
+    this.syncUI();
+}, &#x27;.protocol-select-all&#x27;, table);</pre>
+
+
+<h2>Button Click Handlers</h2>
+
+<p>
+    The bulk of the nitty-gritty is done now.   We'll just wire up a button to
+    process the checked records and another to clear the selection.
+</p>
+
+<pre class="code prettyprint">function process() {
+    var ml  = table.data,
+        msg = &#x27;&#x27;,
+        template = &#x27;&lt;li&gt;Record index = {index} Data = {port} : {pname}&lt;&#x2F;li&gt;&#x27;;
+
+    ml.each(function (item, i) {
+        var data = item.getAttrs([&#x27;select&#x27;, &#x27;port&#x27;, &#x27;pname&#x27;]);
+
+        if (data.select) {
+            data.index = i;
+            msg += Y.Lang.sub(template, data);
+        }
+    });
+
+    Y.one(&quot;#processed&quot;).setHTML(msg || &#x27;&lt;li&gt;(None)&lt;&#x2F;li&gt;&#x27;);
+}
+
+Y.one(&quot;#btnSelected&quot;).on(&quot;click&quot;, process);
+
+Y.one(&quot;#btnClearSelected&quot;).on(&quot;click&quot;,function () {
+    table.data.invoke(&#x27;set&#x27;, &#x27;select&#x27;, undefined);
+
+    &#x2F;&#x2F; Uncheck the header checkbox
+    table.get(&#x27;contentBox&#x27;)
+        .one(&#x27;.protocol-select-all&#x27;).set(&#x27;checked&#x27;, false);
+
+    process();
+});</pre>
+
+
+<p>
+    Note that another option for capturing all the checked checkboxes would be
+    <code>table.get(&#x27;contentBox&#x27;).all(&#x27;.yui3-datatable-col-select input:checked&#x27;)</code>.
+    To make sure that was supported across all browsers, we'd then need to
+    include the <code>selector-css3</code> module in our <code>use()</code> statement.
+</p>
+
+<p>
+    Another improvement that could be made for HTML5 compliant clients would be
+    to add in <code>localStorage</code> access to save the checked record data to the
+    browser environment.   You can see how to do this in the
+    <a href="../app/app-todo.html">App Framework's Todo List example</a>.
+</p>
+
+
+<h2>Full Code Listing</h2>
+
+<h3>CSS</h3>
+
+<pre class="code prettyprint">.yui3-skin-sam .yui3-datatable-col-select {
+    text-align: center;
+}
+
+#processed {
+   margin-top: 2em;
+   border: 2px inset;
+   border-radius: 5px;
+   padding: 1em;
+   list-style: none;
+}</pre>
+
+
+<h3>HTML Markup</h3>
+<p>
+<strong>Note:</strong> be sure to add the <code>yui3-skin-sam</code> classname to the
+page's <code>&lt;body&gt;</code> element or to a parent element of the widget in order to apply
+the default CSS skin. See <a href="http://yuilibrary.com/yui/docs/tutorials/skins/">Understanding Skinning</a>.
+</p>
+<pre class="code prettyprint">&lt;div class=&quot;example yui3-skin-sam&quot;&gt; &lt;!-- You need this skin class --&gt;
+    &lt;div id=&quot;dtable&quot;&gt;&lt;&#x2F;div&gt;
+    &lt;button id=&quot;btnSelected&quot; class=&quot;yui3-button&quot;&gt;Process Selections&lt;&#x2F;button&gt;
+    &lt;button id=&quot;btnClearSelected&quot; class=&quot;yui3-button&quot;&gt;Clear Selections&lt;&#x2F;button&gt;
+
+    &lt;h4&gt;Processed:&lt;&#x2F;h4&gt;
+    &lt;ul id=&quot;processed&quot;&gt;
+        &lt;li&gt;(None)&lt;&#x2F;li&gt;
+    &lt;&#x2F;ul&gt;
+&lt;&#x2F;div&gt;</pre>
+
+
+<h3>Javascript</h3>
+
+<pre class="code prettyprint">YUI({ filter: &#x27;raw&#x27; }).use( &quot;datatable-sort&quot;, &quot;datatable-scroll&quot;, &quot;cssbutton&quot;, function (Y) {
+
+    var ports = [
+        { port:20,  pname:&#x27;FTP_data&#x27;,ptitle:&#x27;File Transfer Process Data&#x27; },
+        { port:21,  pname:&#x27;FTP&#x27;,     ptitle:&#x27;File Transfer Process&#x27; },
+        { port:22,  pname:&#x27;SSH&#x27;,     ptitle:&#x27;Secure Shell&#x27; },
+        { port:23,  pname:&#x27;TELNET&#x27;,  ptitle:&#x27;Telnet remote communications&#x27; },
+        { port:25,  pname:&#x27;SMTP&#x27;,    ptitle:&#x27;Simple Mail Transfer Protocol&#x27; },
+        { port:43,  pname:&#x27;WHOIS&#x27;,   ptitle:&#x27;whois Identification&#x27; },
+        { port:53,  pname:&#x27;DNS&#x27;,     ptitle:&#x27;Domain Name Service&#x27; },
+        { port:68,  pname:&#x27;DHCP&#x27;,    ptitle:&#x27;Dynamic Host Control Protocol&#x27; },
+        { port:79,  pname:&#x27;FINGER&#x27;,  ptitle:&#x27;Finger Identification&#x27; },
+        { port:80,  pname:&#x27;HTTP&#x27;,    ptitle:&#x27;HyperText Transfer Protocol&#x27; },
+        { port:110, pname:&#x27;POP3&#x27;,   ptitle:&#x27;Post Office Protocol v3&#x27; },
+        { port:115, pname:&#x27;SFTP&#x27;,   ptitle:&#x27;Secure File Transfer Protocol&#x27; },
+        { port:119, pname:&#x27;NNTP&#x27;,   ptitle:&#x27;Network New Transfer Protocol&#x27; },
+        { port:123, pname:&#x27;NTP&#x27;,    ptitle:&#x27;Network Time Protocol&#x27; },
+        { port:139, pname:&#x27;NetBIOS&#x27;,ptitle:&#x27;NetBIOS Communication&#x27; },
+        { port:143, pname:&#x27;IMAP&#x27;,   ptitle:&#x27;Internet Message Access Protocol&#x27; },
+        { port:161, pname:&#x27;SNMP&#x27;,   ptitle:&#x27;Simple Network Management Protocol&#x27; },
+        { port:194, pname:&#x27;IRC&#x27;,    ptitle:&#x27;Internet Relay Chat&#x27; },
+        { port:220, pname:&#x27;IMAP3&#x27;,  ptitle:&#x27;Internet Message Access Protocol v3&#x27; },
+        { port:389, pname:&#x27;LDAP&#x27;,   ptitle:&#x27;Lightweight Directory Access Protocol&#x27; },
+        { port:443, pname:&#x27;SSL&#x27;,    ptitle:&#x27;Secure Socket Layer&#x27; },
+        { port:445, pname:&#x27;SMB&#x27;,    ptitle:&#x27;NetBIOS over TCP&#x27; },
+        { port:993, pname:&#x27;SIMAP&#x27;,  ptitle:&#x27;Secure IMAP Mail&#x27; },
+        { port:995, pname:&#x27;SPOP&#x27;,   ptitle:&#x27;Secure POP Mail&#x27; }
+    ];
+
+    var table = new Y.DataTable({
+        columns : [
+            {   key:        &#x27;select&#x27;,
+                allowHTML:  true, &#x2F;&#x2F; to avoid HTML escaping
+                label:      &#x27;&lt;input type=&quot;checkbox&quot; class=&quot;protocol-select-all&quot; title=&quot;Toggle ALL records&quot;&#x2F;&gt;&#x27;,
+                formatter:      &#x27;&lt;input type=&quot;checkbox&quot; checked&#x2F;&gt;&#x27;,
+                emptyCellValue: &#x27;&lt;input type=&quot;checkbox&quot;&#x2F;&gt;&#x27;
+            },
+            {   key: &#x27;port&#x27;,   label: &#x27;Port No.&#x27; },
+            {   key: &#x27;pname&#x27;,  label: &#x27;Protocol&#x27; },
+            {   key: &#x27;ptitle&#x27;, label: &#x27;Common Name&#x27; }
+        ],
+        data      : ports,
+        scrollable: &#x27;y&#x27;,
+        height    : &#x27;250px&#x27;,
+        sortable  : [&#x27;port&#x27;,&#x27;pname&#x27;],
+        sortBy    : &#x27;port&#x27;,
+        recordType: [&#x27;select&#x27;, &#x27;port&#x27;, &#x27;pname&#x27;, &#x27;ptitle&#x27;]
+    }).render(&quot;#dtable&quot;);
+
+    &#x2F;&#x2F; To avoid checkbox click causing harmless error in sorting
+    &#x2F;&#x2F; Workaround for bug #2532244
+    table.detach(&#x27;*:change&#x27;);
+
+    &#x2F;&#x2F;----------------
+    &#x2F;&#x2F;   &quot;checkbox&quot; Click listeners ...
+    &#x2F;&#x2F;----------------
+
+    &#x2F;&#x2F; Define a listener on the DT first column for each record&#x27;s &quot;checkbox&quot;,
+    &#x2F;&#x2F;   to set the value of &#x60;select&#x60; to the checkbox setting
+    table.delegate(&quot;click&quot;, function(e){
+        &#x2F;&#x2F; undefined to trigger the emptyCellValue
+        var checked = e.target.get(&#x27;checked&#x27;) || undefined;
+
+        this.getRecord(e.target).set(&#x27;select&#x27;, checked);
+
+        &#x2F;&#x2F; Uncheck the header checkbox
+        this.get(&#x27;contentBox&#x27;)
+            .one(&#x27;.protocol-select-all&#x27;).set(&#x27;checked&#x27;, false);
+    }, &quot;.yui3-datatable-data .yui3-datatable-col-select input&quot;, table);
+
+
+    &#x2F;&#x2F; Also define a listener on the single TH &quot;checkbox&quot; to
+    &#x2F;&#x2F;   toggle all of the checkboxes
+    table.delegate(&#x27;click&#x27;, function (e) {
+        &#x2F;&#x2F; undefined to trigger the emptyCellValue
+        var checked = e.target.get(&#x27;checked&#x27;) || undefined;
+
+        &#x2F;&#x2F; Set the selected attribute in all records in the ModelList silently
+        &#x2F;&#x2F; to avoid each update triggering a table update
+        this.data.invoke(&#x27;set&#x27;, &#x27;select&#x27;, checked, { silent: true });
+
+        &#x2F;&#x2F; Update the table now that all records have been updated
+        this.syncUI();
+    }, &#x27;.protocol-select-all&#x27;, table);
+
+    &#x2F;&#x2F;----------------
+    &#x2F;&#x2F;  CSS-Button click handlers ....
+    &#x2F;&#x2F;----------------
+    function process() {
+        var ml  = table.data,
+            msg = &#x27;&#x27;,
+            template = &#x27;&lt;li&gt;Record index = {index} Data = {port} : {pname}&lt;&#x2F;li&gt;&#x27;;
+
+        ml.each(function (item, i) {
+            var data = item.getAttrs([&#x27;select&#x27;, &#x27;port&#x27;, &#x27;pname&#x27;]);
+
+            if (data.select) {
+                data.index = i;
+                msg += Y.Lang.sub(template, data);
+            }
+        });
+
+        Y.one(&quot;#processed&quot;).setHTML(msg || &#x27;&lt;li&gt;(None)&lt;&#x2F;li&gt;&#x27;);
+    }
+
+    Y.one(&quot;#btnSelected&quot;).on(&quot;click&quot;, process);
+
+    Y.one(&quot;#btnClearSelected&quot;).on(&quot;click&quot;,function () {
+        table.data.invoke(&#x27;set&#x27;, &#x27;select&#x27;, undefined);
+
+        &#x2F;&#x2F; Uncheck the header checkbox
+        table.get(&#x27;contentBox&#x27;)
+            .one(&#x27;.protocol-select-all&#x27;).set(&#x27;checked&#x27;, false);
+
+        process();
+    });
+
+});</pre>
+
+</div>
+            </div>
+        </div>
+
+        <div class="yui3-u-1-4">
+            <div class="sidebar">
+                
+
+                
+                    <div class="sidebox">
+                        <div class="hd">
+                            <h2 class="no-toc">Examples</h2>
+                        </div>
+
+                        <div class="bd">
+                            <ul class="examples">
+                                
+                                    
+                                        <li data-description="This example illustrates simple DataTable use cases.">
+                                            <a href="datatable-basic.html">Basic DataTable</a>
+                                        </li>
+                                    
+                                
+                                    
+                                        <li data-description="DataTable loaded with JSON data from a remote webservice via DataSource.Get">
+                                            <a href="datatable-dsget.html">DataTable + DataSource.Get + JSON Data</a>
+                                        </li>
+                                    
+                                
+                                    
+                                        <li data-description="DataTable loaded with XML data from a remote webservice via DataSource.IO.">
+                                            <a href="datatable-dsio.html">DataTable + DataSource.IO + XML Data</a>
+                                        </li>
+                                    
+                                
+                                    
+                                        <li data-description="Custom format data for display.">
+                                            <a href="datatable-formatting.html">Formatting Row Data for Display</a>
+                                        </li>
+                                    
+                                
+                                    
+                                        <li data-description="DataTable with nested column headers.">
+                                            <a href="datatable-nestedcols.html">Nested Column Headers</a>
+                                        </li>
+                                    
+                                
+                                    
+                                        <li data-description="DataTable with column sorting.">
+                                            <a href="datatable-sort.html">Column Sorting</a>
+                                        </li>
+                                    
+                                
+                                    
+                                        <li data-description="DataTable with vertical and/or horizontal scrolling rows.">
+                                            <a href="datatable-scroll.html">Scrolling DataTable</a>
+                                        </li>
+                                    
+                                
+                                    
+                                        <li data-description="Using DataTable&#x27;s recordType attribute to create calculated, sortable columns.">
+                                            <a href="datatable-recordtype.html">Sortable generated columns</a>
+                                        </li>
+                                    
+                                
+                                    
+                                        <li data-description="Populating one DataTable from details in the data of another.">
+                                            <a href="datatable-masterdetail.html">Master and detail tables</a>
+                                        </li>
+                                    
+                                
+                                    
+                                        <li data-description="Checkbox column that retains checked state when sorting.">
+                                            <a href="datatable-chkboxselect.html">Checkbox select column</a>
+                                        </li>
+                                    
+                                
+                                    
+                                
+                            </ul>
+                        </div>
+                    </div>
+                
+
+                
+                    <div class="sidebox">
+                        <div class="hd">
+                            <h2 class="no-toc">Examples That Use This Component</h2>
+                        </div>
+
+                        <div class="bd">
+                            <ul class="examples">
+                                
+                                    
+                                
+                                    
+                                
+                                    
+                                
+                                    
+                                
+                                    
+                                
+                                    
+                                
+                                    
+                                
+                                    
+                                
+                                    
+                                
+                                    
+                                
+                                    
+                                        <li data-description="Shows how to instantiate multiple Panel instances, and use nested modality to interact with a Datatable.">
+                                            <a href="../panel/panel-form.html">Creating a Modal Form</a>
+                                        </li>
+                                    
+                                
+                            </ul>
+                        </div>
+                    </div>
+                
+            </div>
+        </div>
+    </div>
+</div>
+
+<script src="../assets/vendor/prettify/prettify-min.js"></script>
+<script>prettyPrint();</script>
+
+<script>
+YUI.Env.Tests = {
+    examples: [],
+    project: '../assets',
+    assets: '../assets/datatable',
+    name: 'datatable-chkboxselect',
+    title: 'Checkbox select column',
+    newWindow: '',
+    auto:  false 
+};
+YUI.Env.Tests.examples.push('datatable-basic');
+YUI.Env.Tests.examples.push('datatable-dsget');
+YUI.Env.Tests.examples.push('datatable-dsio');
+YUI.Env.Tests.examples.push('datatable-formatting');
+YUI.Env.Tests.examples.push('datatable-nestedcols');
+YUI.Env.Tests.examples.push('datatable-sort');
+YUI.Env.Tests.examples.push('datatable-scroll');
+YUI.Env.Tests.examples.push('datatable-recordtype');
+YUI.Env.Tests.examples.push('datatable-masterdetail');
+YUI.Env.Tests.examples.push('datatable-chkboxselect');
+YUI.Env.Tests.examples.push('panel-form');
+
+</script>
+<script src="../assets/yui/test-runner.js"></script>
+
+
+
+</body>
+</html>