1. #1
    Ext JS Premium Member Artistan's Avatar
    Join Date
    Apr 2007
    Location
    MN
    Posts
    144
    Vote Rating
    0
    Artistan is on a distinguished road

      0  

    Default Store with Data Model

    Store with Data Model


    So I created a Data Model with a REST Proxy and JSON Reader.
    Very cool.

    Now trying to create a store with that model, does not work.
    What I want is something like this....
    Code:
    Ext.define('User', {     extend: 'Ext.data.Model',     fields: ['id', 'name', 'age', 'gender'],     proxy: {         type: 'rest',         url : 'data/users',         reader: {             type: 'json',             root: 'users'         }     } });  // Uses the User Model's Proxy Ext.create('Ext.data.Store', {     model: 'User' });
    The only option I have found is creating a "Store" but that defaults to having an AJAX proxy.
    Would it be possible to link the Model to the store rather than the Proxy.
    It would be awesome to link so that the model could be used on multiple stores.

    Are there plans to do something like this?

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,883
    Vote Rating
    101
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Yes, Stores are now linkable to Models.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar