Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / examples / forum / classes / Main.js
1 Ext.define('ForumBrowser.Main', {
2     extend: 'Ext.container.Viewport',
3     
4     initComponent: function(){
5         Ext.apply(this, {
6             layout: 'border',
7             itemId: 'main',
8             items: [{
9                 xtype: 'forumlist',
10                 region: 'west',
11                 width: 300,
12                 title: 'Forums',
13                 split: true,
14                 margins: '5 0 5 5'
15             }, {
16                 region: 'center',
17                 xtype: 'tabpanel',
18                 margins: '5 5 5 0',
19                 minWidth: 400,
20                 border: false,
21                 tabBar: {
22                     border: true
23                 },
24                 items: {
25                     itemId: 'topic',
26                     xtype: 'topiccontainer'
27                 }
28             }]
29         });
30         this.callParent();
31     },
32     
33     loadForum: function(rec){
34         this.down('#topic').loadForum(rec);
35     }  
36 });