oxy_popup for #text with default value

Post here questions and problems related to oXygen frameworks/document types.
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

oxy_popup for #text with default value

Post by Patrik »

Hi,

I'm using oxy_popup to edit the text content of an enumeration element with a non-empty default value. Doing this for attributes works fine. But for the text content the popup will always display "[Empty]" for empty content. Even when specifying values and labels.

Is there any way to specify a value that should be displayed when there is no text content?

Thanks and Regards,
Patrik
alex_jitianu
Posts: 1017
Joined: Wed Nov 16, 2005 11:11 am

Re: oxy_popup for #text with default value

Post by alex_jitianu »

Hi Patrik,

The oxy_popup form control doesn't handle the empty values too well. I see that the renderer always presents [Empty], even when I try to associate a label to the empty value by using the values and labels parameters. I'll add an issue to fix it. Meanwhile, how about using an non editable combo box form control instead? From my tests it handles the empty value better:

Code: Select all

 oxy_combobox(
edit, '#text',
values, 'value1, value2, ',
labels, 'Value no1, Value no2, No value',
columns, 10,
editable, false
)
Best regards,
Alex
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: oxy_popup for #text with default value

Post by Patrik »

Hi Alex,

thanks for the hint. Indeed, the behavior of the combobox is perfect. It even handles default values for text content.
But the look is not that great in my use-case - so I'm still very interested in a solution for popup as well. Maybe you could give me the code for both, so I can fix it already locally as a custom editor?

Regards,
Patrik
alex_jitianu
Posts: 1017
Joined: Wed Nov 16, 2005 11:11 am

Re: oxy_popup for #text with default value

Post by alex_jitianu »

Hi Patrik,

Sure thing! I'll send you the source code on email.

Best regards,
Alex
sorin_carbunaru
Posts: 419
Joined: Mon May 09, 2016 9:37 am

Re: oxy_popup for #text with default value

Post by sorin_carbunaru »

Hello Patrik,

I just wanted to let you know that in the newly released oXygen 19.0 you can now assign a label for an empty value for oxy_popup().

Code: Select all


oxy_popup(
edit, '@a1',
values, 'value1, value2, ',
labels, 'Value no1, Value no2, No value',
columns, 10,
selectionMode, 'multiple'
)
Best wishes,
Sorin Carbunaru
oXygen XML
Post Reply