PDA

View Full Version : view port problem



columbus30
12 Jul 2009, 10:54 AM
hi all,

can anyone tell wats wrong with following code,it works sometime but not always.


var viewport = new Ext.Viewport({
layout: 'border',
items: [
{
xtype:'tabpanel',


region:'center',

items:[

{
layout:'border',
region:'center',
title:'<b>Project Workflow Management</b>',
items:[{

layout:'border',
region:'center',
items:[{
xtype:'tabpanel',
region:'center',
items:[{title:'abc'},
{title:'xyz'}]



},{
region:'west',
title:'west',
split: true,
width: 200,
minSize: 175,
maxSize: 400,
collapsible: true

}

]

}]

}



sometimes west region and tabs xyz,abc appears..

please provide some suggestion

jay@moduscreate.com
13 Jul 2009, 4:50 AM
Are you doing that within the context of Ext.onReady?

columbus30
13 Jul 2009, 5:00 AM
yes,its within the scope of Ext.onReady.

I have noticed one peculiar thing about this.The west region and tabs:'abc' and 'xyz' does not appear when page load.But when i click on the firebug in FF the west region and tab panel appears.

what is the reason for this behaviour and how can it be resolved?

Animal
13 Jul 2009, 5:04 AM
Do you mean, what's the problem with



var viewport = new Ext.Viewport({
layout: 'border',
items: [{
xtype: 'tabpanel',
region: 'center',
items: [{
layout: 'border',
region: 'center',
title: '<b>Project Workflow Management</b>',
items: [{

layout: 'border',
region: 'center',
items: [{
xtype: 'tabpanel',
region: 'center',
items: [{
title: 'abc'
}, {
title: 'xyz'
}]
}, {
region: 'west',
title: 'west',
split: true,
width: 200,
minSize: 175,
maxSize: 400,
collapsible: true
}]
}]
}]
}]
});


?

Apart from insane overnesting?

Animal
13 Jul 2009, 5:06 AM
Try



var viewport = new Ext.Viewport({
layout: 'fit',
items: {
xtype: 'tabpanel',
activeTab: 0,
items: {
layout: 'border',
title: '<b>Project Workflow Management</b>',
items: [{
xtype: 'tabpanel',
region: 'center',
items: [{
title: 'abc'
}, {
title: 'xyz'
}]
}, {
region: 'west',
title: 'west',
split: true,
width: 200,
minSize: 175,
maxSize: 400,
collapsible: true
}]
}
}
});

columbus30
13 Jul 2009, 5:14 AM
ok,thanks for your reply.But please tell the reason why it works correctly everytime i click on firebug icon on FF.