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

Re: Any Ways to Disable Dynamic Load for Non-Root Nodes?

Expand Messages
  • Chun
    There is a work-around I ve tried: Instead of setting the root dynamic, as shown by the Yahoo tutorial and example, set the node dynamic when you re creating
    Message 1 of 4 , Apr 3, 2006
    • 0 Attachment
      There is a work-around I've tried: Instead of setting the root
      dynamic, as shown by the Yahoo tutorial and example, set the node
      dynamic when you're creating EACH node. Of course, when you have ways
      to know in advance that a particular node is leaf, don't set it as
      dynamic. This will make the leaf nodes appear without expandable
      and/or folder icons.
    • Chun
      Thanks, David, for trying to help. I soon replied to my own message with the solution similar to yours. I guess my original question was about the level on
      Message 2 of 4 , Apr 10, 2006
      • 0 Attachment
        Thanks, David, for trying to help. I soon replied to my own message
        with the solution similar to yours. I guess my original question was
        about the level on which "setDynamicLoad()" is set. There is no
        problem for me to set it when building each child node, but if I set
        it on the whole tree level (just for convenience), I wouldn't be able
        to turn it off on a child node. It seems to be the way that TreeView
        is designed, and I guess I just have to use it like what you did. :)

        Thanks again,
        Chun

        --- In ydn-javascript@yahoogroups.com, "dprusak@..." <dprusak@...> wrote:
        >
        > I'm not sure if I follow. We use treeview and we can set dynamic
        > on/off when needed and it works for us.
        >
        > When we expand the tree and the data coming in lets us know what's a
        > directory or a file (dynamic node on or off).
        >
        > if (myData.name.length > 0) {
        > child = new YAHOO.widget.TaskNode(myData, node, false);
        > if (myData.mimeType == "File Folder"
        > child.setDynamicLoad(loadDataForNode);
        > }
        > }
        >
        > I guess I don't really understand the question :)
        >
        > --David
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.