PDA

View Full Version : tree onclick



pwiggins@cedarcreek.com
17 Feb 2014, 5:12 AM
root: { text: 'Root',
expanded: true,
children: [
{
text: 'Cloud',
expanded: false,
children: [
{
text: 'Admin',
expanded: false,
children: [
{
text: 'Permissions',
children: [
{
text: 'Overview',
leaf: true,
is there something i do here???
},
Having issues with on click on this tree. The tree works fine, but not sure where or how to do a on click event. I'm trying to link to a website and put that website into an iframe in a panel I have called contentPanel when the user click particular leaves within the tree.

evant
17 Feb 2014, 5:18 AM
See: http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.panel.Table-event-itemclick

pwiggins@cedarcreek.com
17 Feb 2014, 6:35 AM
running into errors trying to use this. I think the problem is defining the Ext that it requires. How do I add the Ext.util.Observable.addListener to the ext.defin requires:[' Ext.util.Observable.addListener'] into the code in the Sencha SDK? when I try to add it just to the code it won't let me edit that area.

pwiggins@cedarcreek.com
17 Feb 2014, 7:06 AM
running into errors trying to use this. I think the problem is defining the Ext that it requires. How do I add the Ext.util.Observable.addListener to the ext.defin requires:[' Ext.util.Observable.addListener'] into the code in the Sencha SDK? when I try to add it just to the code it won't let me edit that area.

sorry I finally found the "requires" area of the properties. Still working to make it work and may have more questions soon.

pwiggins@cedarcreek.com
17 Feb 2014, 7:15 AM
text: 'Mass Assignment',
leaf: true,
itemclick(this: contentPanel, item: 'http://yahoo.com', e, eOpts )


Is this the correct way to do it? I have panel with an id contentPanel and I want it to open up in this example the site yahoo.com.

pwiggins@cedarcreek.com
17 Feb 2014, 8:32 AM
does it need something like


listeners: { itemclick: function()
}