View Full Version : load a store manually (this.getds_AWK01PStore is not a function)

3 Dec 2011, 5:42 AM
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:

Ext.define('APP02.store.ds_AWK01P', {
extend: 'Ext.data.Store',

model: 'APP02.model.Model_AWK01P',
autoLoad: true,

proxy: {
type: 'ajax',
//url: '',
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(store, operation, options){
console.log( 'manual load ' + operation.params );
console.log( operation.params );
console.log( 'proxy defined params ' + store.proxy.extraParams );
console.log( store.proxy.extraParams )

reader: {
type: 'xml',
root: 'sqllistlist',
record: 'sqllist'


i have defined the store in the controller

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'],


// Button Refresh Window Userlist AWK Demo
'aAWKDEMO button[action=LOD]':{
click: this.load_User_list_data

// Function Reresh auf Button AWK Userliste
load_User_list_data: function(button) {
var asearch= Ext.getCmp('TX_asearch').getValue();
console.log('button refresh click asearch=' + asearch );
var store = this.getds_AWK01PStore();


the function load_User_list_data

diplays the Errormessage
this.getds_AWK01PStore is not a function

How can i load the store ?


3 Dec 2011, 6:01 PM
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:
load_User_list_data: function(button) {
var store = button.up('gridpanel').store;

load_User_list_data: function(button) {