Page 1 of 1

oxy_popup for #text with default value

Posted: Thu Jan 12, 2017 11:06 am
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

Re: oxy_popup for #text with default value

Posted: Mon Jan 16, 2017 1:17 pm
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

Re: oxy_popup for #text with default value

Posted: Mon Jan 16, 2017 1:45 pm
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

Re: oxy_popup for #text with default value

Posted: Mon Jan 16, 2017 4:40 pm
by alex_jitianu
Hi Patrik,

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

Best regards,
Alex

Re: oxy_popup for #text with default value

Posted: Thu Apr 06, 2017 3:14 pm
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