Multiple fields in an author query dialog

Post here questions and problems related to oXygen frameworks/document types.
afuchs
Posts: 23
Joined: Mon May 19, 2014 11:38 am

Multiple fields in an author query dialog

Post by afuchs »

Hello,
While creating frameworks I often need to provide users with a way of adding an element with a number of children, such as:

Code: Select all

<fragment>
   <author>Aristoteles</author>
   <work>Nicomachean Ethics</work>
   <date>354 BC</date>
</fragment>
The texts ('Aristoteles', 'Nicomachean Ethics', '354 BC') are provided by the users through a series of dialogs that rely on separate instances of the generic ${ask()} (or other types of input).
If the user skips a dialog, or enters data in the wrong order etc., the whole process must be aborted and started anew. This is especially regrettable if there is a long series of text chunks.

Is there a way to configure a multiple field dialog, so that the user can view all the fields and the data they are about to feed into the XML before the insertion takes place?

Thank you in advance!
Radu
Posts: 9431
Joined: Fri Jul 09, 2004 5:18 pm

Re: Multiple fields in an author query dialog

Post by Radu »

Hi,

The $ask editor variable has limited functionality., we never intended it to become a way of creating more complex dialogs.
For more complex Author operations you can use for example Javascript to call our Java based APIs:
https://github.com/oxygenxml/javascript ... operations
You can also create dialogs using Java Swing and show them:
https://github.com/oxygenxml/javascript ... XMLFrag.js

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
afuchs
Posts: 23
Joined: Mon May 19, 2014 11:38 am

Re: Multiple fields in an author query dialog

Post by afuchs »

Thank you Radu!
Seems to be no way around JS at a certain point.
Post Reply