1 Ext.define('ForumBrowser.ForumList', {
3 extend: 'Ext.tree.Panel',
5 alias: 'widget.forumlist',
13 initComponent: function(){
16 getRowClass: function(record) {
17 if (!record.get('leaf')) {
18 return 'forum-parent';
22 store: Ext.create('Ext.data.TreeStore', {
23 model: 'ForumBrowser.Forum',
29 url: 'http://sencha.com/forum/forums-remote.php',
38 load: this.onFirstLoad
43 this.getSelectionModel().on({
49 onFirstLoad: function(){
50 var rec = this.store.getNodeById(this.defaultForum);
51 this.getSelectionModel().select(rec);
54 onSelect: function(selModel, rec){
55 if (rec.get('leaf')) {
56 this.ownerCt.loadForum(rec);