ask editor variable with ChangeAttributesOperation
Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
-
- Posts: 240
- Joined: Wed Jun 17, 2015 12:46 pm
ask editor variable with ChangeAttributesOperation
Hello,
I am using the Author web 25 version.
I have created this operation:
When I launch this action, a popup is displayed allowing to change attr1 and attr2 with two fields.
The problem is that I would like to have the possibility to put a non empty value to only one of this attribute filed and let the other one at an empty value.
If an attribute has an empty value in the popup field, it has to be removed from the XML.
I cannot perform this because the form forces to have two non empty values.
Do you have an idea to perform this behaviour?
Thank you for your help,
Johann
I am using the Author web 25 version.
I have created this operation:
Code: Select all
<a:operation id="ChangeAttributesOperation">
<a:arguments>
<a:argument name="attributeNames">attr1
attr2</a:argument>
<a:argument name="values">${ask('Change attr1:', generic)}
${ask('Change attr2:', generic)}
</a:argument>
<a:argument name="removeIfEmpty">true</a:argument>
</a:arguments>
</a:operation>
When I launch this action, a popup is displayed allowing to change attr1 and attr2 with two fields.
The problem is that I would like to have the possibility to put a non empty value to only one of this attribute filed and let the other one at an empty value.
If an attribute has an empty value in the popup field, it has to be removed from the XML.
I cannot perform this because the form forces to have two non empty values.
Do you have an idea to perform this behaviour?
Thank you for your help,
Johann
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: ask editor variable with ChangeAttributesOperation
Hello,
We tested the operation you provided and we managed to reproduce the problem, thank you for the details.
The empty value should be allowed for the asks inputs in the dialog.
We added an issue in our internal issues tracking system and we will update this thread when the fix will be available.
Best Regards,
Mihaela.
We tested the operation you provided and we managed to reproduce the problem, thank you for the details.
The empty value should be allowed for the asks inputs in the dialog.
We added an issue in our internal issues tracking system and we will update this thread when the fix will be available.
Best Regards,
Mihaela.
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Site Admin
- Posts: 172
- Joined: Tue Mar 20, 2018 5:28 pm
Re: ask editor variable with ChangeAttributesOperation
Post by Bogdan Dumitru »
Hello Johann,
Note that you can easily implement your own dialog that allows invoking the operation with an empty value:
Note that you can easily implement your own dialog that allows invoking the operation with an empty value:
- create a custom AbstractAction and register it to the ActionsManager, as this tutorial shows
- retrieve user input by showing a Dialog with the two input fields within your action's "actionPerformed()" method. See in this tutorial how to show a dialog
- invoke ChangeAttributesOperation when the OK dialog button is pressed (see Dialog.onSelect()) using ActionsManager.invokeOperation()
Bogdan Dumitru
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: ask editor variable with ChangeAttributesOperation
Hello,
We just released Web Author version 25.1 and it contains the fix for the problem reported here. Now empty values are allowed for asks inputs.
Here is the "What is new" list for this version:
https://www.oxygenxml.com/xml_web_autho ... 5.1.0.html
Best Regards,
Mihaela
We just released Web Author version 25.1 and it contains the fix for the problem reported here. Now empty values are allowed for asks inputs.
Here is the "What is new" list for this version:
https://www.oxygenxml.com/xml_web_autho ... 5.1.0.html
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