开发者

How do I specify custom JSON data for an ExtJS store?

Say I have a JSON url that returns:

Results
    Users
        Samus Aran
        Ridley
    WorkOrders
        LABOR
            0
                .....
            1
                .....
        MATERIALS
            0
                .....
            1
                .....

Now, I have sever开发者_运维知识库al grid panels. One is LABOR and one is MATERIALS. Obviously, I don't want to have to make another IO call so how can I create a store and point it to the existing JSON data that I already have? Notice that it's a few layers deep.

Thanks.


I'm been thinking about this as a way to optimize the data loading in my applications. I never tried it but you might use the loadData method in the Store, but obviously this means that you need to load the data yourself. Maybe use a master store with url and then details store with loadData.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜