PDA

View Full Version : a TextField that is added to a formPanel is not displayed



flamant
14 Sep 2010, 7:47 AM
Hi,
in a succesion of TabPanel and Formpanel, I add a TextField which is not displayed

Here is the code :


targetDiv.add({
items:[
new Ext.TabPanel({
activeTab: 0,
items:[
screenForm,{
title: "<spring:message code="application.summary"/>"
}]
})]
});


var screenForm = new Ext.form.FormPanel({
border: false,
layout: "absolute",
title: "<spring:message code="application.form"/>",
id: "formScreen",
name: "formScreen",
height : powerBuilderYUnitsToPixels(3000),
url: "../secure/getSubjectData.htm?id="+id,
waitMsg:'<spring:message code="application.progress.loadingData"/>',
errorReader: new Ext.form.XmlErrorReader(),
reader: new Ext.data.XmlReader({
totalProperty: "results",
record: 'row'
}, screenDataRecord),
items: [new Ext.TabPanel({
id: 'multiScreenPartPanel'
})]
});


for(var i = 0; i < formFields.length; i++){
Ext.getCmp("multiScreenPartPanel").add(new Ext.form.FormPanel({
id: 'screenPart'+i,
title: 'Screen Part '+i
}))
}


Ext.getCmp("screenPart0").add(new Ext.form.TextField({id: 'test', text: 'test'}));
and then I call the dolayout method



for (var i = 0 ; i < formFields.length ; i++) {
Ext.getCmp("screenPart"+i).doLayout();
}
Ext.getCmp("multiScreenPartPanel").doLayout();
screenForm.doLayout();
targetDiv.doLayout();
and nothing appears. I debugged and apparently, there are no errors and everything is added correctly. I don't see what I can do to resolve this problem.
Thank you in advance for your answers.