示例#1
0
  public static Store getStore() {
    if (store == null) {
      MemoryProxy proxy = new MemoryProxy(getData());

      RecordDef recordDef =
          new RecordDef(
              new FieldDef[] {
                new StringFieldDef("id"),
                new StringFieldDef("category"),
                new StringFieldDef("title"),
                new StringFieldDef("iconCls"),
                new StringFieldDef("thumbnail"),
                new StringFieldDef("qtip"),
                new ObjectFieldDef("screen")
              });

      ArrayReader reader = new ArrayReader(0, recordDef);
      store = new Store(proxy, reader);
      store.load();
    }
    return store;
  }