I'm trying to reparent nodes to other "leaf nodes" (nodes without childs).
I set up property setCanAcceptDrop(true); setCanDrag(true) on MyTreeNode Class.
And the TreeGrid is set up...
Thus I can not reparent a node to nodes without childs. For this, I must put the property "setIsFolder(true)" on MyTreeNode Class (force to be a folder), but the control paints a cross to "leaf nodes". (see attachment image)
When I do click on the cross, it throw an exception:
When I click in other cross (of node expandable), all runs fine.
I test this with SmartGWT v2.2 & 2.4 using firefox 3.6 (and IE8, IE9, Safari and Chrome)
I attach the source code that it's showcase "Drag Reparent" with my changes.
thanks for your work!!
I set up property setCanAcceptDrop(true); setCanDrag(true) on MyTreeNode Class.
And the TreeGrid is set up...
Code:
employeeTreeGrid.setCanEdit(true); employeeTreeGrid.setCanReorderRecords(true); employeeTreeGrid.setCanAcceptDroppedRecords(true); employeeTreeGrid.setCanDragRecordsOut(true); employeeTreeGrid.setDragDataAction(DragDataAction.MOVE); employeeTreeGrid.setCanReparentNodes(true);
When I do click on the cross, it throw an exception:
Code:
11:06:14.441 [ERROR] [smartbug] 11:06:14.443:MUP1:WARN:TreeGridBody:isc_TreeGrid_0_body:startRowAnimation passed empty row range, aborting: 3,3 com.smartgwt.client.core.JsObject$SGWT_WARN: 11:06:14.443:MUP1:WARN:TreeGridBody:isc_TreeGrid_0_body:startRowAnimation passed empty row range, aborting: 3,3 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352) at java.lang.Thread.run(Thread.java:662)
I test this with SmartGWT v2.2 & 2.4 using firefox 3.6 (and IE8, IE9, Safari and Chrome)
I attach the source code that it's showcase "Drag Reparent" with my changes.
thanks for your work!!
Comment