PDA

View Full Version : Using a tree as a menu to load content into another panel



eamon250d
10 Mar 2014, 6:29 AM
Hello,
I left a troubleshooter that shows me a Tree Panel object
I try to Panel 4, and each Panel I load the object Tree Panel

Here is my code that works already that shows me my list






Ext.define('CF.view.ListeIndicateurs', {
extend: 'Ext.tree.Panel',
xtype: 'navigation',
title: 'Indicateurs',
rootVisible: false,
lines: false,
useArrows: true,

region:'west',
width: 200,
collapsible: true,
titleCollapse: true,
floatable: false,
layout: 'fit',
split: true,

autoclose: false,

store : Ext.create('Ext.data.TreeStore', {
proxy: {
type: 'ajax',
url: 'treegrid.json'
},
}),
});






Here is the new concept that I try to


Ext.define('CF.view.ListeIndicateurs', {
extend: 'Ext.panel.Panel',
xtype: 'navigation',
title: 'Indicateurs',
rootVisible: false,
lines: false,
useArrows: true,

region:'west',
width: 200,
collapsible: true,
titleCollapse: true,
floatable: false,
layout: 'fit',
split: true,

autoclose: false,
layout : {
type : 'vbox',
align : 'stretch'
},
defaults : {
xtype : 'panel',
collapsible : true,
height : 200,
layout : {
type : 'accordion'
}
},
items : [
{
title : 'Text 1',
items : [

]
},
{
title : 'Text 2'
},
{
title : 'Text 3',
collapsed: true
},
{
title : 'Text 4',
collapsed: true
},
{
title : 'Text 5',
collapsed: true
},
{
title : 'Text 6',
collapsed: true
},
{
title : 'Text 7',
collapsed: true
}

]

});

Gary Schlosberg
18 Mar 2014, 4:43 AM
Apologies, but what specifically is the question here? If you've gotten part of it working, you might try putting it into a Fiddle so that others can help you build on it.
https://fiddle.sencha.com/#home