PDA

View Full Version : items in items why? Please, please!



baki12
6 Jun 2008, 11:42 AM
Hi,

I have the following code:
var service2 = {
xtype:'panel',
id: 'service2-panel',
frame: true,
title: 'Company data',
autoScrolls:'true',
bodyStyle:'padding:5px',
width: 600,
layout: 'absolute',
items:[{
items: [{
x:10,
y:10,
xtype: 'grid',
autoScrolls:'true',
ds: ds,
cm: colModel,
height: 200,
width:450,
title:'Grid Data',
border: true
},
{ title:'panel2', x:500, y:500, width:300, height:55}
]
}]
};

If i remove the "outer" items the panel with title panel2 is not shown.
I do not understand why i need to specify the items 2x.

Please explain.
Thanks
attila

para
6 Jun 2008, 5:42 PM
Format your code.
put it in CODE tags


Missing an xtype?

[CODE]var service2 = {
xtype: 'panel',
id: 'service2-panel',
frame: true,
title: 'Company data',
autoScrolls: 'true',
bodyStyle: 'padding:5px',
width: 600,
layout: 'absolute',
items: [{
items: [{
x: 10,
y: 10,
xtype: 'grid',
autoScrolls: 'true',
ds: ds,
cm: colModel,
height: 200,
width: 450,
title: 'Grid Data',
border: true
},
{
xtype: 'panel',
title: 'panel2',
x: 500,
y: 500,
width: 300,
height: 55
}
]
}]
};