How to get data from extjs 4 store

前端 未结 2 1880
旧时难觅i
旧时难觅i 2021-01-06 06:53

Im stack with ext js 4 at the very beginning. Im trying to get the current user data when starting the application using store. But Im not getting any data from the store, e

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-06 07:18

    All the sencha examples have the proxies in the store, but you should actually put the proxy in the model, so that you can use the model.load method. the store inherits the model's proxy, and it all works as expected.

    it looks like model.load hardcodes the id though (instead of using idProperty), and it always has to be an int, as far as I can tell.

    good luck!

提交回复
热议问题