Book Image

Ext JS 3.0 Cookbook

Book Image

Ext JS 3.0 Cookbook

Overview of this book

Using Ext JS you can easily build desktop-style interfaces in your web applications. Over 400,000 developers are working smarter with Ext JS and yet most of them fail to exercise all of the features that this powerful JavaScript library has to offer. Get to grips with all of the features that you would expect with this quick and easy-to-follow Ext JS Cookbook. This book provides clear instructions for getting the most out of Ext JS with and offers many exercises to build impressive rich internet applications. This cookbook shows techniques and "patterns" for building particular interface styles and features in Ext JS. Pick what you want and move ahead. It teaches you how to use all of the Ext JS widgets and components smartly, through practical examples and exercises. Native and custom layouts, forms, grids, listviews, treeviews, charts, tab panels, menus, toolbars, and many more components are covered in a multitude of examples.The book also looks at best practices on data storage, application architecture, code organization, presenting recipes for improving themóour cookbook provides expert information for people working with Ext JS.
Table of Contents (15 chapters)
Ext JS 3.0 Cookbook
About the Author
About the Reviewer

The multi-column TreePanel

This recipe describes how to add grid view-like features to a TreePanel using a plugin, as seen in the following screenshot:

Getting ready...

The column-tree.css, column-tree.js, and ColumnNodeUI.js files used in this recipe can be obtained from the Ext JS 3.0 samples page at

How to do it...

  1. 1. Add the styles needed for the multi-column tree:

    <link href="column-tree.css" rel="stylesheet" type="text/css" />
  2. 2. Add the ColumnNodeUI class and ColumTree class definitions, contained in the ColumnNodeUI.js and column-tree.js files:

    <script type="text/javascript" src="../ux/ColumnNodeUI.js"></script>
    <script src="column-tree.js" type="text/javascript"></script>
  3. 3. Create an instance of the ColumnTree class:

    Ext.onReady(function() {
    var tree = new Ext.tree.ColumnTree({
    width: 620,
    height: 300,
    rootVisible: false,
    autoScroll: true,
    title: 'Product Backlog',
    renderTo: Ext.getBody(),
  4. 4. In...