title: ExtJS4: How to pass arguments to initComponent
body: <p>I am using Sencha Architect 2. I am trying to generate a generic UI element with a text search and a table displaying the results. Generic means I want to use it for several different type of searches, e.g. for users, or roles or still something else.</p>
  
  <p>So what I definitely like in this context about Sencha Architect 2 is that it always generates classes. Here is my generated class:</p>
  
  <pre><code>Ext.define('ktecapp.view.ObjSearchPanel', {
      extend: 'Ext.container.Container',
      alias: 'widget.objsearchpanel',
  
      height: 250,
      id: 'UserSearchPanel',
      itemId: 'UserSearchPanel',
      width: 438,
      layout: {
          columns: 3,
          type: 'table'
      },
  
      initComponent: function() {
          var me = this;
  
          Ext.applyIf(me, {
              items: [
                  {
                      xtype: 'textfield',
                      itemId: 'txtSearchText',
                      fieldLabel: 'Search Text',
                      colspan: 2
                  },
                  {
                      xtype: 'button',
                      id: 'searchObj',
                      itemId: 'searchObj',
                      text: 'Search',
                      colspan: 1
                  },
                  {
                      xtype: 'gridpanel',
                      height: 209,
                      itemId: 'resultGrid',
                      width: 430,
                      store: 'UserDisplayStore',
                      colspan: 3,
                      columns: [
                          {
                              xtype: 'gridcolumn',
                              width: 60,
                              dataIndex: 'ID',
                              text: 'ID'
                          },
                          {
                              xtype: 'gridcolumn',
                              width: 186,
                              dataIndex: 'DISPLAYNAME',
                              text: 'Displayname'
                          },
                          {
                              xtype: 'gridcolumn',
                              width: 123,
                              dataIndex: 'JOBTITLE',
                              text: 'Job Title'
                          },
                          {
                              xtype: 'actioncolumn',
                              width: 35,
                              icon: 'icons/zoom.png',
                              items: [
                                  {
                                      icon: 'icons/zoom.png',
                                      tooltip: 'Tooltip'
                                  }
                              ]
                          }
                      ],
                      viewConfig: {
  
                      },
                      selModel: Ext.create('Ext.selection.CheckboxModel', {
  
                      })
                  }
              ]
          });
          me.callParent(arguments);
      }
  });
  </code></pre>
  
  <p>The problem I am having is that everything needs to be pretty customizable, dataIndexes of the columns, the store, ...
  So how can I get a constructor like function for the class ObjSearchPanel where I pass all that information? In the code above all this looks pretty much hardcoded...</p>
  
  <p>Thanks in advance
  Kai</p>