Class RequestTransformer

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

public abstract class RequestTransformer extends Object
The RequestTransformer provides the equivalent functionality of overriding DataSource.transformRequest(DSRequest) when instantiating a DataSource on the client. However when obtaining a DataSource instance from the server using DataSource.getDataSource(java.lang.String), transformRequest(DSRequest) and #transformResponse(DSResponse, DSRequest, Object) cannot be overridden and so the requestTransformer parameter can be passed to DataSource.getDataSource(java.lang.String) instead.
See Also:
  • Constructor Details

    • RequestTransformer

      public RequestTransformer()
  • Method Details

    • transformRequest

      protected abstract Object transformRequest(DSRequest dsRequest)
      Parameters:
      dsRequest - the DSRequest being processed
      Returns:
      data to be sent to the dataURL (JavaScriptObject, String or Record)
    • getDefaultTransformRequest

      public Object getDefaultTransformRequest(DSRequest dsRequest)
      Return the result of the default transformed request.
      Parameters:
      dsRequest - the request
      Returns:
      the default transformed request