checkbox Action
Oxygen general issues.
checkbox Action
Hi,
I'm using a checkbox form control in my CSS. I want to launch an action when this is clicked.
My first thought was to catch the attribute change in the DocumentModificationsFilter setAttribute() method but I can't seem to get at AuthorAccess there.
Is this the correct approach? If so, how do I pass AuthorAccess to my filter? If this is not the correct approach, please advise.
Thanks
I'm using a checkbox form control in my CSS. I want to launch an action when this is clicked.
Code: Select all
oxy_editor(
type, check,
edit, "@ready",
values, "true",
uncheckedValues, "false",
labels, "")
Code: Select all
@Override
public void setAttribute(AuthorDocumentFilterBypass filterBypass, String attributeName, AttrValue value, AuthorElement element) {
if (attributeName.equals("ready")) {
// If value is true call Helpers.updateMetadata(authorAccess);
}
super.setAttribute(filterBypass, attributeName, value, element);
Thanks
-
- Posts: 1008
- Joined: Wed Nov 16, 2005 11:11 am
Re: checkbox Action
Post by alex_jitianu »
Hello,
Using an ro.sync.ecss.extensions.api.AuthorDocumentFilter to catch the event was also my first thought! It's true that its methods don't receive an AuthorAccess instance, but such a filter it's usually created and set in a context where an AuthorAccess is available. For example on a ro.sync.ecss.extensions.api.AuthorExtensionStateListener. So you could give an AuthorAccess on the constructor of the document filter:
Please let me know if this works for you or we should look for another solution.
Best regards,
Alex
Using an ro.sync.ecss.extensions.api.AuthorDocumentFilter to catch the event was also my first thought! It's true that its methods don't receive an AuthorAccess instance, but such a filter it's usually created and set in a context where an AuthorAccess is available. For example on a ro.sync.ecss.extensions.api.AuthorExtensionStateListener. So you could give an AuthorAccess on the constructor of the document filter:
Code: Select all
/**
* @see ro.sync.ecss.extensions.api.AuthorExtensionStateListener#activated(ro.sync.ecss.extensions.api.AuthorAccess)
*/
public void activated(AuthorAccess authorAccess) {
AuthorDocumentController documentController = authorAccess.getDocumentController();
documentController.setDocumentFilter(new AuthorDocumentFilter(authorAccess));
}
Best regards,
Alex
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