| com.gwtext.client.data.Store com.gwtext.client.data.JsonStore
JsonStore | public class JsonStore extends Store (Code) | | 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)}
]
}
|
Method Summary | |
native JavaScriptObject | create(JavaScriptObject config) |
JsonStore | public JsonStore(String url, String root, String[] fields)(Code) | | Create a new JsonStore.
Parameters: url - the URL that returns the Json data Parameters: root - name of the property which contains the Array of row objects Parameters: fields - the name of the fields |
JsonStore | public JsonStore(String url, String root, RecordDef recordDef)(Code) | | Create a new JsonStore.
Parameters: url - the URL that returns the Json data Parameters: root - name of the property which contains the Array of row objects Parameters: recordDef - the record def |
create | native JavaScriptObject create(JavaScriptObject config)(Code) | | |
Fields inherited from com.gwtext.client.data.Store | protected JavaScriptObject configJS(Code)(Java Doc)
|
Methods inherited from com.gwtext.client.data.Store | native public void add(Record record)(Code)(Java Doc) public void add(Record[] records)(Code)(Java Doc) native public void addSorted(Record record)(Code)(Java Doc) native public void addStoreListener(StoreListener listener)(Code)(Java Doc) native public void clearFilter()(Code)(Java Doc) native public void clearFilter(boolean suppressEvent)(Code)(Java Doc) native public void commitChanges()(Code)(Java Doc) native JavaScriptObject create(JavaScriptObject config)(Code)(Java Doc) native public void each(StoreTraversalCallback cb)(Code)(Java Doc) native public void filter(String field, RegExp regexp)(Code)(Java Doc) native public void filter(String field, String value)(Code)(Java Doc) native public void filter(String field, String value, boolean anyMatch)(Code)(Java Doc) native public void filterBy(StoreTraversalCallback cb)(Code)(Java Doc) native public Record getAt(int index)(Code)(Java Doc) public UrlParam[] getBaseParams()(Code)(Java Doc) native public Record getById(String id)(Code)(Java Doc) native public int getCount()(Code)(Java Doc) public JavaScriptObject getJsObj()(Code)(Java Doc) public Record[] getModifiedRecords()(Code)(Java Doc) public Record[] getRange(int startIndex, int endIndex)(Code)(Java Doc) public Record getRecordAt(int index)(Code)(Java Doc) public Record[] getRecords()(Code)(Java Doc) public SortState getSortState()(Code)(Java Doc) native public int getTotalCount()(Code)(Java Doc) native public int indexOf(Record record)(Code)(Java Doc) native public int indexOfId(String id)(Code)(Java Doc) native public void insert(int index, Record record)(Code)(Java Doc) public void insert(int index, Record[] records)(Code)(Java Doc) native public void load()(Code)(Java Doc) native public void load(int start, int limit)(Code)(Java Doc) public void load(UrlParam[] params)(Code)(Java Doc) public void load(UrlParam[] params, boolean add)(Code)(Java Doc) native public void loadJsonData(String jsonString, boolean append)(Code)(Java Doc) native public void loadXmlData(String xmlString, boolean append)(Code)(Java Doc) native public void loadXmlDataFromUrl(String url, boolean append)(Code)(Java Doc) public Record[] query(String field, String value)(Code)(Java Doc) public Record[] query(String field, String value, boolean anyMatch)(Code)(Java Doc) public Record[] query(String field, RegExp regexp)(Code)(Java Doc) public Record[] queryBy(StoreQueryFunction queryFunction)(Code)(Java Doc) native public void rejectChanges()(Code)(Java Doc) native public void reload()(Code)(Java Doc) public void reload(UrlParam[] params)(Code)(Java Doc) public void reload(UrlParam[] params, boolean add)(Code)(Java Doc) native public void remove(Record record)(Code)(Java Doc) native public void removeAll()(Code)(Java Doc) public void setAutoLoad(boolean autoLoad)(Code)(Java Doc) public void setBaseParams(UrlParam[] baseParams)(Code)(Java Doc) public void setDataProxy(DataProxy proxy)(Code)(Java Doc) public void setDefaultSort(String field, SortDir sortDir)(Code)(Java Doc) native public void setDefaultSort(String field, String sortDir)(Code)(Java Doc) public void setInitialSortState(SortState initialSortState)(Code)(Java Doc) public void setPruneModifiedRecords(boolean pruneModifiedRecords)(Code)(Java Doc) public void setReader(Reader reader)(Code)(Java Doc) public void setRecordDef(RecordDef recordDef)(Code)(Java Doc) public void setRemoteSort(boolean remoteSort)(Code)(Java Doc) public void setSortInfo(SortState sortInfo)(Code)(Java Doc) public void setStoreId(String storeId)(Code)(Java Doc) public void setUrl(String url)(Code)(Java Doc) native public void sort(String field)(Code)(Java Doc) public void sort(String field, SortDir direction)(Code)(Java Doc) native public void sort(String field, String direction)(Code)(Java Doc) native public float sum(String field)(Code)(Java Doc) native public float sum(String field, int startIndex, int endIndex)(Code)(Java Doc)
|
|
|