Page 1 of 1

multi-select combobox for ${ask(...)}

Posted: Thu Nov 12, 2020 12:40 pm
by Krille
Hi,

is there a plan for adding a multi-select dialog (a combobox or check boxes) to the

Code: Select all

${ask(...)}
editor variable?

If not, could you please point me to the Java-Class of the ask-Editor-Variable, so that I can write subclass of it? And where would I have to register such a Java-Class to make

Code: Select all

${myask(...)}
available besides the other editor variables?

Regards,
Christian

PS: I've seen topic10663.html.

Re: multi-select combobox for ${ask(...)}

Posted: Fri Nov 13, 2020 2:47 pm
by alex_jitianu
Hello,

This feature didn't make it in the next release which will arrive in a couple of weeks. I can't offer any promises that it will make it in the next either because we always have to juggle with so many features, but I've added your vote for it an increase its priority.

The $ask implementation is not part of the API so you can't use it as a starting point. You need to create an Oxygen plugin that uses the Workspace Access Plugin Extension. It it you will implement an ro.sync.exml.workspace.api.util.EditorVariablesResolver. You install such a resolver ro.sync.exml.workspace.api.standalone.StandalonePluginWorkspace.getUtilAccess().addCustomEditorVariablesResolver()

There is one implemented inside our Git Client plugin, if you want a bit of inspiration.

Best regards,
Alex

Re: multi-select combobox for ${ask(...)}

Posted: Fri Nov 13, 2020 5:23 pm
by Krille
Hi Alex,

thank you for up-voting this!

I can think of two principal usage-APIs for such a multi-select dialogue:

A) It returns a sequence of strings. Usage would be like this:

Code: Select all

${ask('message', multiselect_combobox, ('real_value1':'rendered_value1';...;'real_valueN':'rendered_valueN'), 'default')}
B) It returns a single string. In this case, the user should be able to define a separator for joining the multiple selected items:

Code: Select all

${ask('message', multiselect_combobox, ('real_value1':'rendered_value1';...;'real_valueN':'rendered_valueN'), 'separator', 'default')}
I would be in favour of B.

Thanks for pointing me to the right classes!

Regards,
Christian

Re: multi-select combobox for ${ask(...)}

Posted: Fri Dec 18, 2020 2:35 am
by Krille
Hi again,

I ended up using a CSS form based on oxy_popup() with contents provided by a schematron test. That fits my needs perfectly.

Regards,
Christian

Re: multi-select combobox for ${ask(...)}

Posted: Mon Dec 21, 2020 4:19 pm
by chrispitude
Hi Christian,

All of what you're doing here is new to me, but it sounds quite interesting! Could you share more of what you've done?