PDA

View Full Version : Cant get nested panels inside an accordion layout form to work..



hananyariv
21 Feb 2011, 1:06 AM
Hello all,
i need help solving this, i have a window that nest inside of it are 2 formpanels, so far-so good.
The top panel is set as an accordion layout and it holds panels of its on , or so it should.
when i am trying to nest it it get all kind of frekky errors..
here is the basic code :



BIBestForm = new Ext.Panel({
// id:'BIBestForm',
title: 'Ci sono documenti presenti',
id:'MRKZSearcdhForm',
autoHeight:true,
frame: true,
items: [{ html : "s" } ]
})



StamPanel = new Ext.FormPanel({
title:'Menu',
split:true,
width: 500,
height: 550,
minSize: 475,
maxSize: 400,
collapsible: true,
margins:'0 0 0 0',
layout:'accordion',
layoutConfig:{
animate: true
},
items: [{

title: 'Panel 1',
// html: '<p>Panel content!</p>',
// layout: 'fit',
html: '<p>Panel content!</p>'

}
,{ title: 'Panel 1',
//layout:'fit',

items: BIBestForm.doLayout()

}
]
});


i am using the BIBestForm.doLayout() just because it doesnt give me an error, but i does not work (i cant really see anything) and for some reason the other panel is not showing well as well..


can someone please help me ?

Condor
21 Feb 2011, 5:06 AM
Overnested.

Use:

items: [{
title: 'Panel 1',
html: '<p>Panel content!</p>'
}, BIBestForm]

hananyariv
21 Feb 2011, 5:20 AM
I sloved the issue , thank you but i have to ask ..

is it not possible to do multi nesting? Why does it causes an error ? :-0

Condor
21 Feb 2011, 5:37 AM
It's possible, but then you need to configure your layouts better (and why would you want to - overnesting only adds unneeded DOM elements, which slow down rendering).

hananyariv
21 Feb 2011, 6:14 AM
Alright :) Thank you..

I have read alot about layouts and seen screencast's and all, i have to say , im still having problems with that..

i am unsure what can i nest and what i cant , i am slowly solving my issues but i cant say im a 100 on that subject ...

If anyone have good tuturials about the subject , i will be happy to get it :)