PDA

View Full Version : Accordion items not being displayed



adibhagra
14 Oct 2009, 11:03 PM
hey guys,

i have a if condition based on which i decide which accordion to display , its like this




var accordion = new Ext.Panel({
//layout:'accordion'
});
var accordion3 = new Ext.Panel({
layout:'accordion',

title:'Violation Information',
tbar:[{text:'Manage',handler:onButtonClick}],
region:'east',
width:'300',
split:true,
margins:'5 0 5 0',
minSize:'150',
maxSize:'350',
collapsible:true,
items:[
details,dispute,submitter,ccc
]
});

var accordion2 = new Ext.Panel({
layout:'accordion',

title:'Violation Information',
tbar:[{text:'Manage',handler:onButtonClick}],
region:'east',
width:'300',
split:true,
margins:'5 0 5 0',
minSize:'150',
maxSize:'350',
collapsible:true,
items:[
details,reduction,submitter,ccc
]
});
if(checkAcc)
{
accordion = accordion3;
}



i call the accordion object within my viewport items, prob is that whenever i set accordion to accordion3 , only the dispute item is getting displayed and the remaining 3 dont appear, how ever when i display accordion2 all the items are displayed without any problems.

any idea, what might be the problem,

thanks and regards,

ice

jay@moduscreate.com
15 Oct 2009, 1:44 AM
your logic inefficient and wasteful. If don't intend on displaying something, don't create it.


The child items "details,reduction,submitter,ccc" Can *only* exist in one parent at a time!

tuxrupre
15 Oct 2009, 3:30 AM
Take that, you sweet thing!