1. #1
    Ext User
    Join Date
    Jun 2008
    Posts
    11
    Vote Rating
    0
    inhib is on a distinguished road

      0  

    Default Trying to extend a Panel

    Trying to extend a Panel


    Hi,

    Still beginner with Extjs, I'm trying to extend a Panel :

    I want to open multiple times the same panel in tabs. So I think I need to create my class wich extends a panel with my items, grids, combos, datasources inside.

    Maybe I'm wrong, but I think I should have that :
    Code:
    MyDesktop.Article.MyArticle= Ext.extend(Ext.Panel,{
    title:'mytitle',
    layout:'column',
    items:[columnOne,columnTwo]
    })
    The problem is that I don't know how to declare my Datasources, my combos, grids, and even my columnOne and columnTwo.
    Inside a initComponent:function() ?

    Thanks for any help

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,166
    Vote Rating
    674
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Code:
    MyDesktop.Article.MyArticle= Ext.extend(Ext.Panel,
    {
       title:'mytitle',
       layout:'column',
    
       initComponent: function()
       {
          Ext.apply(this,
          {
             items: [item1, item2]
          }
          );
          MyDesktop.Article.MyArticle.superclass.initComponent.call(this);
       }
    }
    );
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext User
    Join Date
    Jun 2008
    Posts
    11
    Vote Rating
    0
    inhib is on a distinguished road

      0  

    Default


    Many many thanks !

    Now it perfectly works !

Thread Participants: 1