Hi there,
we are in the process of upgrading SmartGwt from version 2.5 to version 3.1 and our DataSources use the following design
The problem we are facing is the fact that add operation initiated with version 2.5 creates PUT request with request data specified bellow
while with version 3.1 the following request data is sent to the server
Our question would be: is there an easy way to acheive the same xml request data format between versions 2.5 and 3.1?
Thanks,
Denis
we are in the process of upgrading SmartGwt from version 2.5 to version 3.1 and our DataSources use the following design
Code:
public class ExampleDS extends RestDataSource { public ExampleDS() { DataSourceIntegerField idField = new DataSourceIntegerField("id"); idField.setPrimaryKey(true); DataSourceTextField dataField = new DataSourceTextField("some_data"); OperationBinding add = new OperationBinding(); add.setOperationType(DSOperationType.ADD); add.setDataProtocol(DSProtocol.POSTXML); DSRequest addRequest = new DSRequest(); addRequest.setHttpMethod("PUT"); add.setRequestProperties(addRequest); setOperationBindings(add); setDataFormat(DSDataFormat.XML); String url="example" setAddDataURL(url); setTagName("example"); } }
Code:
<request> <data> <example> <some_data>Some data</some_data> </example> </data> <dataSource>ExampleDataSource_10</dataSource> <operationType>add</operationType> <componentId>isc_ListGrid_11</componentId> <oldValues></oldValues> </request>
Code:
<request> <data> <some_data>Some data</some_data> </data> <dataSource>ExampleDataSource_10</dataSource> <operationType>add</operationType> <componentId>isc_ListGrid_11</componentId> <oldValues></oldValues> </request>
Thanks,
Denis