Combobox from XSLT (author mode XSLTOperation)

Oxygen general issues.
hlapin
Posts: 19
Joined: Tue Jul 16, 2013 7:36 pm

Combobox from XSLT (author mode XSLTOperation)

Post by hlapin »

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: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: Combobox from XSLT (author mode XSLTOperation)

Post by alex_jitianu »

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: 19
Joined: Tue Jul 16, 2013 7:36 pm

Re: Combobox from XSLT (author mode XSLTOperation)

Post by hlapin »

Brilliant, thanks!
Post Reply