How to allow/block content save ?
Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
-
- Posts: 66
- Joined: Wed Dec 03, 2014 11:25 am
How to allow/block content save ?
Hello,
Our web author plugin uses URLHandler and LockHandlerFactory extensions.
Our lock handler extends LockHandlerWithContext.
To put the editor in read-only mode, I can throw a lock exception from updateLock().
But if I return a false from isSaveAllowed(), nothing appends. The method isSavedAllowed is never called.
Is this method isSavedAllowed used ?
My needs is set read-only mode in case of the content is not the last version in serie. Using lock info is not relevant here.
What is the best practice do do that ?
Regards,
Vincent
Our web author plugin uses URLHandler and LockHandlerFactory extensions.
Our lock handler extends LockHandlerWithContext.
To put the editor in read-only mode, I can throw a lock exception from updateLock().
But if I return a false from isSaveAllowed(), nothing appends. The method isSavedAllowed is never called.
Is this method isSavedAllowed used ?
My needs is set read-only mode in case of the content is not the last version in serie. Using lock info is not relevant here.
What is the best practice do do that ?
Regards,
Vincent
-
- Posts: 5
- Joined: Fri Dec 08, 2023 12:51 pm
Re: How to allow/block content save ?
Hello,
Did you also override isLockEnabled() to return true? See https://www.oxygenxml.com/InstData/Edit ... rBase.html
Regards,
Mircea
Did you also override isLockEnabled() to return true? See https://www.oxygenxml.com/InstData/Edit ... rBase.html
Regards,
Mircea
-
- Posts: 66
- Joined: Wed Dec 03, 2014 11:25 am
Re: How to allow/block content save ?
Hello,
Yes I do this override. But the method isSaveAllowed is never called even with this override.
When is this method useful?
After some search in your documentation, I found I can use oxygen_read_only [1] headers to implement my needs.
Regards,
[1] https://www.oxygenxml.com/doc/versions/ ... -only.html
Yes I do this override. But the method isSaveAllowed is never called even with this override.
When is this method useful?
After some search in your documentation, I found I can use oxygen_read_only [1] headers to implement my needs.
Regards,
[1] https://www.oxygenxml.com/doc/versions/ ... -only.html
-
- Posts: 5
- Joined: Fri Dec 08, 2023 12:51 pm
Re: How to allow/block content save ?
Hello,
After some more digging in the code it appears that the isSaveAllowed method is only used by the Oxygen XML Editor’s editor, and not by Web Author’s editor. We will update the documentation to reflect this.
In regard to setting the editor's read only mode, there are multiple methods mentioned in the topic you sent above which should all work.
Regards,
Mircea
After some more digging in the code it appears that the isSaveAllowed method is only used by the Oxygen XML Editor’s editor, and not by Web Author’s editor. We will update the documentation to reflect this.
In regard to setting the editor's read only mode, there are multiple methods mentioned in the topic you sent above which should all work.
Regards,
Mircea
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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