Book Image

Learning Ext JS_Fourth Edition

Book Image

Learning Ext JS_Fourth Edition

Overview of this book

Table of Contents (22 chapters)
Learning Ext JS Fourth Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

The check tree


The tree panel also has the ability to add checkboxes to its nodes. To do this, we need to add one more property to each node in the data source that we are applying to the tree panel.

Let's use the first example of this chapter, and we will change the root property (data) as follows:

root: {
  text: 'My Application',
  expanded: true, 
  checked:false,
  children: [{
    text: 'app',
    checked:false,
    children:[
    { leaf:true, text: 'Application.js', checked:false }
    ]
    },{
      text: 'controller', expanded: true, children: [],
      checked:false
    },{
      text: 'model', expanded:true, checked:false,
      children: [
        {leaf:true, text: 'clients.js', checked:false},
        {leaf:true, text: 'providers.js', checked:false},
        {leaf:true, text: 'users.js', checked:false}
      ]
    },{
      text: 'store', checked:true,
      children: [
        {leaf:true, text: 'clients.js', checked:false},
        {leaf:true, text: 'providers.js', checked:true...