Hi all ,

Im trying to click from a link and show a hidden portlet in the portal and maximize it straight away.

I can make it show , but i cant seem to be able to maximize it.

Code:
 
Ext.BLANK_IMAGE_URL ='extjs/resources/images/default/s.gif';

Ext.namespace('nv');
Ext.onReady(function(){
var viewport =new Ext.Viewport({
layout
:'border', items
:[{ region
:'west', id
:'west-panel', title
:'Nv', split
:true, width
:200, minSize
:175, maxSize
:400, collapsible
:true, margins
:'90 0 5 5', cmargins
:'90 5 5 5', layout
:'accordion', //collapseMode: 'mini',
layoutConfig
:{ animate
:true },
items:[{html:'<br /><p><ul><li><a style="color:black;font-weight:bold;" href="javascript:void(0);" id="providers_add">&nbsp;&nbsp;Provider management</a></li></ul></p>',
title:'Suppliers', autoScroll:true, border:false, iconCls:'nav' },{
html:'<br /><p><ul><li><a style="color:black;font-weight:bold;" href="javascript:void(0);" id="numbers_add">&nbsp;&nbsp;Number management</a></li></ul></p>',
title:'Numbers', autoScroll:true, border:false, iconCls:'nav' },{
html:'<br /><p><ul><li><a style="color:black;font-weight:bold;" href="javascript:void(0);" id="clients_add">&nbsp;&nbsp;Client management</a></li></ul></p>',
title:'Clients', autoScroll:true, border:false, iconCls:'nav' },{ title:'Info',
html:'<p>Some important text will come here , some important text will come here.</p>',
border:false, autoScroll:true, iconCls:'settings' },{
title:'Statistics',
html:'<p>Some important text will come here , some important text will come here.</p>', border:false, autoScroll:true, iconCls:'settings' },{
title:'Internal Settings',
html:'<p>Some important text will come here , some important text will come here.</p>', border:false, autoScroll:true, iconCls:'settings' },{
title:'User Admin',
html:'<p>Some important text will come here , some important text will come here.</p>', border:false, autoScroll:true, iconCls:'settings' },{
title:'Tasks',
html:<p>Some important text will come here , some important text will come here.</p>, border:false, autoScroll:true, iconCls:'settings' }]
// end left menu items },{ xtype:'portal',
region:'center', margins:'90 5 5 0', closeAction:'hide', id:'homeportal',
listeners:{'resize':{fn:function()
{
var tmpPanel = Ext.getCmp("center-panel-col0");
if(tmpPanel.isVisible())
{ tmpPanel
.setSize(tmpPanel.ownerCt.getSize()); }
}, scope
:this }
}, autoScroll
:false, items
:[{ columnWidth
:0, id
:'center-panel-col0', // layout:'fit',
hidden
:true },{
columnWidth
:.33, id
:'center-panel-col1', style
:'padding:10px 0 10px 10px', items
:[{ id
:'telecom-overview', title
:'Telecom suppliers', layout
:'fit', tools
: tools, items
:{xtype:'familycontent'} },{
id
:'telecom-alerts', title
:'Alerts', tools
: tools, html
:'<p>Some important text will come here , some important text will come here.</p>' },{
columnWidth
:.33, id
:'telecom-numbers', // i would like to show this one and have it maximized // deferredRender:false,
layout
:'fit', // margins:'auto',
// border:true, // frame: true, tools
: tools, hidden
:true, title
:'Number management' }
] } ,{ columnWidth
:.33, style
:'padding:10px 0 10px 10px', items
:[{ id
:'telecom-news', title
:'News', tools
: tools, html
:'<p>Some important text will come here , some important text will come here.</p>' },{
id
:'telecom-access', title
:'Latest accesses', tools
: tools, html
:'<p>Some important text will come here , some important text will come here.</p>' }]
},{ columnWidth
:.33, style
:'padding:10px', items
:[{ id
:'telecom-tasks', title
:'Tasks', tools
: tools, html
:'<p>Some important text will come here , some important text will come here.</p>' },{
title
:'Stadistics', id
:'telecom-stats', tools
: tools, html
:'<p>Some important text will come here , some important text will come here.</p>' }]
}]
/*
* Uncomment this block to test handling of the drop event. You could use this * to save portlet position state for example. The event arg e is the custom * event defined in Ext.ux.Portal.DropZone. */ // ,listeners: { // 'drop': function(e){ // Ext.Msg.alert('Portlet Dropped', e.panel.title + '<br />Column: ' + // e.columnIndex + '<br />Position: ' + e.position); // } // } }] });/// END VIEWPORT console
.log(viewport);
if(Ext.get('providers_add')){
var
ProviderManagementButton = Ext.get('providers_add');// providers
ProviderManagementButton.on('click',function(){
Ext.getCmp('homeportal').findById('telecom-numbers').show(); // now i need to maximize it ? i cant seem to use the function maximize //that i have in the tools from outside? //panel.tools['maximize']
}
); }
});