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.

Bug 98333 - Outline reorders components after reparenting page child to gridPanel
Summary: Outline reorders components after reparenting page child to gridPanel
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: _ sandipchitale
URL:
Keywords: RELNOTE
: 109312 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-03-20 14:17 UTC by Lark Fitzgerald
Modified: 2007-08-29 18:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lark Fitzgerald 2007-03-20 14:17:55 UTC
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.
Comment 1 _ sandipchitale 2007-03-20 17:33:27 UTC
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 
Comment 2 _ sandipchitale 2007-04-03 17:10:47 UTC
This should be release noted for 5.5.1.

The workaround is to hit refresh after dropping the component on outline.
Comment 3 _ sandipchitale 2007-07-11 15:21:04 UTC
*** Issue 109312 has been marked as a duplicate of this issue. ***
Comment 4 _ sandipchitale 2007-08-24 21:40:37 UTC
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.
Comment 5 Lark Fitzgerald 2007-08-29 18:33:37 UTC
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