PDA

View Full Version : I need to know the index of the accordion or tree. How?



phamthai
28 Apr 2010, 2:15 AM
I have two trees have been added to the accordion from two different path.Now I want to get the index of tree, or accordion, how?

jay@moduscreate.com
28 Apr 2010, 6:07 AM
look at the container api. there is an indexOf method i think.

phamthai
28 Apr 2010, 5:57 PM
I have found in container api, but not found indexOf method

evant
28 Apr 2010, 5:59 PM
var items = [];
for(var i = 0; i < 5; ++i){
items.push({
title: 'Panel' + i
});
}
var special = items[2];
var c = new Ext.Container({
items: items
});
console.log(c.items.indexOf(special));

phamthai
28 Apr 2010, 6:29 PM
I understand your code, but I'm using eXtplorer based on the Ext JS library, can you help me get the index of the tree or accodion. Since then, I can change the path from that index