January 8th, 2009 Portal inside a tab

  • hi

    is it possible to have a portal inside one of the tabs of tabpanel?
    I tried to combine code comes with ext2 examples but it doesn't work

    Ext.onReady(function(){

    Ext.state.Manager.setProvider(new Ext.state.CookieProvider());

    // create some portlet tools using built in Ext tool ids
    var tools = [{
    id:'gear',
    handler: function(){
    Ext.Msg.alert('Message', 'The Settings tool was clicked.');
    }
    },{
    id:'close',
    handler: function(e, target, panel){
    panel.ownerCt.remove(panel, true);
    }
    }];



    var tabs = new Ext.TabPanel({
    id:'tabs',
    renderTo:document.body,
    region:'center',
    activeTab: 1,
    minTabWidth: 130,
    enableTabScroll:true,
    resizeTabs:true,
    defaults: {autoScroll:true},
    width:1000,
    height:'100%',
    items: [{
    title: 'Tab 1',
    id:"hk",
    html:'tab-1'
    },new Ext.Viewport({
    layout:'border',
    title:'tab-2',
    items:[{
    xtype:'portal',
    region:'center',
    margins:'0 0 0 0',
    items:[{
    columnWidth:.6,
    style:'padding:10px 0 10px 10px',
    items:[{
    title: 'Grid in a Portlet',
    layout:'fit',
    tools: tools,
    html: Ext.example.shortBogusMarkup
    }]
    },{
    columnWidth:.2,
    style:'padding:10px 0 10px 10px',
    items:[{
    title: 'Panel 2',
    tools: tools,
    html: Ext.example.shortBogusMarkup
    }]
    }]
    }]
    })]
    });

    thanks


  • I personally consider the portal as extremely experimental. I posted an issue where if you don't have even columns. the grid goes bananas. Also, it has quirks when you start to muck with the example - IE - changing from the 3 column view to a smilarly formatted table view.

    good luck.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Portal inside a tab , Please add it free.