Reputation: 75
I have StoreBaseOn
declared, and I want to change the URL of it and then load it, as my code need to do so. How to change the URL?
declared code:
StoreBaseOn = new Ext.data.JsonStore({
url: [myurl],
root: 'rows',
idProperty: [myID],
autoLoad: true,
remoteSort: true,
baseParams: [myParam],
fields: ['id', 'age']
});
I know how to change param e.g. StoreBaseOn.setBaseParam('group', the_group);
But how to just change the URL?
Upvotes: 2
Views: 107
Reputation: 355
Thanks Ludovic! sadly I use ExtJS3.4 and which does not have getProxy()
method yet.
However, by your inspiration, I figured out how to do in my case:
StoreBaseOn.proxy.setUrl(myNewUrl)
Upvotes: 1
Reputation: 11916
The url is setted in the proxy
of your store so you can use the following function to set it:
StoreBaseOn.getProxy().setUrl("YouNewUrl");
Upvotes: 2