SmartGWTPro smartgwtpro 4.1 build 2014-07-18
for some reasons in
http://forums.smartclient.com/showthread.php?t=30838
we are using DataSource for our custom rest service. however, since the data format returned by our service is still same as the default case, that is :
we'd like to use implementation of transformResponse in RestDataSource :
in ISC_DataBinding
to fill in metadata fields in the DSResponse object.
so is there any way to just call this method instead of copying the code from RestDataSource ?
for some reasons in
http://forums.smartclient.com/showthread.php?t=30838
we are using DataSource for our custom rest service. however, since the data format returned by our service is still same as the default case, that is :
Code:
{
"response": {
"status": 0,
"startRow": 0,
"endRow": 76,
"totalRows": 546,
"data": [
{"field1": "value", "field2": "value"},
{"field1": "value", "field2": "value"},
... 76 total records ...
]
}
}in ISC_DataBinding
Code:
transformResponse : function (dsResponse, dsRequest, data) {
if (dsResponse.status < 0 || !data) {
// If any request failed, queueStatus must be -1
dsResponse.queueStatus = -1;
return dsResponse;
}
if (dsRequest.dataFormat == "json") {
if (isc.isAn.Array(data)) {
var useSingleEntry = data.length == 1 && data[0] &&
......
......so is there any way to just call this method instead of copying the code from RestDataSource ?