1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    15
    Vote Rating
    0
    m400mail is on a distinguished road

      0  

    Default Unanswered: load a store manually (this.getds_AWK01PStore is not a function)

    Unanswered: load a store manually (this.getds_AWK01PStore is not a function)


    hello *all
    i have a store thats load the data automaticly. The grid shows the right data.
    Now i want to load the store manually.
    the store:
    PHP Code:
    Ext.define('APP02.store.ds_AWK01P', {
        
    extend'Ext.data.Store',
       
        
    model'APP02.model.Model_AWK01P',
        
    autoLoadtrue,
        
        
    proxy: {
            
    type'ajax',
            
    //url: 'http://10.200.5.201:89/AWK/AWK_PHP/Server_Data_of_AWK_DemoEXT.php',
            
    url'/AWK/AWK_PHP/Server_Data_of_AWK_DemoEXT.php',
            
    actionMethods: {
            
    create 'POST',
            
    read   'GET',
            
    update 'POST',
            
    destroy'POST'
        
    },
            
    extraParams: {assid:'test'asearch''aaction:'loaduserlist'},
           
           
    listeners: {
            
    beforeload: function(storeoperationoptions){
                    
    console.log'manual load ' operation.params );
                    
    console.logoperation.params );
                    
    console.log'proxy defined params ' store.proxy.extraParams );
                    
    console.logstore.proxy.extraParams )
                }
            },

          
    reader: {
                
    type'xml',
                
    root'sqllistlist',
                
    record'sqllist'
                
            
    }
        } 
    i have defined the store in the controller
    PHP Code:
    Ext.define('APP02.controller.App02_controller', {
        
    extend'Ext.app.Controller',

         
    views: ['user.a_login_window''user.App_Window01''user.aSample''user.aSample_panel_fix''user.aSample_Form_panel'],
        
         
    stores:['ds_AWK01P'],
    ....

    // Button Refresh Window Userlist AWK Demo
                
    'aAWKDEMO button[action=LOD]':{
                 
    clickthis.load_User_list_data
                
    },
    .....

    //********************************************
        //  Function Reresh auf Button AWK Userliste
        //**********************************************
         
    load_User_list_data: function(button) {
          var 
    asearchExt.getCmp('TX_asearch').getValue();
          
    console.log('button refresh click asearch=' asearch );
            var 
    store this.getds_AWK01PStore();
             
    store.load();
            
            }, 
    the function load_User_list_data

    diplays the Errormessage
    this.getds_AWK01PStore is not a function

    How can i load the store ?

    michael

  2. #2
    Sencha User
    Join Date
    Dec 2009
    Location
    Enschede, The Netherlands
    Posts
    327
    Answers
    16
    Vote Rating
    13
    flanders will become famous soon enough

      0  

    Default


    Is this a function you are defining somewhere else or just calling it and hoping for the best? Myself i don't use the views/stores options but the docs say to expect nothing else from it then an equivalent of Ext.requires...

    In your case you will only need to grab a reference to the grid, then it's store and then load() it.

    Best guess:
    [code]
    load_User_list_data: function(button) {
    var store = button.up('gridpanel').store;
    store.load();
    }

    load_User_list_data: function(button) {

Thread Participants: 1