1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    10
    Vote Rating
    0
    twister0k is on a distinguished road

      0  

    Default How to update store form extjs2 to extjs4

    How to update store form extjs2 to extjs4


    I tryed migrate to extjs4, but 'migration pack' return massege '[BREAKING][4.0][Ext.data.Store]: A store was specified with no model, url, or fields configured. Please see the header docs for Ext.data.Store for details on properly setting up your data components. This is a breaking change that cannot be resolved in the compatibility layer! '
    My store looks like
    Code:
    Ext.namespace('App.data');
    
    Ext.define('App.data.Store', {
        extend: 'Ext.data.Store',
        constructor: function(config) {
            this.addEvents(
                'beforeupdate'
            );
            
            this.callParent(this, config);
            this.app_modFlag = false;
            this.app_Updates = null;
            
            this.on('load', function(store) {store.app_modFlag = false});
            this.on('update', function(store) {store.app_modFlag = true});
            this.on('add', function(store) {store.app_modFlag = true});
            this.on('clear', function(store) {store.app_modFlag = true});
            this.on('remove', function(store) {store.app_modFlag = true});
        },
        remoteSort: true,
        
        /**
            If true, object will automatically choose sort or local sort methods
                depending of number of data pages
        */
        autoChooseSortType: true,
        
        /* Overriden methods */
        
        load: function(options) {
            options = options || {};
            
            if (options.params && options.params.gridState && !isNaN(options.params.gridState.pageNo * options.params.gridState.pageSize)) {
                options.params.start = options.params.gridState.pageNo * options.params.gridState.pageSize;
                options.params.limit = options.params.gridState.pageSize;
            }
            if (options.params && options.params.gridState && options.params.gridState.sortField) {
                options.params.sort = options.params.gridState.sortField;
                options.params.dir = options.params.gridState.descendingOrder ? 'DESC' : 'ASC';
            }
            
            return App.data.Store.superclass.load.call(this, options);
        },
    
    
        loadRecords: function(o, options, success) {
            if (this.autoChooseSortType && this.reader && !isNaN(this.reader.pageNumber) && this.reader.pageNumber > 0) {
                this.remoteSort = this.reader.pageNumber > 1;
            }
            App.data.Store.superclass.loadRecords.call(this, o, options, success);
        },
        
        /**
            Returns number of pages current server storage
            Requires using of PagedListReader class as reader
        */
        getPageNumber: function() {
            return this.reader && !isNaN(this.reader.pageNumber) ? this.reader.pageNumber : Number.NaN;
        },..........
          .....................................................................................................................................................
    Code:
    Ext.define('AppRecord', {        extend: 'Ext.data.Model',
            fields: [
                {name: 'appId'},
                {name: 'name', sortType: Ext.data.SortTypes.asUCString},
                {name: 'clientName', sortType: Ext.data.SortTypes.asUCString},
                {name: 'creationTime', type: 'date'},
                {name: 'stage', type: 'int'},
                {name: 'type'}
            ]
        });
    
    
        var store = new App.data.Store({
            proxy: new App.data.DwrProxy({
                invoker: function(params, arg, cb) {
                    if (params.searchParams != null) {
                        AppManager.search(params.searchParams, params.gridState, cb);
                    } else if (params.removeId != null) {
                        AppManager.removeApp(params.removeId, params.gridState, cb);
                    } else {
                        AppManager.getAppList(params.gridState, null, cb);
                    }
                }
            }),
            
            reader: new App.data.PagedListReader({
                id: 'appId'
            }, AppRecord),
            sorters: App.util.makeSortInfo(App.appManager.gridState)
        });
    Any idea?

  2. #2
    Sencha User
    Join Date
    Apr 2013
    Posts
    10
    Vote Rating
    0
    twister0k is on a distinguished road

      0  

    Default


    I forgot to assign my model to my store:
    Code:
    var store = new App.data.Store({    model: "AppRecord",//you need this added
        proxy: new App.data.DwrProxy({
            invoker: function(params, arg, cb) {
                if (params.searchParams != null) {
                    AppManager.search(params.searchParams, params.gridState, cb);
                } else if (params.removeId != null) {
                    AppManager.removeApp(params.removeId, params.gridState, cb);
                } else {
                    AppManager.getAppList(params.gridState, null, cb);
                }
            }
        }),
    
    
        reader: new App.data.PagedListReader({
            id: 'appId'
        }, AppRecord),
        sorters: App.util.makeSortInfo(App.appManager.gridState)
    
    });


Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi