TechnoBuzz

A Techno Blog, mainly about Java

EXTJS4 Tree

I am designing a Tree for use in the EXTJS4.  In my tree I will be adding new nodes to the Tree. The basic Sencha Tree example is quite the simple case.

The tree I am defining makes use of the Tree Panel as follows:

Ext.define(‘my.view.FolderList’, {
extend : ‘Ext.tree.Panel’

Just like the example, I define my first column as a ‘tree column’:

xtype: ‘treecolumn’, //this is so we know which column will show the tree

Some methods of the Tree Panel which will be usefull:

Via the getSelectionModel()  which returns Ext.selection.Model , you can get:

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.NodeInterface-method-expand

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.NodeInterface-cfg-expanded

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.tree.Panel-method-expandPath

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.NodeInterface-method-getPath

http://www.clintharris.net/2011/how-to-use-extjs-4-treepanels-with-both-static-data-and-model-stores/

http://stackoverflow.com/questions/7491638/extjs-4-treestore-with-both-static-and-dynamically-loaded-data

http://www.sencha.com/forum/showthread.php?179514-Dynamic-node-loading-TreeStore-Panel

http://www.mysamplecode.com/2012/03/extjs-4-reload-tree-node-error.html

http://www.mindfiresolutions.com/Dynamic-Tree-in-Extjs402-1274.php”>http://www.mindfiresolutions.com/Dynamic-Tree-in-Extjs402-1274.php

Advertisements

April 17, 2012 - Posted by | Uncategorized |

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: