Combobox from XSLT (author mode XSLTOperation)

<oXygen/> general issues.
hlapin
Posts: 18

Combobox from XSLT (author mode XSLTOperation)

Fri Jan 01, 2016 9:38 pm

Does anyone have experience invoking a jOptionPane combobox from XSLT in an XSLTOperation in author mode??
[Context, this is for a global (i.e., context-element wide) operation that changes a dummy value for all instances of an attribute in child nodes to a valid one.]

I can get something like the following to work:
[Codebox=]<xsl:variable name="testStr" select="jop:showInputDialog(null,
'Edit the following string: ',
'string')"/>[/Codebox]

However I would like, if possible, to have a user select from a list of possible valid values. I have looked at the specs for the java swing object, but I can't seem to get the parameters right (and I have almost no Java). Any advice would be appreciated!

Also, as long as I am asking but less essential, are there any ways to specify linebreaks in the message or the size of the dialog box?

Many thanks, and a happy new year to all.

Hayim Lapin
alex_jitianu
Posts: 652

Re: Combobox from XSLT (author mode XSLTOperation)

Mon Jan 04, 2016 3:38 pm

Dear Hayim,

New lines can be added in the message by using character entities: &#xA; Here's an example on how to use this entity and how to specify a list of possible values:

Code: Select all

<xsl:value-of select="jop:showInputDialog(
                null,
                'Message on&#xA; two lines',
                'The title',
                3,
                null,
                ('apple','orange'),
                'orange')"/>



Beste regards,
Alex
hlapin
Posts: 18

Re: Combobox from XSLT (author mode XSLTOperation)

Mon Jan 04, 2016 4:13 pm

Brilliant, thanks!

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 3 guests