1. #1
    Sencha User
    Join Date
    Mar 2010
    Location
    FRANCE - Lyon
    Posts
    4
    Vote Rating
    0
    newmind@free.fr is on a distinguished road

      0  

    Exclamation Unanswered: Multiple Ext.data.Store extended class but juste one model?

    Unanswered: Multiple Ext.data.Store extended class but juste one model?


    Hello,
    I create a class that extends ext.data.store. I create two other classes that extend the first. Oddly the two derived classes share thesame model :

    Class 1 (Mother) :

    Code:
    Ext.define('Appli.store.GridFilter',{
        extend:'Ext.data.Store',
        proxy : {
                actionMethods :{
                    read:'post'
                },
                type:'rest',
                reader : {
                    type: 'json',
                    root: 'rows'
                }
             },
    
    
        
         constructor: function(config) {
    
    
            this.callParent([config])
            return this;
         }
        
    });
    Class 2 :
    Code:
    Ext.define('Di.store.logExec.GridFilter',{
        extend:'Appli.store.GridFilter',
        model: 'Di.model.logExec.GridFilter',
        constructor:function(config){
            this.proxy.url = '/di/LogExecFindGrid/read/';
            this.callParent(arguments);
            return this;
        }
        
    });
    Class 3 :

    Code:
    Ext.define('Di.store.tache.GridFilter',{
        extend:'Appli.store.GridFilter',
        model:'Di.model.tache.GridFilter',
        constructor:function(config){
            this.proxy.url ='/di/TacheFindGrid/read/';
            this.callParent(arguments);
             return this;
        }
    });
    If I use the config property, then it works :

    Class 1 (Mother) :

    Code:
    Ext.define('Appli.store.GridFilter',{
        extend:'Ext.data.Store',
        config:{
            proxy:{
                actionMethods :{
                read:'post'
                },
            type:'rest',
            reader: {
                    type: 'json',
                    root: 'rows'
                }
            }
        },
         constructor: function(config) {
             this.initConfig(config);
            this.callParent([config])
             return this;
         }
        
    });
    class 2 :

    Code:
    Ext.define('Di.store.logExec.GridFilter',{
        extend:'Appli.store.GridFilter',
        config:{
            model:'Di.model.logExec.GridFilter',
            proxy:{
                url :'/di/LogExecFindGrid/read/'
            }
        }
    });
    Class 3 :

    Code:
    Ext.define('Di.store.tache.GridFilter',{
        extend:'Appli.store.GridFilter',
        config:{
            model:'Di.model.tache.GridFilter',
            proxy:{
                url :'/di/TacheFindGrid/read/'
            }
        }
        
    
    
    });
    Can you help me?

  2. #2
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,338
    Answers
    498
    Vote Rating
    248
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      0  

    Default


    What makes you think that they share the same model?

Thread Participants: 1

Tags for this Thread

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