This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
1. drag a basic > static text onto the page and name set its text property to title 2. drag a layout > grid panel onto the page (leave default size) 3. drag a basic > hyperlink onto the webform grid panel and set its text to one (or 1) 4. drag a basic > hyperlink onto the webform grid panel and set its text to two (or 2) 5. drag a basic > hyperlink onto the webform grid panel and set its text to three (or 3) 6. go to the outline window and drag the staticText1:title on top of the gridPanel1 it flashes at the bottom and then moves to position2. If you look in the jsp it is set to position3. Refreshing the webform will set it to match the jsp.
Here my conversation with Stan so far. Sandip Chitale wrote: > Hi Stan, > > I am back with some questions about drag and drop on the Explorer window. > > 1. Has there been any change in the DnD support in 5.5.1? Is so what? If you can point me to the branch names the TreeViewDropSupport.java went through that might help also. i'm not aware of any dnd updates in 5.5.1 > 2. In VW we support dragging an item from the palette to outline window. The outline window is based on Explorer Tree view. What I am noticing is that after I drop the component on to a container node - in the drop() method it first calls the performPaste() but then it also calls canReorder() and performReorder(). > > else { > // get correct paste type > PasteType pt = DragDropUtilities.getDropType( > dropNode, > ExplorerDnDManager.getDefault().getDraggedTransferable( > (DnDConstants.ACTION_MOVE & dropAction) != 0 > ), dropAction, > dropIndex > ); > > //remember the Nodes before the drop > final Node[] preNodes = dropNode.getChildren().getNodes( true ); > final Node parentNode = dropNode; > > * Node[] diffNodes = DragDropUtilities.performPaste(pt, dropNode);* > ExplorerDnDManager.getDefault().setDraggedNodes(diffNodes); > > //postpone the potential re-order so that the drop Node has enough > //time to re-create its children > SwingUtilities.invokeLater( new Runnable() { > public void run() { > Node[] diffNodes = getDiffNodes( parentNode, preNodes ); > *if( canReorder( parentNode, diffNodes ) ) { > performReorder( parentNode, diffNodes, lowerNodeIdx, upperNodeIdx ); > }* > } > }); > } > } > > Is it supposed to do that? This is specifically when I did not drop the object between the child nodes but right on top of the container node. Thus this is different than the case in: > > http://www.netbeans.org/issues/show_bug.cgi?id=81115 > > for which you did a fix in 5.5 for us. > > I thought the reorder business comes into play only when one reorders the components within a container or drop a component at a specific location (between children i.e. with the >----------------< bar showing). it's basically a workaround for Nodes that ignore the dropIndex parameter in the PasteType to ensure that the dropped Node is at the desired position after the drop. and if the PasteType operation did put the Node into the correct position then the reorder operation should be a noop. is there any problem with this behavior? stan > > -- > Sandip
This should be release noted for 5.5.1. The workaround is to hit refresh after dropping the component on outline.
*** Issue 109312 has been marked as a duplicate of this issue. ***
Looks like this has been fixed due to some fixes in the NetBeans drag and drop code. I am no longer able to reproduce this.
Verified using: Product Version: NetBeans 6 IDE Dev (Build 200708281200) System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb) Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06 Glassfish: 58c Woodstock 4.1: 200708281412