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

Re: [ydn-javascript] Re: TreeView Dyanmic Loading Scope

Expand Messages
  • Nige White
    ... Step through it with Venkman. This advice could apply to 90% of the queries here. _____________________________________________________________________
    Message 1 of 7 , May 31, 2006
    • 0 Attachment
      johnkeyes wrote:

      > --- In ydn-javascript@yahoogroups.com, Nige White <nigelw@...> wrote:
      > > Yes, the loadDataForNode is being called in the scope of the tree.
      > >
      > > You need to bind it to your widget when you tell the tree what function
      > > to use to get dynamic data:
      > >
      > > var me = this;
      > > this._tree.setDynamicLoad(function()
      > > {
      > > JK.widget.MyWidget.prototype.loadDataForNode.apply(me, arguments);
      > > }, 1);
      >
      > Thanks Nigel, that works just fine.
      >
      > I now have access to the element using 'this._text' but when I
      > manipulate it's value the change is not mirrored in the text field.
      >
      > this._text.value = node.data.id;
      >
      >
      > However, if I use:
      >
      > document.getElementById('_text').value = node.data.id;
      >
      >
      > it works. Does this mean YUI clones the elements I have created and
      > these clones are rendered rather than the actual one's I created? I
      > am adding the elements to the dialog using the appendToBody() method
      > from my widgets init(). For example:
      >
      > var actions = document.createElement('div');
      > actions.className = "actions";
      > this._fileText = document.createElement("input");
      > // this is not reflected in UI
      > this._fileText.value = "j's text field";
      > actions.appendChild(this._fileText);
      > this.appendToBody(actions);
      >
      > The Module.render() method and the Module.appendToBody() method both
      > seem to deal directly with the DOM though, so I don't see where the
      > disjoint is occuring.

      Step through it with Venkman.

      This advice could apply to 90% of the queries here.

      _____________________________________________________________________
      This message has been checked for all known viruses. Virus scanning
      powered by Messagelabs http://www.messagelabs.com For more information
      e-mail : hostmaster@...
    • johnkeyes
      ... I have stepped through with Venkman but it hasn t shown me anything I didn t see from looking at the source code. I still don t see where/if element
      Message 2 of 7 , May 31, 2006
      • 0 Attachment
        --- In ydn-javascript@yahoogroups.com, Nige White <nigelw@...> wrote:
        > Step through it with Venkman.
        >
        > This advice could apply to 90% of the queries here.

        I have stepped through with Venkman but it hasn't shown me anything I didn't see from looking at the source code.  I still don't see where/if element cloning or .innerHTML is being used for this case.  I'll keep looking ...

        -John K
      Your message has been successfully submitted and would be delivered to recipients shortly.