com.extjs.gxt.ui.client.data
Class XmlReader<D>
java.lang.Object
com.extjs.gxt.ui.client.data.XmlReader<D>
- Type Parameters:
D - the type of data being returned by the reader
- All Implemented Interfaces:
- DataReader<D>
- Direct Known Subclasses:
- XmlLoadResultReader
public class XmlReader<D>
- extends java.lang.Object
- implements DataReader<D>
A DataReader implementation that reads XML data using a
ModelType definition and produces a set of
ModelData instances.
Subclasses can override createReturnData(Object, List, int) to
control what object is returned by the reader. Subclass may override
newModelInstance() to return any model data subclass.
// defines the xml structure
ModelType type = new ModelType();
type.setRecordName("record"); // The repeated element which contains row information
type.setRoot("records"); // the optional root element that contains the total attribute (optional)
type.setTotalName("total"); // The element which contains the total dataset size (optional)
|
Method Summary |
D |
read(java.lang.Object loadConfig,
java.lang.Object data)
Reads the raw data and returns the typed data. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlReader
public XmlReader(ModelType modelType)
- Creates a new xml reader instance.
- Parameters:
modelType - the model type
read
public D read(java.lang.Object loadConfig,
java.lang.Object data)
- Description copied from interface:
DataReader
- Reads the raw data and returns the typed data.
- Specified by:
read in interface DataReader<D>
data - the data to read
- Returns:
- the data