TreeV3

Tree V3 Icons - TreeDocIconExtension Not Firing select event - version 0.4.x

Hi,

Problem:

My treeselectorV3 event is not being fired when I click on an icon provided by the TreeDocIconExtension however the TreeLabel is being focused when the icon is clicked.

How can I ensure that the select function (select:nodeSelected) is fired when I click on the Icon(happens to be a folder) next to the Tree Label.

I hope I have been clear enough.

Thanks,

Darren.

change widget id of tree widget node

I am using tree widget, which nodes are built on server side.
On the client side i want to change tree element's name (which is quite easy with setTitle method), but
i also have to change it's widget id. Since widget id in my tree consisits of id and name e.g. id_name.

And here comes the problem, when i change element's widget id in javascript, dojo.widget.byId() can't find this element by its new id.

How can i solve this.
thnx

General TreeV3.js source code method query

Here's a snippet from TreeV3.js, which I have traced down as the culprit for moving a node to its destination on drop.  What does the "this.doMove.apply" call do? I see there's a doMove method, but what does "apply" do to it??

What I am aiming for is for the addchild event to be called and the info sent to the server, but not actually HAPPEN on the screen, so I can map 2 elements together in my database based on their ids 

 

move:function (child, newParent, index) {
    if (!child.parent) {
        dojo.raise(this.widgetType + ": child can be moved only while it's attached");
    }
  alert('inside Tree move');
    var oldParent = child.parent;
    var oldTree = child.tree;
    var oldIndex = child.getParentIndex();
    var newTree = newParent.tree;
    var newParent = newParent;
    var newIndex = index;
    var message = {oldParent:oldParent, oldTree:oldTree, oldIndex:oldIndex, newParent:newParent, newTree:newTree, newIndex:newIndex, child:child};
    dojo.event.topic.publish(oldTree.eventNames.beforeMoveFrom, message);
    dojo.event.topic.publish(newTree.eventNames.beforeMoveTo, message);
    this.doMove.apply(this, arguments);
    dojo.event.topic.publish(oldTree.eventNames.afterMoveFrom, message);
    dojo.event.topic.publish(newTree.eventNames.afterMoveTo, message);
}, doMove:function (child, newParent, index) {
    child.doDetach();
    newParent.doAddChild(child, index);
}

Syndicate content

Back to top