In this example we are going to display a file directory using Ext.tree.panel
. Remember we are using the MVC pattern so our files need to be placed in the correct folders of our application.
In the following example we are going to display the MVC pattern files' order:
/**view/BasicTreePanel * @classApp.view.BasicTreePanel * @extendsExt.tree.Panel * This is a basic Tree Panel example. */ Ext.define('App.view.BasicTreePanel', { extend: 'Ext.tree.Panel', xtype:'basictreepanel', title:'MVC pattern', root: {//define the data of our tree panel text:'Application', //the text the node is going to display expanded:true, //when the tree rendersthenode it will be expanded by default children:[ //the children of our Application node { text:'app', children:[ // each node can have their own children { text:'app.js', leaf:true //when we set leaf to true, our node will be last in the hierarchy and also its...