View Full Version : How to reload Store?

30 Nov 2011, 1:04 AM
I have a code like this

Ext.define('CQT.store.trading.PriceList', {
extend: 'Ext.data.Store',
fields: ['PriceList'],
proxy: {
url: '../TradingCQM/GetPriceList',
type: 'ajax',
actionMethods: 'POST',
extraParams: { cocode: '' }

The extraParams is empty (cocode), and when a user select a data from a combobox, it will get the value of that hidden field assigned with comboboxvalue to reload the store

var compcode = formPanel.down('[name=txtSelectedSymbol]').getValue();
store7.load({ params: { cocode : compcode } });

but using this code, the store is loaded twice, first is the selected compcode (selected value)
second is an empty string, which result in the store to be empty.

Why did this happen? How to load a store without to use default value?

30 Nov 2011, 2:32 AM
var compcode = formPanel.down('[name=txtSelectedSymbol]').getValue();
store7.load({ params: { cocode : compcode } }); // param cocode send one time

store7.proxy.extraParams.cocode = compcode; // param cocode send always

30 Nov 2011, 6:41 PM
I try code

store4.extraParams.cocode = val;

It is like this :
store7.extraParams is undefined

Btw do you dev guys really know about your code? Why you dont even know that it is not working, are you just playing guessing game to your customer?

Please explain me how to change the default value of parameter in a store, if you are unable to do that, better close down your company

30 Nov 2011, 7:20 PM
bump my thread up

30 Nov 2011, 11:07 PM
im fix errors in example above http://www.sencha.com/forum/showthread.php?158246-How-to-reload-Store&p=682974&viewfull=1#post682974 (

30 Nov 2011, 11:16 PM
Why you don't read the documentation?
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.proxy.Ajax-cfg-extraParams (http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.proxy.Ajax-cfg-extraParams)

24 Jan 2012, 12:06 AM
I am going to try after holiday, if it is not working I am going to start a campagin to stop using EXT rubbish software.

24 Jan 2012, 12:09 AM
you mean i should read the two lines documentation that tells nothing? No advanced sample, no nothing, full of bull API

24 Jan 2012, 4:19 PM
Lots of good examples of how it's used found throughout this forum... If you know how to search...

Are you new to Sencha? Do you have experience with JavaScript? ExtJs, etc. is not for the novice web developer.

Have you even tried to read the source code of the framework??

24 Jan 2012, 4:21 PM
extraParams is apart of the proxy... you have to getProxy() before setting the extraParams.

24 Jan 2012, 4:27 PM
var resumeParams = {
//start: 0,
//page: 1,
pid: this.profileID
var me=this;
params: resumeParams,
callback: function (records, operation, success) {
if (success) {
}//end if success
scope: this,
add: false // force data to reload