oxy_popup for #text with default value

Post here questions and problems related to oXygen frameworks/document types.
Patrik
Posts: 216
Location: Hamburg/Germany

oxy_popup for #text with default value

Thu Jan 12, 2017 11:06 am

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: 599

Re: oxy_popup for #text with default value

Mon Jan 16, 2017 1:17 pm

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: 216
Location: Hamburg/Germany

Re: oxy_popup for #text with default value

Mon Jan 16, 2017 1:45 pm

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: 599

Re: oxy_popup for #text with default value

Mon Jan 16, 2017 4:40 pm

Hi Patrik,

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

Best regards,
Alex
sorin_carbunaru
Site Admin
Posts: 70

Re: oxy_popup for #text with default value

Thu Apr 06, 2017 3:14 pm

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

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 0 guests