Display value of a parameter in an ${ask} message
Are you missing a feature? Request its implementation here.
-
- Posts: 163
- Joined: Sat Aug 28, 2010 1:23 am
Display value of a parameter in an ${ask} message
In a transform scenario, I have a user requesting a dialog box to confirm cleaning the output directory. Ideally, I'd like to show them the path to the directory I'm asking them about removing. I was hoping I could do:
Where OutputDirectory is another parameter they've already set. But it's not rendered in the dialog. Is there a way to accomplish this?
Regards,
David
Code: Select all
${ask('Really remove ${OutputDirectory}?', radio, ('true':'Yes';'false':'No'), 'true')}
Regards,
David
-
- Posts: 417
- Joined: Mon May 09, 2016 9:37 am
Re: Display value of a parameter in an ${ask} message
Post by sorin_carbunaru »
Hello David,
How is "${OutputDirectory}" set? Is its value the result of another ${ask}? Or just a simple string value?
Best wishes,
Sorin Carbunaru
oXygen XML
How is "${OutputDirectory}" set? Is its value the result of another ${ask}? Or just a simple string value?
Best wishes,
Sorin Carbunaru
oXygen XML
-
- Posts: 163
- Joined: Sat Aug 28, 2010 1:23 am
Re: Display value of a parameter in an ${ask} message
In this case, it's another parameter, but not an ${ask}. I suppose someone could set that one to an ${ask} though in their version of the transform scenario. It would typically be set to ${pd}/output or something like that.
-
- Posts: 417
- Joined: Mon May 09, 2016 9:37 am
Re: Display value of a parameter in an ${ask} message
Post by sorin_carbunaru »
Well, if that's the case, probably the most simple workaround (instead of using "${outputFolder}" is to add "${pd}/output" inside the message parameter of the "${ask}" variable. Would that be a viable option?
-
- Posts: 163
- Joined: Sat Aug 28, 2010 1:23 am
Re: Display value of a parameter in an ${ask} message
The only problem there would be the user might change the value of outputFolder to be something else. I'd have to pass in ${pd} and then hard code the output folder in the Ant to prevent that.
My sense is that the whole ${ask} mechanism is only appropriate for very simple things. For anything else, you'd have to do a more elaborate addon/extension to Oxygen's UI.
Thanks,
David
My sense is that the whole ${ask} mechanism is only appropriate for very simple things. For anything else, you'd have to do a more elaborate addon/extension to Oxygen's UI.
Thanks,
David
-
- Posts: 417
- Joined: Mon May 09, 2016 9:37 am
Re: Display value of a parameter in an ${ask} message
Post by sorin_carbunaru »
Well, the $ask mechanism is actually quite powerful, as I've seen it used in very interesting ways. Unfortunately in this use-case it is not capable of expanding the name of a transformation scenario parameter to the parameter's value. I added EXM-43954 for this, and we will update this thread when the improvement will be available.
Have a relaxing weekend!
Have a relaxing weekend!
-
- Posts: 163
- Joined: Sat Aug 28, 2010 1:23 am
Re: Display value of a parameter in an ${ask} message
Cool, thanks! The other things I can think of related to $ask (and may have already talked about in other threads) are:
Regarding the expansion of params in $ask message values, I'm only imagining that being used when the other parameter is set statically in the transformation scenario. I feel like having $asks create a dynamic modal where one part depends on what was selected in another field really would be beyond what we should expect from a mechanism like this.
Regards,
David
- Enhance the file chooser to allow for the selection of directories instead of only files
- Control whether the resulting value of the file chooser starts with 'file:' or not
- Combine all $asks into a single dialog
- Control the order of $asks
Regarding the expansion of params in $ask message values, I'm only imagining that being used when the other parameter is set statically in the transformation scenario. I feel like having $asks create a dynamic modal where one part depends on what was selected in another field really would be beyond what we should expect from a mechanism like this.
Regards,
David
-
- Posts: 417
- Joined: Mon May 09, 2016 9:37 am
Re: Display value of a parameter in an ${ask} message
Post by sorin_carbunaru »
Hi David,
I added all of your feedback to corresponding issues. We'll update this thread when we have any updates.
Best wishes,
Sorin C.
I added all of your feedback to corresponding issues. We'll update this thread when we have any updates.
Best wishes,
Sorin C.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Display value of a parameter in an ${ask} message
Hi David,
Maybe an alternative would be to create an ANT build file which runs the XSLT transformation because from ANT build files you can call Java Swing code using Javascript:
post47208.html
Regards,
Radu
Maybe an alternative would be to create an ANT build file which runs the XSLT transformation because from ANT build files you can call Java Swing code using Javascript:
post47208.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
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