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

20305Why am I getting this event error??

Expand Messages
  • j2ee20072007
    Nov 1, 2007
      Does anyone know why the line "this.fireEvent("tableMsgShowEvent",
      {html:sHTML, className:sClassName});" might be giving the
      error "Property does not support this method"? From what I can tell
      this is just trying to set up a very basic datatable. This worked
      under 2.2.2:


      YAHOO.widget.DataTable.prototype.showTableMessage = function(sHTML,
      sClassName) {
      var elCell = this._elMsgTd;
      if(YAHOO.lang.isString(sHTML)) {
      elCell.innerHTML = sHTML;
      }
      if(YAHOO.lang.isString(sClassName)) {
      YAHOO.util.Dom.addClass(elCell, sClassName);
      }
      this._elMsgTbody.style.display = "";
      this.fireEvent("tableMsgShowEvent", {html:sHTML,
      className:sClassName});
      };

      Here's the code:


      // Override the built-in link formatter
      YAHOO.widget.Column.formatLink = function(elCell, oRecord, oColumn,
      oData) {
      var batchId = oData;
      elCell.innerHTML = "<a href=\"BatchDetail.do?batchId=" + batchId
      + "\">" + batchId + "</a>";
      };


      var columnHeaders = [
      {key:"batchNumber", text:"<br>Batch Number", type:"link"},
      {key:"dateProduced", text:"Date Produced", type:"Date"},
      {key:"datePrinted", text:"Date Printed", type:"Date"},
      {key:"dateMailed",
      text:"Date Mailed",
      type:"text",
      editor:"textbox"},
      {key:"Count", text:" Count", type:"Number"}
      ];

      var columnSet = new YAHOO.widget.ColumnSet(columnHeaders);

      <%= request.getAttribute("javascriptArrayData") %>

      var dataSource = new YAHOO.util.DataSource(batchData);

      dataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;

      dataSource.responseSchema = {
      fields:
      ["batchNumber","dateProduced","datePrinted","dateMailed","Count"]
      };

      var dataTable = new YAHOO.widget.DataTable("editing", columnHeaders,
      dataSource
      ); // This line produces the event error


      Thanks
    • Show all 2 messages in this topic