O'Reilly logo

Learning Ext JS 4 by Armando Gonzalez, Crysfel Villa

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.

This is how the data source configuration must go:

{
      "text":"images",
      "checked":false,
      "children":[
        {
          "text":"script_code.png",
          "leaf":"true",
          "iconCls":"image",
          "checked":false
        },{
          "text":"html.png",
          "leaf":"true",
          "iconCls":"image",
          "checked":true
        },{
          "text":"css.png",
          "leaf":"true",
          "iconCls":"image",
          "checked":false
        },{
          "text":"json.png",
          "leaf":"true",
          "iconCls":"image",
          "checked":true
        },{
          "text":"image.png",
          "leaf":"true",
          "iconCls":"image",
          "checked":true
        }
      ]
    }

As we can see in the previous code we added the checked property to our data source. ...

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