PDA

View Full Version : Problem with FormPanel in column layout



fidget
30 Nov 2007, 8:36 AM
To EXTJS team
Thanks for a great utility =D> . This is the first real problem i get , keep up the good work

I have a very basic problem , maby iam doning something wrong or there might be a bug ...

The code given works fine , until i change the panel_right from a Panel to a FormPanel , then nothing works anymore , i would like that Panel to be a FormPanel to make use of that load funtion , so if there is a very easy why to load data into a panel with a form layout that i dont know of plz help, any help will be appreciated..


myTabs = function() {
function form_detail() {
panel_left = new Ext.Panel({
//frame : true,
border : false,
layout : 'form',
labelAlign : 'right',
labelWidth : 20,
defaultType : 'textfield',
defaults : {width: 230},
items : [{
fieldLabel : 'First Name',
id : 'first_id',
name : 'first',
width : 190
}]
});
panel_right = new Ext.Panel({
//frame : true,
border : false,
layout : 'form',
labelAlign : 'right',
labelWidth : 20,
defaultType : 'textfield',
defaults : {width: 230},
items : [{
fieldLabel : 'First Name',
id : 'first_id',
name : 'first',
width : 190
}]
});
return {
title : 'Form Details',
layout : 'column',
defaults : {width: 375, height:380,columnWidth: .5 },
items : [panel_left,panel_right]
}
}
return {
// public space
single: function() {
var tab2 = new Ext.FormPanel({
labelAlign : 'top',
title : 'Single Information',
bodyStyle : 'padding:5px',
width : 750,
items : [{
xtype : 'tabpanel',
plain : true,
activeTab : 0,
height : 380,
defaults : {bodyStyle:'padding:10px'},
items : [form_detail()]
}],
buttons : [{
text : 'Save'
},{
text : 'Cancel'
}]
});
tab2.render('sing2');
}
};
}();

tryanDLS
30 Nov 2007, 9:08 AM
Try removing the array brackets from single item panel configs - If you're only adding 1 item, it should not be in an array.