|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.extjs.gxt.ui.client.data.XmlReader<D>
D - the type of data being returned by the readerpublic class XmlReader<D>
A DataReader implementation that reads XML data using a
ModelType definition and produces a set of
ModelData instances.
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)
| Constructor Summary | |
|---|---|
XmlReader(ModelType modelType)
Creates a new xml reader instance. |
|
| 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 com.google.gwt.core.client.JavaScriptObject |
getJsObject(com.google.gwt.xml.client.Element elem)
|
protected java.lang.String |
getValue(com.google.gwt.xml.client.Element elem,
java.lang.String name)
|
protected ModelData |
newModelInstance()
Returns the new model instances. |
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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlReader(ModelType modelType)
modelType - the model type| Method Detail |
|---|
public D read(java.lang.Object loadConfig,
java.lang.Object data)
DataReader
read in interface DataReader<D>data - the data to read
protected java.lang.Object createReturnData(java.lang.Object loadConfig,
java.util.List<ModelData> records,
int totalCount)
loadConfig - the load configrecords - the list of modelstotalCount - the total count
protected com.google.gwt.core.client.JavaScriptObject getJsObject(com.google.gwt.xml.client.Element elem)
protected java.lang.String getValue(com.google.gwt.xml.client.Element elem,
java.lang.String name)
protected ModelData newModelInstance()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||