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

52293Re: [ydn-javascript] DataTable Cell Editor for HTML-formatted data

Expand Messages
  • Brian McCullough
    Dec 29, 2009
      On Mon, Dec 28, 2009 at 07:50:16PM -0800, Brian McCullough wrote:
      > On Mon, Dec 28, 2009 at 03:51:08PM +0100, Satyam wrote:
      >
      > The next step is to use your suggestion of using the Date Editor to assist me with the RTE part.

      Satyam ( and anybody else ),

      As I predicted, I have come up with a question.

      Following your suggestion, I copied the DateCellEditor code out of CellEditor.js ( in the API Documentation ), into a file in my own directory-space, and made what seemed to me to be appropriate changes. ( I tried to do nothing major to start with, just get a basic RTE rendered. ) I copied the "shortcut" var definitions from the beginning of the file, and the whole definition of DateCellEditor.


      So I started with:

      widget.DateCellEditor = function(oConfigs) {
      this._sId = "yui-dateceditor" + YAHOO.widget.BaseCellEditor._nCount++;
      widget.DateCellEditor.superclass.constructor.call(this, "date", oConfigs);
      };

      and changed it to:

      widget.RTECellEditor = function(oConfigs) {
      this._sId = "yui-rteceditor" + YAHOO.widget.BaseCellEditor._nCount++;
      widget.RTECellEditor.superclass.constructor.call(this, "rte", oConfigs);
      };


      I also compared the DateCellEditor to the TextareaCellEditor where I was unsure.


      At this point, I am getting an error complaining that "widget.RTECellEditor.superclass" is not defined. Is there something else that I need to copy from the CellEditor.js file that will help to define this, or is it not actually necessary?

      Since both DateCellEditor and TextareaCellEditor use the same construct, I don't think that I have acually mis-spelled anything, and my understanding is that the BaseCellEditor should be the superclass, but I would suspect that the RTECellEditor might need to be known to the BaseCellEditor, or in some other way properly included with that class.

      I do have the line:

      lang.extend(widget.RTECellEditor, BCE, {

      Just after the above, as it is for the other Cell Editors, but that obviously doesn't really do the trick.


      Thanks,
      Brian
    • Show all 9 messages in this topic