Open msn444 opened 5 years ago
Hi @msn444, Can you provide more info about the case? I tested it on my side while using the nativescript-ui-samples-vue and nativescript-ui-samples, however, the DataForm content seems to be rendered correctly on my side in both scenarios(When it is defined via XML/HTML and via JSON).
The content rendering isn't the problem. The problem is that the convertTo and convertFrom methods in the custom PropertyConverter class (MovieConverter defined in data.ts in the example) do not get called if the converter is specified in the JSON metadata rather than markup. The demo app does nothing with the selected data so it doesn't manifest as a problem in the demo; you have to log the convertTo/convertFrom methods to see that they're not working, or look at the source object (ticket) and see that it doesn't get updated.
Hi @msn444,
Excuse me for the delay in reply.
I rechecked the case and currently convertTo
and convertFrom
methods are not supported, when we are loading the metadata and the source of RadDataForm via JSONs. On that matter, can you provide more info about your use-case and what you are trying to achieve as a final result?
so any solution regarding that issue ?
When specifying a PropertyConverter via the "converter" property in a JSON metadata object, the convertTo and convertFrom methods are never called. It works fine when specified using markup.
This can be seen in the dataform example at https://github.com/NativeScript/nativescript-ui-samples-vue/tree/master/dataform -- the "Editors using markup" module behaves as expected, while the "Editors" module (which specifies the converter via metadata) does not.