Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gwtext.client.data
Class JsonStore

    java.lang.Object
      com.gwtext.client.core.JsObject
          com.gwtext.client.data.Store
              com.gwtext.client.data.JsonStore

    public class JsonStore

extends Store

Small helper class to make creating Stores for JSON data easier.

      JsonStore store = new JsonStore("get-images.php", "images",new RecordDef(new FieldDef[]{
              new StringFieldDef("name"),
              new StringFieldDef("url"),
              new FloatFieldDef("size"),
              new DateFieldDef("lastmod")}));

This would consume a returned object of the form:

     {
       images: [
           {name: <em>'Image one'</em>, url:<em>'/GetImage.php?id=1'</em>, size:46.5, lastmod: <b>new</b> Date(2007, 10, 29)},
           {name: <em>'Image Two'</em>, url:<em>'/GetImage.php?id=2'</em>, size:43.2, lastmod: <b>new</b> Date(2007, 10, 30)}
       ]
     }

Field Summary

Fields inherited from class com.gwtext.client.data.Store
`configJS`

Fields inherited from class com.gwtext.client.core.JsObject
`jsObj`

Constructor Summary
`JsonStore(java.lang.String url, java.lang.String root, RecordDef recordDef)` Create a new JsonStore.
`JsonStore(java.lang.String url, java.lang.String root, java.lang.String[] fields)` Create a new JsonStore.

Method Summary

Methods inherited from class com.gwtext.client.data.Store
`add, add, addSorted, addStoreListener, clearFilter, clearFilter, commitChanges, each, filter, filter, filter, filterBy, getAt, getBaseParams, getById, getCount, getJsObj, getModifiedRecords, getRange, getRecordAt, getRecords, getSortState, getTotalCount, indexOf, indexOfId, insert, insert, load, load, load, load, loadJsonData, loadXmlData, loadXmlDataFromUrl, query, query, query, queryBy, rejectChanges, reload, reload, reload, remove, removeAll, setAutoLoad, setBaseParams, setDataProxy, setDefaultSort, setDefaultSort, setInitialSortState, setPruneModifiedRecords, setReader, setRecordDef, setRemoteSort, setSortInfo, setStoreId, setUrl, sort, sort, sort, sum, sum`

Methods inherited from class com.gwtext.client.core.JsObject
`getProperties, isCreated, setJsObj`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JsonStore

    public JsonStore(java.lang.String url,
                     java.lang.String root,
                     java.lang.String[] fields)

  Create a new JsonStore.

  Parameters:
    `url` - the URL that returns the Json data
    `root` - name of the property which contains the Array of row objects
    `fields` - the name of the fields

### JsonStore

    public JsonStore(java.lang.String url,
                     java.lang.String root,
                     RecordDef recordDef)

  Create a new JsonStore.

  Parameters:
    `url` - the URL that returns the Json data
    `root` - name of the property which contains the Array of row objects
    `recordDef` - the record def

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD