Multiple CustomAttributeValueEditor
Post here questions and problems related to oXygen frameworks/document types.
Multiple CustomAttributeValueEditor
I have implemented a CustomAttributeValueEditor for one attribute, and following the example in the SDF project sample, I am able to use it in our framework. Maybe I am misunderstanding the use case of this class, but I don't immediately see how to add additional CustomAttributeValueEditors for other attributes in the extension bundle. The overridden method (createCustomAttributeValueEditor) appears to only accept one. Is there a way to have several CustomAttributeValueEditors in a single extension bundle?
Re: Multiple CustomAttributeValueEditor
Hi,
Whenever an attribute value is edited, the method "ro.sync.ecss.extensions.api.ExtensionsBundle.createCustomAttributeValueEditor(boolean)" should be called and you can provide your own CustomAttributeValueEditor implementation on it as you probably already do.
Then the method "CustomAttributeValueEditor.shouldHandleAttribute(EditedAttribute, CustomAttributeValueEditingContext)" is called in your CustomAttributeValueEditor implementation providing you with an "ro.sync.ecss.extensions.api.EditedAttribute" interface from which you can obtain the name and current value of the edited attribute. So depending on the details in the received "EditedAttribute" interface you decide if the attribute name is interesting for you or not. Then you receive the callback "CustomAttributeValueEditor.getAttributeValue(EditedAttribute, Object)" again with the "EditedAttribute" interface allowing you to edit the attribute in any number of ways depending on its name.
Regards,
Radu
Whenever an attribute value is edited, the method "ro.sync.ecss.extensions.api.ExtensionsBundle.createCustomAttributeValueEditor(boolean)" should be called and you can provide your own CustomAttributeValueEditor implementation on it as you probably already do.
Then the method "CustomAttributeValueEditor.shouldHandleAttribute(EditedAttribute, CustomAttributeValueEditingContext)" is called in your CustomAttributeValueEditor implementation providing you with an "ro.sync.ecss.extensions.api.EditedAttribute" interface from which you can obtain the name and current value of the edited attribute. So depending on the details in the received "EditedAttribute" interface you decide if the attribute name is interesting for you or not. Then you receive the callback "CustomAttributeValueEditor.getAttributeValue(EditedAttribute, Object)" again with the "EditedAttribute" interface allowing you to edit the attribute in any number of ways depending on its name.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
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