Loading ...
Sorry, an error occurred while loading the content.

Datatable not changing message to EMPTY message

Expand Messages
  • pmcanulty01
    The API shows a LOADING message and an EMPTY message attribute to the datatable - which is cool, and I d use the EMPTY message to be specific to the table I m
    Message 1 of 4 , Mar 1, 2007
    • 0 Attachment
      The API shows a LOADING message and an EMPTY message attribute to the
      datatable - which is cool, and I'd use the EMPTY message to be
      specific to the table I'm displaying (e.g. "No contact's match the
      selected criteria")

      However, the example below never sets the message to EMPTY, it's alway
      s the LOADING message.

      Bug or user-error?

      Thanks
      Pam

      ----------------- begin example ----------------

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
      "http://www.w3.org/TR/html4/strict.dtd"><html>
      <!-- This is a YUI test html page showing that the loading message
      doesn't change when empty -->
      <head>
      <meta http-equiv="content-type" content="text/html;
      charset=utf-8">

      <!-- Standard reset, fonts and grids -->
      <link rel="stylesheet" type="text/css"
      href="http://yui.yahooapis.com/2.2.0//build/reset-fonts-grids/reset-fonts-grids.css">

      <link rel="stylesheet" type="text/css"
      href="http://yui.yahooapis.com/2.2.0/build/treeview/assets/tree.css" />

      <!-- YUI Javascript-->
      <script type="text/javascript"
      src="http://yui.yahooapis.com/2.2.0/build/yahoo/yahoo-min.js"></script>
      <script type="text/javascript"
      src="http://yui.yahooapis.com/2.2.0/build/event/event-min.js"></script>
      <script type="text/javascript"
      src="http://yui.yahooapis.com/2.2.0/build/dom/dom-min.js"></script>
      <script type="text/javascript"
      src="http://yui.yahooapis.com/2.2.0/build/datasource/datasource-beta-min.js"></script>

      <script type="text/javascript"
      src="http://yui.yahooapis.com/2.2.0/build/datatable/datatable-beta-min.js"></script>


      </head>
      <body id="yahoo-com">
      <div id="contact-list-table"></div>

      <script type="text/javascript">
      var crColumnHeaders = [
      {text: 'ID', type: 'number', sortable:true,
      key: 'cid'},
      {text: 'ID Link', type: 'link', sortable:true,
      key: 'contactid'}
      ];

      var crColumnSet = new YAHOO.widget.ColumnSet(crColumnHeaders);

      var crRowData = ''

      var myDataSource = new YAHOO.util.DataSource(crRowData);
      myDataSource.responseSchema = {
      fields: ['cid', 'contactid', ]
      };
      var myDataTable = new
      YAHOO.widget.DataTable("contact-list-table", crColumnSet,
      myDataSource,{caption:"Loading/Empty Test"});
      </script>
      </body>
      </html>
    • Pratyush
      I am facing the same problem. Can someone help, please? ... the ... alway ... grids/reset-fonts-grids.css ...
      Message 2 of 4 , Mar 8, 2007
      • 0 Attachment
        I am facing the same problem. Can someone help, please?

        --- In ydn-javascript@yahoogroups.com, "pmcanulty01" <pamela@...>
        wrote:
        >
        > The API shows a LOADING message and an EMPTY message attribute to
        the
        > datatable - which is cool, and I'd use the EMPTY message to be
        > specific to the table I'm displaying (e.g. "No contact's match the
        > selected criteria")
        >
        > However, the example below never sets the message to EMPTY, it's
        alway
        > s the LOADING message.
        >
        > Bug or user-error?
        >
        > Thanks
        > Pam
        >
        > ----------------- begin example ----------------
        >
        > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        > "http://www.w3.org/TR/html4/strict.dtd"><html>
        > <!-- This is a YUI test html page showing that the loading message
        > doesn't change when empty -->
        > <head>
        > <meta http-equiv="content-type" content="text/html;
        > charset=utf-8">
        >
        > <!-- Standard reset, fonts and grids -->
        > <link rel="stylesheet" type="text/css"
        > href="http://yui.yahooapis.com/2.2.0//build/reset-fonts-
        grids/reset-fonts-grids.css">
        >
        > <link rel="stylesheet" type="text/css"
        >
        href="http://yui.yahooapis.com/2.2.0/build/treeview/assets/tree.css"
        />
        >
        > <!-- YUI Javascript-->
        > <script type="text/javascript"
        > src="http://yui.yahooapis.com/2.2.0/build/yahoo/yahoo-
        min.js"></script>
        > <script type="text/javascript"
        > src="http://yui.yahooapis.com/2.2.0/build/event/event-
        min.js"></script>
        > <script type="text/javascript"
        > src="http://yui.yahooapis.com/2.2.0/build/dom/dom-min.js"></script>
        > <script type="text/javascript"
        > src="http://yui.yahooapis.com/2.2.0/build/datasource/datasource-
        beta-min.js"></script>
        >
        > <script type="text/javascript"
        > src="http://yui.yahooapis.com/2.2.0/build/datatable/datatable-beta-
        min.js"></script>
        >
        >
        > </head>
        > <body id="yahoo-com">
        > <div id="contact-list-table"></div>
        >
        > <script type="text/javascript">
        > var crColumnHeaders = [
        > {text: 'ID', type: 'number', sortable:true,
        > key: 'cid'},
        > {text: 'ID Link', type: 'link',
        sortable:true,
        > key: 'contactid'}
        > ];
        >
        > var crColumnSet = new YAHOO.widget.ColumnSet
        (crColumnHeaders);
        >
        > var crRowData = ''
        >
        > var myDataSource = new YAHOO.util.DataSource(crRowData);
        > myDataSource.responseSchema = {
        > fields: ['cid', 'contactid', ]
        > };
        > var myDataTable = new
        > YAHOO.widget.DataTable("contact-list-table", crColumnSet,
        > myDataSource,{caption:"Loading/Empty Test"});
        > </script>
        > </body>
        > </html>
        >
      • pmcanulty01
        I ve worked around it with this code, after initializing the datatable: if (crRowData.length==0) { myDataTable.showEmptyMessage(); } The problem seems to be
        Message 3 of 4 , Mar 13, 2007
        • 0 Attachment
          I've worked around it with this code, after initializing the datatable:

          if (crRowData.length==0) {
          myDataTable.showEmptyMessage();
          }


          The problem seems to be that the DataSource needs to call the
          completion method. I haven't finished debugging to figure out if it
          does, but it looks like the method isn't getting called.

          pam

          --- In ydn-javascript@yahoogroups.com, "Pratyush"
          <pratyushpushkar@...> wrote:
          >
          > I am facing the same problem. Can someone help, please?
          >
          > --- In ydn-javascript@yahoogroups.com, "pmcanulty01" <pamela@>
          > wrote:
          > >
          > > The API shows a LOADING message and an EMPTY message attribute to
          > the
          > > datatable - which is cool, and I'd use the EMPTY message to be
          > > specific to the table I'm displaying (e.g. "No contact's match the
          > > selected criteria")
          > >
          > > However, the example below never sets the message to EMPTY, it's
          > alway
          > > s the LOADING message.
          > >
          > > Bug or user-error?
          > >
          > > Thanks
          > > Pam
          > >
          > > ----------------- begin example ----------------
          > >
          > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
          > > "http://www.w3.org/TR/html4/strict.dtd"><html>
          > > <!-- This is a YUI test html page showing that the loading message
          > > doesn't change when empty -->
          > > <head>
          > > <meta http-equiv="content-type" content="text/html;
          > > charset=utf-8">
          > >
          > > <!-- Standard reset, fonts and grids -->
          > > <link rel="stylesheet" type="text/css"
          > > href="http://yui.yahooapis.com/2.2.0//build/reset-fonts-
          > grids/reset-fonts-grids.css">
          > >
          > > <link rel="stylesheet" type="text/css"
          > >
          > href="http://yui.yahooapis.com/2.2.0/build/treeview/assets/tree.css"
          > />
          > >
          > > <!-- YUI Javascript-->
          > > <script type="text/javascript"
          > > src="http://yui.yahooapis.com/2.2.0/build/yahoo/yahoo-
          > min.js"></script>
          > > <script type="text/javascript"
          > > src="http://yui.yahooapis.com/2.2.0/build/event/event-
          > min.js"></script>
          > > <script type="text/javascript"
          > > src="http://yui.yahooapis.com/2.2.0/build/dom/dom-min.js"></script>
          > > <script type="text/javascript"
          > > src="http://yui.yahooapis.com/2.2.0/build/datasource/datasource-
          > beta-min.js"></script>
          > >
          > > <script type="text/javascript"
          > > src="http://yui.yahooapis.com/2.2.0/build/datatable/datatable-beta-
          > min.js"></script>
          > >
          > >
          > > </head>
          > > <body id="yahoo-com">
          > > <div id="contact-list-table"></div>
          > >
          > > <script type="text/javascript">
          > > var crColumnHeaders = [
          > > {text: 'ID', type: 'number', sortable:true,
          > > key: 'cid'},
          > > {text: 'ID Link', type: 'link',
          > sortable:true,
          > > key: 'contactid'}
          > > ];
          > >
          > > var crColumnSet = new YAHOO.widget.ColumnSet
          > (crColumnHeaders);
          > >
          > > var crRowData = ''
          > >
          > > var myDataSource = new YAHOO.util.DataSource(crRowData);
          > > myDataSource.responseSchema = {
          > > fields: ['cid', 'contactid', ]
          > > };
          > > var myDataTable = new
          > > YAHOO.widget.DataTable("contact-list-table", crColumnSet,
          > > myDataSource,{caption:"Loading/Empty Test"});
          > > </script>
          > > </body>
          > > </html>
          > >
          >
        • jennykhan
          Hi Pam, This is a known issue (http://sourceforge.net/tracker/index.php?func=detail&aid=1679285&group_id=165715&atid=836476) that will be addressed for the
          Message 4 of 4 , Mar 19, 2007
          • 0 Attachment
            Hi Pam,

            This is a known issue
            (http://sourceforge.net/tracker/index.php?func=detail&aid=1679285&group_id=165715&atid=836476)
            that will be addressed for the next release.

            Thanks,
            Jenny





            --- In ydn-javascript@yahoogroups.com, "pmcanulty01" <pamela@...> wrote:
            >
            > I've worked around it with this code, after initializing the datatable:
            >
            > if (crRowData.length==0) {
            > myDataTable.showEmptyMessage();
            > }
            >
            >
            > The problem seems to be that the DataSource needs to call the
            > completion method. I haven't finished debugging to figure out if it
            > does, but it looks like the method isn't getting called.
            >
            > pam
            >
            > --- In ydn-javascript@yahoogroups.com, "Pratyush"
            > <pratyushpushkar@> wrote:
            > >
            > > I am facing the same problem. Can someone help, please?
            > >
            > > --- In ydn-javascript@yahoogroups.com, "pmcanulty01" <pamela@>
            > > wrote:
            > > >
            > > > The API shows a LOADING message and an EMPTY message attribute to
            > > the
            > > > datatable - which is cool, and I'd use the EMPTY message to be
            > > > specific to the table I'm displaying (e.g. "No contact's match the
            > > > selected criteria")
            > > >
            > > > However, the example below never sets the message to EMPTY, it's
            > > alway
            > > > s the LOADING message.
            > > >
            > > > Bug or user-error?
            > > >
            > > > Thanks
            > > > Pam
            > > >
            > > > ----------------- begin example ----------------
            > > >
            > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
            > > > "http://www.w3.org/TR/html4/strict.dtd"><html>
            > > > <!-- This is a YUI test html page showing that the loading message
            > > > doesn't change when empty -->
            > > > <head>
            > > > <meta http-equiv="content-type" content="text/html;
            > > > charset=utf-8">
            > > >
            > > > <!-- Standard reset, fonts and grids -->
            > > > <link rel="stylesheet" type="text/css"
            > > > href="http://yui.yahooapis.com/2.2.0//build/reset-fonts-
            > > grids/reset-fonts-grids.css">
            > > >
            > > > <link rel="stylesheet" type="text/css"
            > > >
            > > href="http://yui.yahooapis.com/2.2.0/build/treeview/assets/tree.css"
            > > />
            > > >
            > > > <!-- YUI Javascript-->
            > > > <script type="text/javascript"
            > > > src="http://yui.yahooapis.com/2.2.0/build/yahoo/yahoo-
            > > min.js"></script>
            > > > <script type="text/javascript"
            > > > src="http://yui.yahooapis.com/2.2.0/build/event/event-
            > > min.js"></script>
            > > > <script type="text/javascript"
            > > > src="http://yui.yahooapis.com/2.2.0/build/dom/dom-min.js"></script>
            > > > <script type="text/javascript"
            > > > src="http://yui.yahooapis.com/2.2.0/build/datasource/datasource-
            > > beta-min.js"></script>
            > > >
            > > > <script type="text/javascript"
            > > > src="http://yui.yahooapis.com/2.2.0/build/datatable/datatable-beta-
            > > min.js"></script>
            > > >
            > > >
            > > > </head>
            > > > <body id="yahoo-com">
            > > > <div id="contact-list-table"></div>
            > > >
            > > > <script type="text/javascript">
            > > > var crColumnHeaders = [
            > > > {text: 'ID', type: 'number', sortable:true,
            > > > key: 'cid'},
            > > > {text: 'ID Link', type: 'link',
            > > sortable:true,
            > > > key: 'contactid'}
            > > > ];
            > > >
            > > > var crColumnSet = new YAHOO.widget.ColumnSet
            > > (crColumnHeaders);
            > > >
            > > > var crRowData = ''
            > > >
            > > > var myDataSource = new YAHOO.util.DataSource(crRowData);
            > > > myDataSource.responseSchema = {
            > > > fields: ['cid', 'contactid', ]
            > > > };
            > > > var myDataTable = new
            > > > YAHOO.widget.DataTable("contact-list-table", crColumnSet,
            > > > myDataSource,{caption:"Loading/Empty Test"});
            > > > </script>
            > > > </body>
            > > > </html>
            > > >
            > >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.