PDA

View Full Version : How the deferredRender works?



maxkliver
27 Nov 2012, 9:18 PM
Hi.
Thare is TabPanel into FormPanel. When i use submit method i send values of fields to server. But i have a problem with field of tabs. If i not open some tabs i cant get field values from this tabs. I try to use deferredRender: false but all tabs except first tab looks like:

Whats wrong?

willigogs
28 Nov 2012, 12:10 AM
Can you provide the code used to create the form and tab panels?

maxkliver
28 Nov 2012, 10:34 PM
FormPanel:


var zemform = new Ext.FormPanel({
labelAlign: 'top',
id: 'tab_2',
frame:true,
title: '????????? ???????',
bodyStyle:'padding:5px 5px 0',
width: 600,
deferredRender:false,
waitMsgTarget: true,
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();
}
},
reader : new Ext.data.XmlReader({
record : 'parcel',
// success: '@success'
}, [
]),
items: [{
layout:'column',
items:[{
columnWidth:.5,
layout: 'form',
items: [{
xtype:'textfield',
fieldLabel: '??????????? ?????',
name: 'cadastr',
anchor:'80%'
}]
},{
columnWidth:.5,
layout: 'form',
items: [{
xtype:'textfield',
fieldLabel: '??????????????',
name: 'address',
anchor:'80%'
},{
xtype:'textfield',
fieldLabel: 'num',
name: 'num',
anchor:'80%',
hidden:true
}]
}]
}]
});

TabPanel:


var zemtab = new Ext.TabPanel({
xtype:'tabpanel',
activeTab: 0,
bodyStyle:'padding:5px 5px 0',
autoScroll: false,
deferredRender:false,
items: []
});
zemform.add(zemtab);

I think u no need in fields code? I see something strange. My FormPanel located in another TabPanel. So full structure TabPanel_1-->FormPanels-->TabPanel_2. And if i do next steps:
1 After situation like in image i click on next tab of TabPanle_1.
2 Click on previous tab again.
3 And i see that tab in TabPanel_2 which not rendered before is render. But only one tab. And in final what i have: in TabPanel_2 rendered only first tab, if i want render another tabs i must do 1-3 points.
Sorry for my barbarian english.