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.
Summary: | property event not sent when doc is well-formed | ||
---|---|---|---|
Product: | javaee | Reporter: | Joelle Lam <joellelam> |
Component: | Code | Assignee: | Petr Pisl <ppisl> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | j_lau |
Priority: | P2 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 98171, 98413 | ||
Attachments: | NullPointerException |
Description
Joelle Lam
2007-03-21 23:00:07 UTC
Checking in SyncUpdateTest.java; /cvs/web/jsf/test/unit/src/org/netbeans/modules/web/jsf/xdm/model/SyncUpdateTest.java,v <-- SyncUpdateTest.java initial revision: 1.1 done IDE: [3/21/07 11:44 AM] Committing "model" finished The test was wrong. There were these steps: model = loadRegistryModel( wellformedfile ) setDocumentContentTo( model, notwelformedfile) model. addListener() model = loadRegistryModel(wellformedfile) The problem is that loadRegistryModel returns completely new model. So the listener listens on different model. The last line has to be changed to setDocumentContentTo( model, notwelformedfile). So the steps are: model = loadRegistryModel( wellformedfile ) setDocumentContentTo( model, notwelformedfile) model. addListener() setDocumentContentTo( model, welformedfile) In this case the property change is fired and test passes -> marking as invalid. The fix of the test 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.4; previous revision: 1.3 done Apologies, you are right, my test case was wrong. I am trying to reproduce a bug which I am running into in navigation. Often, when I modify the xml to a malformed file and then make it well-formed again, an event doesn't get triggered. I will try to reproduce a better unit test. IDE:------------------------------------------------- IDE: [3/22/07 5:37 PM] Committing "model" started cvs server: scheduling file `faces-config-wellformed.xml' for addition cvs server: use 'cvs commit' to add this file permanently Checking in faces-config-05.xml; /cvs/web/jsf/test/unit/src/org/netbeans/modules/web/jsf/xdm/model/faces-config-05.xml,v <-- faces-config-05.xml new revision: 1.2; previous revision: 1.1 done Checking in faces-config-notwellformed.xml; /cvs/web/jsf/test/unit/src/org/netbeans/modules/web/jsf/xdm/model/faces-config-notwellformed.xml,v <-- faces-config-notwellformed.xml new revision: 1.2; previous revision: 1.1 done 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.5; previous revision: 1.4 done RCS file: /cvs/web/jsf/test/unit/src/org/netbeans/modules/web/jsf/xdm/model/faces-config-wellformed.xml,v done Checking in faces-config-wellformed.xml; /cvs/web/jsf/test/unit/src/org/netbeans/modules/web/jsf/xdm/model/faces-config-wellformed.xml,v <-- faces-config-wellformed.xml initial revision: 1.1 done IDE: [3/22/07 5:37 PM] Committing "model" finished Here are the commits for the update test case. It seems that a
NullPointerException is getting thrown in xam.
Ultimately, this cauase AbstractModel line 240 to get called:
> endTransaction(true); // do not fire events
I will also attach the NullPointerException.
Created attachment 39852 [details]
NullPointerException
This is problem in my implementation. I will fix it. Thanks for finding this and writing the test. Adding implementation of ComponentUpdater, which solves the probelm. RCS file: /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/SyncUpdateVisitor.java,v done Checking in src/org/netbeans/modules/web/jsf/impl/facesmodel/SyncUpdateVisitor.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/SyncUpdateVisitor.java,v <-- SyncUpdateVisitor.java initial revision: 1.1 done Checking in src/org/netbeans/modules/web/jsf/impl/facesmodel/JSFConfigModelImpl.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/JSFConfigModelImpl.java,v <-- JSFConfigModelImpl.java new revision: 1.4; previous revision: 1.3 done Checking in test/unit/src/org/netbeans/modules/web/jsf/xdm/model/SyncUpdateTest.java; /cvs/web/jsf/test/unit/src/org/netbeans/modules/web/jsf/xdm/model/SyncUpdateTest.java,v <-- SyncUpdateTest.java new revision: 1.6; previous revision: 1.5 done The issue is considered as NB 6.0 M8 stopper since it's serious bug for VWP functionality. The exceptions are thrown when faces-config.xml is modified. Petre, please merge the fix in M8 branch Committed to the netbeans60-m8 branch. Checking in SyncUpdateVisitor.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/SyncUpdateVisitor.java,v <-- SyncUpdateVisitor.java new revision: 1.1.2.1; previous revision: 1.1 done Checking in JSFConfigModelImpl.java; /cvs/web/jsf/src/org/netbeans/modules/web/jsf/impl/facesmodel/JSFConfigModelImpl.java,v <-- JSFConfigModelImpl.java new revision: 1.3.2.1; previous revision: 1.3 done I'm sorry, the branch was release60-m8. |