Class ResponseTransformer

java.lang.Object
com.smartgwt.client.data.ResponseTransformer

public abstract class ResponseTransformer extends Object
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.
See Also:
  • Constructor Details

    • ResponseTransformer

      public ResponseTransformer()
  • Method Details

    • transformResponse

      protected abstract void transformResponse(DSResponse response, DSRequest request, Object data)
      Parameters:
      response - the response
      request - the request
      data - 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 the JSOHelper and XMLTools utility classes can be used to work with these raw objects.
    • defaultTransformResponse

      public void defaultTransformResponse(DSResponse response, DSRequest request, Object data)