I want to implement a REST data source for client-side data integration.
I just study show case sample of REST http://www.smartclient.com/smartgwt/showcase/#featured_restfulds, but with some confusion.
when I click "Add new Country" button, the http message is as below:
<request> <data> <isc_RestfulDataSourceSample$1_0> <countryCode>US</countryCode> <countryName>Edited Value</countryName> <capital>Edited Value</capital> <continent>Edited Value</continent> </isc_RestfulDataSourceSample$1_0> </data> <dataSource>isc_RestfulDataSourceSample$1_0</dataSource> <operationType>update</operationType> <componentId>isc_ListGrid_0</componentId> <oldValues></oldValues> </request>
Three question here:
1. I want to add some extra control info into this xml, for example <feed>xxx</feed>, how?
2. the xml sent by smartgwt client include a special character "$"(isc_RestfulDataSourceSample$1_0), so the xml become a not well-formed xml, anyone has idea about this.
3. how to override transformRequest and transformResponse, anyone has such expirence can share some sample code?
Thanks very much!
I just study show case sample of REST http://www.smartclient.com/smartgwt/showcase/#featured_restfulds, but with some confusion.
when I click "Add new Country" button, the http message is as below:
<request> <data> <isc_RestfulDataSourceSample$1_0> <countryCode>US</countryCode> <countryName>Edited Value</countryName> <capital>Edited Value</capital> <continent>Edited Value</continent> </isc_RestfulDataSourceSample$1_0> </data> <dataSource>isc_RestfulDataSourceSample$1_0</dataSource> <operationType>update</operationType> <componentId>isc_ListGrid_0</componentId> <oldValues></oldValues> </request>
Three question here:
1. I want to add some extra control info into this xml, for example <feed>xxx</feed>, how?
2. the xml sent by smartgwt client include a special character "$"(isc_RestfulDataSourceSample$1_0), so the xml become a not well-formed xml, anyone has idea about this.
3. how to override transformRequest and transformResponse, anyone has such expirence can share some sample code?
Thanks very much!
Comment