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 141781 - setModified does not work in XMLMV
Summary: setModified does not work in XMLMV
Status: RESOLVED WORKSFORME
Alias: None
Product: xml
Classification: Unclassified
Component: XML Multiview (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on: 77210
Blocks:
  Show dependency tree
 
Reported: 2008-07-26 18:42 UTC by scanti
Modified: 2011-11-11 20:55 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 scanti 2008-07-26 18:42:14 UTC
I am  currently developing an RCP that uses XML-Multiview
I have found this problem. 
If I call setModified(true) on the dataObject, the first time every thing works.
Then I click on the save button and recall setModified(true).
This time I am not able to save unless I go to the Text view and  I press any key

I have found a workaround by extending XmlMultiViewEditorSupport
and adding

@Override
    public void saveDocument() throws IOException {
        super.saveDocument();
        DataObject dataObject = getDataObject();
        if(dataObject.isModified()) {
            dataObject.setModified(false);
        }
    }

I will be grateful if you could fix it
Thanks
Comment 1 Milan Kuchtiak 2008-08-12 09:05:45 UTC
The fix looks fine.
It can be integrated, I think.
Comment 2 Vince Kraemer 2008-12-03 19:33:20 UTC
bad tm value... reset to tbd
Comment 3 Petr Jiricka 2009-10-08 16:33:09 UTC
The save support in the platform is a real mess. I am wondering whether the proposed Savable interface would help here.
See issue 77210.
Comment 4 Svata Dedic 2011-11-11 20:55:36 UTC
Should work fine, current implementation (indirectly) calls DO.setModified(false) through XmlEnv. Please check in 7.1 dev/beta builds