PDA

View Full Version : Dynamicaly change data in store with ExtJs 3.4



maxkliver
28 Nov 2012, 2:55 AM
I have a store and dynamically change its URL.


store_form.proxy.conn.url=url;
store_form.load();
tabs.activate(1);

So if I change the URL, data in the store are going to change.

This store I load into `FromPanel`, which is located in a tab:


listeners: {
'activate' : function(zemform,records,options) {
console.log("store:"+store_form.getAt(0));
this.loaded = true;
var record = store_form.getAt(0);
zemform.getForm().loadRecord(record);
//store_form.reload();
}
},

But when the tab is opened, I see previous data. New data show only when I click on another tab and then click back. What's wrong with it?

willigogs
28 Nov 2012, 3:28 AM
Can you provide the code for your tabpanel please?

I'm going to assume it's actually a problem with your tabpanel not showing the correct content (i.e. the second "tab" may be selected, but the first tab "content" is still being shown).

This is likely to be related to your hideMode setting.

Try adding hideMode: 'offsets' to your tabPanel config.

maxkliver
28 Nov 2012, 9:59 PM
Its my tab panel:


var tabs = new Ext.TabPanel({
type:'tabpanel',
activeTab: 0,
bodyStyle:'padding:5px 5px 0',
autoScroll: false,
layoutOnTabChange: true,
height:400,

items: [searchform,zemform,reallyform,docform,podform]
});
tabs.render(winBody);

items it is a FormPanels.

willigogs
28 Nov 2012, 10:58 PM
Have you tried adding:


var tabs = new Ext.TabPanel({
...
hideMode: 'offsets'
...
});
tabs.render(winBody);