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 102260 - Double click to open second page fragment doesn't work
Summary: Double click to open second page fragment doesn't work
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Peter Zavadsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-24 02:21 UTC by _ krystyna
Modified: 2007-06-22 00:12 UTC (History)
1 user (show)

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 _ krystyna 2007-04-24 02:21:14 UTC
NB 04233
XP
JDK1.6

1. Create a VWP EE5 project
2. Drop a page fragment, creating a  new Fragment1, ok
3. Double click on designer which opens tab to fragment1 and drop
   a textfield component, inline editing "this is frag 1"
4. return to designer and drop a second page fragment, i.e
   create a new Fragment2, ok.
5. Double click to edit
>fragment 1 comes into view


Workaround is to open Fragment2.jspf in project view
Comment 1 Peter Zavadsky 2007-04-30 07:13:34 UTC
I verified there is called OpenCookie.open which was retrieved from the
JsfJspDataObject representing the fragment file, but nothing has happened.

Probably this was introduced while playing with Open and edit cookies while
satisfying behaviour for the project creation reopen, but breaking the contract
for open and edit cookie.

Passing to the loader impl.
Comment 2 _ sandipchitale 2007-05-01 06:17:50 UTC
I am able to reproduce this but I am not clear about Peters comments about:

"playing with Open and edit cookies while satisfying behaviour for the project 
creation reopen"

Peterm when do you think changes were made to Open and Edit cookies? What do 
you mean by "project creation reopen"?
Comment 3 _ sandipchitale 2007-05-01 06:18:49 UTC
I am able to reproduce this but I am not clear about Peters comments about:

"playing with Open and edit cookies while satisfying behaviour for the project 
creation reopen"

Peterm when do you think changes were made to Open and Edit cookies? What do 
you mean by "project creation reopen"?
Comment 4 _ sandipchitale 2007-05-01 06:29:40 UTC
Peter, looks like something funcky going on here. When you drop the second 
page fragment and select it ... it actually selects the first one. I will let 
you track that down first. May be that is the reason first one opens when you 
double click on the second one.

Also try selecting each of them in Outline. The first one always shows the 
selection handles. If you delete the second one from the outline the second 
one actually is deleted.
Comment 5 Peter Zavadsky 2007-05-01 08:52:33 UTC
Strange, now I am getting the confusing behavior, described by Lark & Sandip.
Yesterday it was working the way I described. Investigating.
Comment 6 Peter Zavadsky 2007-05-01 09:23:17 UTC
Yes, the reason of the problems seems to be the selection not working.
Investigating.
Comment 7 Peter Zavadsky 2007-05-01 10:41:54 UTC
I found the cause of the issue.
Problem is the LiveUnit.getBeanEquivalentTo method.
It always returns the DesignBean representing the 1st jsp include (fragment) for
specified DesignBean representing any jsp include (fragment) in the page (2nd,
3rd, 4th etc.).

Thus the selection always goes to the first fragment whatever fragment is tried
to be selected.

The method should be fixed, it uses only the name to find an equivalent, which
seems to be insufficient for this case (it is jsp:include).

Suggested fix:
I suggest first to check whether the instance is already between the
liveBeanList, and if yes the return the same instance. Only in case the instance
is missing try to compare by name.

Preparing the fix (the method is used only in designer/jsf and outline).

Comment 8 Peter Zavadsky 2007-05-01 10:59:42 UTC
Fixed:

Checking in
visualweb/insync/src/org/netbeans/modules/visualweb/insync/live/LiveUnit.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/live/LiveUnit.java,v
 <--  LiveUnit.java
new revision: 1.4; previous revision: 1.3
done
Comment 9 _ krystyna 2007-06-22 00:12:16 UTC
Verified fixed in Product Version: NetBeans IDE Dev (Build 200706211546) Java: 1.6.0_02-ea; Java HotSpot(TM) Client VM
1.6.0_02-ea-b02 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)