com.extjs.gxt.ui.client.data
Class JsonPagingLoadResultReader<D>

java.lang.Object
  extended by com.extjs.gxt.ui.client.data.JsonReader<D>
      extended by com.extjs.gxt.ui.client.data.JsonLoadResultReader<D>
          extended by com.extjs.gxt.ui.client.data.JsonPagingLoadResultReader<D>
Type Parameters:
D - the ListLoadResult type being returned by the reader
All Implemented Interfaces:
DataReader<D>

public class JsonPagingLoadResultReader<D>
extends JsonLoadResultReader<D>

A JsonReader implementation that reads JSON data using a ModelType definition and returns a paging list load result.


Constructor Summary
JsonPagingLoadResultReader(ModelType modelType)
          Creates a new reader.
 
Method Summary
protected  java.lang.Object createReturnData(java.lang.Object loadConfig, java.util.List<ModelData> records, int totalCount)
          Responsible for the object being returned by the reader.
protected  BasePagingLoadResult<ModelData> newLoadResult(java.lang.Object loadConfig, java.util.List<ModelData> models)
          Template method that provides load result.
 
Methods inherited from class com.extjs.gxt.ui.client.data.JsonReader
getTotalCount, newModelInstance, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonPagingLoadResultReader

public JsonPagingLoadResultReader(ModelType modelType)
Creates a new reader.

Parameters:
modelType - the model type definition
Method Detail

createReturnData

protected java.lang.Object createReturnData(java.lang.Object loadConfig,
                                            java.util.List<ModelData> records,
                                            int totalCount)
Description copied from class: JsonLoadResultReader
Responsible for the object being returned by the reader.

Overrides:
createReturnData in class JsonLoadResultReader<D>
Parameters:
loadConfig - the load config
records - the list of models
totalCount - the total count
Returns:
the data to be returned by the reader

newLoadResult

protected BasePagingLoadResult<ModelData> newLoadResult(java.lang.Object loadConfig,
                                                        java.util.List<ModelData> models)
Description copied from class: JsonLoadResultReader
Template method that provides load result.

Overrides:
newLoadResult in class JsonLoadResultReader<D>
models - the models
Returns:
the load result