View Full Version : setAllowDropOnLeaf(true); how is it work in Async TreePanel

22 Dec 2010, 4:06 AM
I want to drag and drop leaf nodes in async treepanel. I tried below but I couldn't be successfull:

target.addDNDListener( new DNDListener() {
public void dragDrop( DNDEvent e)

ModelData target = tree.findNode( e.getTarget() ).getModel();
target.set( "haschild", true );
store.update( target );
loader.loadChildren( target );
tree.setExpanded( target, true );

super.dragDrop( e );

} );

What must I do? Anyone can help me?

22 Dec 2010, 4:24 AM
I dont understand this code snippet. Please explain in detail what you want to do and what should happen on a drop

22 Dec 2010, 4:32 AM

"1. KA-7 first req" is leaf node.

I want to add "3. KA-11 fourth req" as a child of "1. KA-7 first req".

my loader definition is below:

loader = new BaseTreeLoader<ModelData>( proxy ) {
public boolean hasChildren( ModelData parent)

return parent.get( "haschild" );


my aim picture is below:

is it explicit?

6 Jan 2011, 5:04 AM
Now, I succeeded this work. It 's working like a charm. Nobody help me!;)