PDA

View Full Version : [2.0b1][CLOSED] Don't need lazy renderer on tabs



Joy
29 Oct 2007, 10:28 PM
Hello,
I use form with about 60 fields, so I split it logically into 10 tabs. When I run form.submit() action, form sends data only from tabs, which have been opened. I tried to init TabPanel with {lazyRender: false} but nothing changed. I guess I needa use some config to pre-render all tabs. Sample code is here:



var wpSettingsForm = new Ext.FormPanel({
id : 'wp_settingsform_form'
,region : 'center'
,width : 600
,labelAlign : 'left'
,labelWidth : 200
,labelSeparator : ''
,reader : new Ext.data.XmlReader({record: 'ROW', success : '@success'}, Ext.wpModelRecords.WP_USER_SETTINGS)
,frame : true
,url : 'wellplot_xml.phtml?WPXML_ACTION=read&WPXML_OBJTYPE=settings&WPXML_WPID=<?echo $wp->_wpID?>'
,border : true
,scope : this
,wpSave : function() {
this.form.submit({
url : 'wellplot_xml.phtml?WPXML_ACTION=write&WPXML_OBJTYPE=settings&WPXML_WPID=<?echo $wp->_wpID?>'
,params : 'WPXML_DATA=[' + Ext.util.JSON.encode(this.form.getValues())+']'
});
}
,layout : 'fit'
,items: [
{
layout : 'fit',
border : true,
items: [
{
xtype : 'tabpanel',
id : 'wp_settingsform_tabs',
activeTab : 0,
enableTabScroll : true,
animScroll : true,
scrollDuration : 1,
//deferredRender : false,
lazyRender : false,
enableCaching: false,
//layout : 'fit',
height : 310,
defaults : {bodyStyle : 'padding: 5px'},
items : [
{ ...............}


Any ideas?

Joy
29 Oct 2007, 10:55 PM
I found decision, just added {autoTabs : true} to TabPanel.

vivid-planet
30 Oct 2007, 9:14 AM
use deferredRender: false for the TabPanel

brian.moeskau
30 Oct 2007, 9:19 AM
deferredRender:false is correct. The autoTabs config is unrelated to what you're asking -- it's for rendering tabs from markup.