com.extjs.gxt.ui.client.data
Class JsonLoadResultReader<D>
java.lang.Object
com.extjs.gxt.ui.client.data.JsonReader<D>
com.extjs.gxt.ui.client.data.JsonLoadResultReader<D>
- Type Parameters:
D
- the ListLoadResult
type being returned by the reader
- All Implemented Interfaces:
- DataReader<D>
- Direct Known Subclasses:
- JsonPagingLoadResultReader
public class JsonLoadResultReader<D>
- extends JsonReader<D>
A JsonReader
implementation that reads JSON data using a
ModelType
definition and returns a list load result.
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 ListLoadResult<ModelData> |
newLoadResult(java.lang.Object loadConfig,
java.util.List<ModelData> models)
Template method that provides load result. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsonLoadResultReader
public JsonLoadResultReader(ModelType modelType)
- Creates a new reader.
- Parameters:
modelType
- the model type definition
createReturnData
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.
- Overrides:
createReturnData
in class JsonReader<D>
- Parameters:
loadConfig
- the load configrecords
- the list of modelstotalCount
- the total count
- Returns:
- the data to be returned by the reader
newLoadResult
protected ListLoadResult<ModelData> newLoadResult(java.lang.Object loadConfig,
java.util.List<ModelData> models)
- Template method that provides load result.
- Parameters:
models
- the models
- Returns:
- the load result