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 106347 - ModelSet event not fired when designbean added
Summary: ModelSet event not fired when designbean added
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Joelle Lam
URL:
Keywords:
: 104654 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-12 04:00 UTC by Joelle Lam
Modified: 2007-07-10 18:53 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Console Output with Exception (51.57 KB, text/html)
2007-06-12 04:03 UTC, Joelle Lam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joelle Lam 2007-06-12 04:00:47 UTC
This is a rewrite of #104654.

The user visible effect is that Page Flow Editor pages are not updated with new
buttons,etc.

To reproduce this issue:
1) Create a VWP Project
2) Create a new page (ie. Page2).
3) Via the designer add a button to Page1.
4) Open Page Flow Editor.
5) Draw a link from button to Page2.
6) Delete link.
7) Right click and try to add another button to Page1. 
You should find that you cannot add a button to Page1, but you can add it to Page2.

Now in your IDE open ModelSet.java.  Place a breakpoint on line 704
(fireModelChanged()).  If you add a button to the Page2 (the one that works)
this break point is hit.  If you add a button to Page1 you will notice that
break point is not hit.  Even though the fireModelChanged is not called, you
will see a * show up in the tab of Page1.  You can also go to Page1 and see that
the button was added so I know my addButtonAction did get called and
successfully modified the Page ( you can also see this by putting a breakpoint
at VWPContentModel.java line 498 - addPageBean).

What I am not sure about is why creating a link and deleting a link seems to be
part of this.  It is as if modifying the button handler gives insync issues. 
When I then try to close faces-config.xml I get and exception that I will attach.
Comment 1 Joelle Lam 2007-06-12 04:03:14 UTC
Created attachment 43538 [details]
Console Output with Exception
Comment 2 Joelle Lam 2007-06-12 04:03:49 UTC
*** Issue 104654 has been marked as a duplicate of this issue. ***
Comment 3 Joelle Lam 2007-06-12 04:19:02 UTC
Also, noting that sometimes you have to repeat steps 5-7 to reproduce issue.  
This is a regression and was an issue in M8 (prior to performance fixes).
Comment 4 Joelle Lam 2007-06-13 17:35:48 UTC
Sandip found the problem in the Navigation Support code.

VWPContentModel.java:

   public void deleteCaseOutcome(VWPContentItem item ){
       :
       try {
           for( DesignBean designBean : beans ){
               undo = facesModel.writeLock(null);  //!CQ TODO: nice description

Write lock should not be inside the loop. This may solve other issues with fileAlreadyLocked etc!
Comment 5 Joelle Lam 2007-06-13 17:37:08 UTC
IDE:-------------------------------------------------
IDE: [6/13/07 9:36 AM] Committing "Navigation Support" started
Checking in VWPContentModel.java;
/cvs/visualweb/navigation/src/org/netbeans/modules/visualweb/navigation/VWPContentModel.java,v  <--  VWPContentModel.java
new revision: 1.11; previous revision: 1.10
done
IDE: [6/13/07 9:36 AM] Committing "Navigation Support" finished
Comment 6 Joanne Lau 2007-06-14 19:07:54 UTC
Issue is still seen in build 200706140000

Steps to reproduce:

  - Create VW project
  - Open PFE, right click -> New File to create a new VW page (Page2)    
  - create link from Page1 to Page2, Page2->Page1  
  - Delete link  (Select link and click <Delete>)
  - Right click and add button to Page1,  button does not show up. 
Comment 7 _ sandipchitale 2007-06-14 19:26:06 UTC
Joelle, check if this is an issue on your side.
Comment 8 Joelle Lam 2007-07-10 18:53:45 UTC
I believe this issue has been fixed.