Use Form Control to Add Value to Attribute
Oxygen general issues.
-
- Posts: 171
- Joined: Thu Aug 30, 2018 10:06 pm
Use Form Control to Add Value to Attribute
Post by dreifsnider »
Hello!
I'm trying to implement a form control to let authors easily control the values of the @outputclass attribute. I'd like for them to be able to add a variety of attribute values in a variety of combinations. For example, I'd like for them to be able to set the @outputclass for an image directly in Author Mode to various combinations of float-left, box-shadow, and thumbnail.
I've tried using both oxy_checkbox and oxy_combobox, but both of these directly overwrite the entire @outputclass values with the selected value instead of simply adding the value.
Essentially, I'm wondering if there's a way to simply append a value to the existing attribute values instead of entirely overwriting the attribute values.
Thanks!
Daniel
I'm trying to implement a form control to let authors easily control the values of the @outputclass attribute. I'd like for them to be able to add a variety of attribute values in a variety of combinations. For example, I'd like for them to be able to set the @outputclass for an image directly in Author Mode to various combinations of float-left, box-shadow, and thumbnail.
I've tried using both oxy_checkbox and oxy_combobox, but both of these directly overwrite the entire @outputclass values with the selected value instead of simply adding the value.
Essentially, I'm wondering if there's a way to simply append a value to the existing attribute values instead of entirely overwriting the attribute values.
Thanks!
Daniel
-
- Site Admin
- Posts: 95
- Joined: Thu Jun 09, 2016 2:01 pm
Re: Use Form Control to Add Value to Attribute
Post by Gabriel Titerlea »
Hello,
If you know all the possible values that the outputclass attribute will have, writing them in the values part should be enough:
If this solution does not work for you, you'll need to implement an AuthorOperation [1] that changes the attribute of the currently selected node [2].
Best,
Gabriel
[1] https://www.oxygenxml.com/doc/versions/ ... ments.html
[2] https://www.oxygenxml.com/doc/versions/ ... -node.html
If you know all the possible values that the outputclass attribute will have, writing them in the values part should be enough:
Code: Select all
oxy_combobox(edit @outputclass, values "box-shadow, float-left, other-value1, other-value2")
Best,
Gabriel
[1] https://www.oxygenxml.com/doc/versions/ ... ments.html
[2] https://www.oxygenxml.com/doc/versions/ ... -node.html
-
- Posts: 171
- Joined: Thu Aug 30, 2018 10:06 pm
Re: Use Form Control to Add Value to Attribute
Post by dreifsnider »
Thank you for your reply Gabriel!
Unfortunately, I don't think the oxy_combobox will work, because it looks like a user can't select more than one option at a time, for example, they wouldn't be able to select both float-left and box-shadow; it's either one or the other. I supposed I could add every combination of values as a separate, unique value, but this seems unmanageable especially given that the list of allowed values can potentially grow.
I will explore the other form controls to see they would work instead, specifically, checkbox and popup.
I will also look into create a custom Author Operation, but my Java skills might not be enough to do this successfully.
Thanks again!
Daniel
Unfortunately, I don't think the oxy_combobox will work, because it looks like a user can't select more than one option at a time, for example, they wouldn't be able to select both float-left and box-shadow; it's either one or the other. I supposed I could add every combination of values as a separate, unique value, but this seems unmanageable especially given that the list of allowed values can potentially grow.
I will explore the other form controls to see they would work instead, specifically, checkbox and popup.
I will also look into create a custom Author Operation, but my Java skills might not be enough to do this successfully.

Thanks again!
Daniel
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