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.
When you remove a navigation rule from the xml file, an property change event on the model is never triggered.
Committed unit test in trunk. IDE:------------------------------------------------- IDE: [3/28/07 4:32 PM] Committing "SyncUpdateTest.java" started Checking in SyncUpdateTest.java; /cvs/web/jsf/test/unit/src/org/netbeans/modules/web/jsf/xdm/model/SyncUpdateTest.java,v <-- SyncUpdateTest.java new revision: 1.7; previous revision: 1.6 done IDE: [3/28/07 4:32 PM] Committing "SyncUpdateTest.java" finished
Is this really P1?
In the test the event is not fired, because the model still things that there is the same number of navigation rules as was before removing. I will investigate more.
Fixed in the trunk Checking in SyncUpdateVisitor.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/SyncUpdateVisitor.java,v <-- SyncUpdateVisitor.java new revision: 1.2; previous revision: 1.1 done
I am still have this issue. Are you sure it is fixed? You might want to re-run the unit test.
*** Issue 100828 has been marked as a duplicate of this issue. ***
Note: This issue appears to be causing a failure in VW hyperlink component test.
Just renaming more appropriately.
*** Issue 112141 has been marked as a duplicate of this issue. ***
I did better test for the firing event. Based on the test the behavior is: If there is deleted a component (like NavigationRule or NavigationCase), then the PropertyChangeEvent and ComponentEvent are fired. If there is a property of component deleted (like ToViewID or FromOutcome), only ComponentEvent is fired. The ComponentEvent is VALUE_CHANGED. So basically there are tree options: 1) Clients will listen also on the ComponentListeners. 2) All the simple property will be rewritten to the simple components, but it means that all client will have to reflect these changes, because it requires changes in the api interfaces. 3) We will ask for a functionality, which will fire a PropertyChangeEvent from xam module. Joelle, the simplest solution is that your code will also listen a ComponentListener. Look at the improved test SyncUpdateTest.testSyncRemoveCase_99325, where I'm testing, whether the event is fired. If you think, that the solution 1 is ok for you, please close the issue.
I looked at this issue of removing a "Rule" from the page and it seems that it has been fixed. Now when I remove a rule PropertyChangeListener is called. Maybe something got fixed in XAM? So we can mark this bug as fixed. The additional issue that you mentioned below is something that I didn't catch ealier. It probably should be refiled against XAM. Per the notes, PropertyChangeListener is supposed to offer finer granularity than Component Listener (http://xml.netbeans.org/xam-usage.html). I am worried that if I submit a work around, they might fix this and cause a regression (or double accounting of the same action due to two listeners) in my code.
verified Product Version: NetBeans IDE 6.5 (Build 200811100001) Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15 System: Linux version 2.6.27-7-generic running on i386; UTF-8; en_US (nb)