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.
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
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.
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"?
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.
Strange, now I am getting the confusing behavior, described by Lark & Sandip. Yesterday it was working the way I described. Investigating.
Yes, the reason of the problems seems to be the selection not working. Investigating.
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).
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
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)