PDA

View Full Version : xtype: "form" is giving problems



stevieke
12 May 2009, 4:33 AM
After keep trying i have situated the problem.
In my code , I have set xtype: "form" and this is giving an error:
htmlfile: Unknown runtime error

This project also make use of drupal...




var GetRelationFiltering = function(){
var PanelFiltering = new Ext.Panel({
title : 'Extra',
collapsible : true,
collapsed : false,
width : '100%',
items: [{
items: [{
xtype: "form", //Here is the problem
bodyStyle : 'padding:20px',
id: "pnlPrestationFiltering",
items: [{
layout:"column",
border:false,
items:[{
columnWidth:.5,
layout: "form",
border:false,
items: [{
xtype : "textfield",
fieldLabel : "Bedrijf",
name : "Bedrijf",
anchor : "90%"
}, {
xtype : "datefield",
fieldLabel : "Datum van",
name : "DatumVan",
anchor : "90%",
format : "d/m/Y"

}, {
xtype : "datefield",
fieldLabel : "Datum tot",
name : "DatumTot",
anchor : "90%",
format : "d/m/Y"
/*}, {
xtype : "combo",
name : "Projectcode",
fieldLabel : "Projectcode",
store : _StoreProjectType,
mode : "local",
emptyText : "Selecteer een project...",
hiddenId : "key",
displayField : "value",
typeAhead : true,
selectOnFocus : true,
triggerAction : "all",
anchor : "80%" */
}]
}]
}]
}]
}]
});


can somebody help me

Condor
12 May 2009, 4:57 AM
Is this panel part of another form? You can't nest <form> tags.

ps. Your example is overnested:

var GetRelationFiltering = function(){
var PanelFiltering = new Ext.Panel({
title: 'Extra',
collapsible: true,
collapsed: false,
// invalid: width: '100%',
layout: 'fit', // need to size items!
// too many nestings: items: [{
items: [{
xtype: "form", //Here is the problem
bodyStyle: 'padding:20px',
id: "pnlPrestationFiltering",
// too many nestings: items: [{
layout:"column",
border:false,
items:[{
columnWidth:.5,
layout: "form",
border:false,
items: [{
xtype: "textfield",
fieldLabel: "Bedrijf",
name: "Bedrijf",
anchor: "90%"
},{
xtype: "datefield",
fieldLabel: "Datum van",
name: "DatumVan",
anchor: "90%",
format: "d/m/Y"
},{
xtype: "datefield",
fieldLabel: "Datum tot",
name: "DatumTot",
anchor: "90%",
format: "d/m/Y" /*
},{
xtype: "combo",
name: "Projectcode",
fieldLabel: "Projectcode",
store: _StoreProjectType,
mode: "local",
emptyText: "Selecteer een project...",
hiddenId: "key",
displayField: "value",
typeAhead: true,
selectOnFocus: true,
triggerAction: "all",
anchor: "80%" */
}]
}]
// }]
}]
// }]
});
};

stevieke
12 May 2009, 5:03 AM
Thanks a lot

The overnesting was the problem, a little bit heigher i was already using a formpanel.
I didn't know that this was not possible ....

greetz steven

rain375
12 Aug 2009, 1:44 AM
Hi,
I'd encountered the same error.. Thanks to your writing, I solved a big problem...thanks so much...