O'Reilly logo

Learning Ext JS - Fourth Edition by Armando Gonzalez, Crysfel Villa, Carlos A. Méndez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required