Hi,
I have a simple smartclient-REST-server/DB application, in one of the database tables I need to add some custom columns (deployment-specific). I thought to introduce a single column with json content and configure project-specific columns put in this (I know the limitations, there is no need to do any SQL filtering on the content - even if, it would be possible, but this is off topic now). This way I was hoping to be able to map the json fields into separate FormItems on the GUI and display and edit them. I can also configure these fields on the GUI in deployment-specific way.
I thought I could solve it with any of the FormItem.setDataPath or DataSourceField.setValueXPath or DataSourceField.setFieldValueExtractor, but even when I'm following the example under e.g. http://www.java2s.com/Code/Java/GWT/...nsSmartGWT.htm the fields are not displayed.
With the FieldValueExtractor solution I even debugged into the data extraction procedure inside smartclient and the data was extracted correctly (the returned fields contained the expected extracted subfields), still the data was not bound with the same-name FormItem. I also added the column to a ListGrid and it also did not show the value either.
So data is coming in a field 'customfields' as e.g. customfields: "{"fromday":"2019-01-12","today":"2019-02-01"}", and is internally extracted into separate result fields "customfields_fromday" and "customfields_today"
And I added a TextItem / ListGridField with name "customfields_fromday" and expect it - at first in GET direction - to show the extracted value.
With the FieldValueExtractor solution I even returned a plain text "Example" and followed it up in the call sequence, but the form did not display anything.
Can anyone help me with this? Refactoring the complete application into something else is not an option.
Thank you
Zoltan
Using 64 bit Chrome 71.0.3578.80
Version v11.0p_2018-05-16 (2018-05-16)
I have a simple smartclient-REST-server/DB application, in one of the database tables I need to add some custom columns (deployment-specific). I thought to introduce a single column with json content and configure project-specific columns put in this (I know the limitations, there is no need to do any SQL filtering on the content - even if, it would be possible, but this is off topic now). This way I was hoping to be able to map the json fields into separate FormItems on the GUI and display and edit them. I can also configure these fields on the GUI in deployment-specific way.
I thought I could solve it with any of the FormItem.setDataPath or DataSourceField.setValueXPath or DataSourceField.setFieldValueExtractor, but even when I'm following the example under e.g. http://www.java2s.com/Code/Java/GWT/...nsSmartGWT.htm the fields are not displayed.
With the FieldValueExtractor solution I even debugged into the data extraction procedure inside smartclient and the data was extracted correctly (the returned fields contained the expected extracted subfields), still the data was not bound with the same-name FormItem. I also added the column to a ListGrid and it also did not show the value either.
So data is coming in a field 'customfields' as e.g. customfields: "{"fromday":"2019-01-12","today":"2019-02-01"}", and is internally extracted into separate result fields "customfields_fromday" and "customfields_today"
And I added a TextItem / ListGridField with name "customfields_fromday" and expect it - at first in GET direction - to show the extracted value.
With the FieldValueExtractor solution I even returned a plain text "Example" and followed it up in the call sequence, but the form did not display anything.
Can anyone help me with this? Refactoring the complete application into something else is not an option.
Thank you
Zoltan
Using 64 bit Chrome 71.0.3578.80
Version v11.0p_2018-05-16 (2018-05-16)
Comment