Package com.smartgwt.client.data
Class ResponseTransformer
java.lang.Object
com.smartgwt.client.data.ResponseTransformer
The ResponseTransformer provides the equivalent functionality of overriding
DataSource.transformResponse(DSResponse, DSRequest, Object) } when
instantiating a DataSource on the client. However when obtaining a DataSource instance from the server using DataSource.getDataSource(java.lang.String),
transformResponse(DSResponse, DSRequest, Object) cannot be overridden and so the responseTransformer parameter can be passed to
DataSource.getDataSource(java.lang.String) instead.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddefaultTransformResponse(DSResponse response, DSRequest request, Object data) protected abstract voidtransformResponse(DSResponse response, DSRequest request, Object data) See the docs forDataSource.transformResponse(DSResponse, DSRequest, Object)
-
Constructor Details
-
ResponseTransformer
public ResponseTransformer()
-
-
Method Details
-
transformResponse
See the docs forDataSource.transformResponse(DSResponse, DSRequest, Object)- Parameters:
response- the responserequest- the requestdata- the raw data parameter. The type of this object depends on the specified dataFormat. if the dataFormat is custom, this will be a String. Otherwise this will be a JavaScript object. If the dataFormat is "json", the JavaScriptObject will be the raw JSON object(s) returned by the web service. If dataFormat is XML the JavaScriptObject will be the raw XML document object. Note that theJSOHelperandXMLToolsutility classes can be used to work with these raw objects.
-
defaultTransformResponse
-