Refresh Author/Save button via Java
Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
-
- Posts: 43
- Joined: Thu Feb 16, 2023 11:00 pm
Refresh Author/Save button via Java
Hello,
We have implemented a scheduler in our framework to trigger an internal auto-save, allowing documents to be saved in our data management system.
This customization was necessary because Oxygen's autosave does not go through the editorAboutToBeSavedVeto event.
However, we encountered an issue with the "Author/Save" button. While the auto-save works correctly, the button remains enabled.
We attempted to use the DIRTY_STATUS listener, but when saving via Java, the frontend is not updated.
We would like to know if there is a way to set the DIRTY_STATUS via Java on the backend or if there is an option to update the "Author/Save" button status via Java.
Thank you in advance.
We have implemented a scheduler in our framework to trigger an internal auto-save, allowing documents to be saved in our data management system.
This customization was necessary because Oxygen's autosave does not go through the editorAboutToBeSavedVeto event.
However, we encountered an issue with the "Author/Save" button. While the auto-save works correctly, the button remains enabled.
We attempted to use the DIRTY_STATUS listener, but when saving via Java, the frontend is not updated.
We would like to know if there is a way to set the DIRTY_STATUS via Java on the backend or if there is an option to update the "Author/Save" button status via Java.
Thank you in advance.
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: Refresh Author/Save button via Java
Hello,
There is a JAVA API available to set the editor as "modified" or "not modified":
ro.sync.exml.workspace.api.editor.WSEditorBase.setModified(boolean) [1]
If you have access to the AuthorDocumentModel (model), here is how you can set the document as "not modified":
[1] https://www.oxygenxml.com/InstData/Edit ... d(boolean)
Best Regards,
Mihaela
There is a JAVA API available to set the editor as "modified" or "not modified":
ro.sync.exml.workspace.api.editor.WSEditorBase.setModified(boolean) [1]
If you have access to the AuthorDocumentModel (model), here is how you can set the document as "not modified":
Code: Select all
model.getAuthorAccess().getEditorAccess().setModified(false);
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service