Page 1 of 1
Format value in oxy_textfield
Posted: Mon Jun 29, 2020 3:48 pm
by Isabelle
Hello,
We work with the 22.0 version of Oxygen and I would like to know if it is possible to format value of an oxy_textfield.
I tried this :
Code: Select all
oxy_textfield(edit, "@oidate", values, oxy_xpath("concat(substring(@oidate, 7, 2), '-', substring(@oidate, 5, 2), '-',substring(@oidate, 1, 4))", evaluate, dynamic-once), columns, 10)
But it displays the value of the attribut and not the result of the oxy_xpath.
Is there any way to format this value ?
Thanks.
Regards,
Isabelle
Re: Format value in oxy_textfield
Posted: Tue Jun 30, 2020 1:10 pm
by Radu
Hi Isabelle,
As far as I know the oxy_textfield is what you see is what you get, you cannot see one thing but insert another in the document, so you always see the current attribute value.
That "values" property specifies the list of insertion proposals which appear when pressing Ctrl-Space in the text field:
https://www.oxygenxml.com/doc/versions/ ... ditor.html
Maybe you can try to display the processed attribute value as static content on a ":before" or ":after" selector. And use an oxy_button form control to call your own action in which the end user chooses another value.
Regards,
Radu
Re: Format value in oxy_textfield
Posted: Tue Jun 30, 2020 1:16 pm
by Isabelle
Hello Radu,
Thank you for your answer.
I understand, and I was curious about the
rendererClassName and
swingEditorClassName.
Found here
https://www.oxygenxml.com/doc/versions/ ... trols.html.
Can they solve my issue or not ?
Regards,
Isabelle
Re: Format value in oxy_textfield
Posted: Tue Jun 30, 2020 3:55 pm
by Radu
Hi Isabelle,
That specific feature would give you full control over the form control contents, you would create the Swing component which would get shown there.
I'm not sure if we've ever had somebody implement a custom form control but I think the extensions should work, if you want you can try this approach, see where it takes you and we can help with advice along the way.
Regards,
Radu