graham_alton
8 Oct 2010, 12:42 AM
I'm using a nestedlist and want to access the records of parent nodes in the tree. I can't find a sensible way to do this so thought I'd ask here...
This is what I have to fire events from the nestedlist onItemTap so far:
onmainMenuTap : function(subList, subIdx, el, event) {
var record = subList.getStore().getAt(subIdx);
if (!record.node.childNodes.length) {
this.mainMenu.hide();
this.fireEvent('navigate', record, subIdx);
}
}What I want to add to the navigate event is the title of the upper most parent entry. So for example, if I have the menu structure something like
A -> AA
A -> AB
B -> BA
B -> BB -> B1
If the user selects A -> AB I would like to send back "A", if the user selects B -> BA I would like to send back "B" and if the user select B -> BB -> B1 I would like to send back "B".
Thanks!
This is what I have to fire events from the nestedlist onItemTap so far:
onmainMenuTap : function(subList, subIdx, el, event) {
var record = subList.getStore().getAt(subIdx);
if (!record.node.childNodes.length) {
this.mainMenu.hide();
this.fireEvent('navigate', record, subIdx);
}
}What I want to add to the navigate event is the title of the upper most parent entry. So for example, if I have the menu structure something like
A -> AA
A -> AB
B -> BA
B -> BB -> B1
If the user selects A -> AB I would like to send back "A", if the user selects B -> BA I would like to send back "B" and if the user select B -> BB -> B1 I would like to send back "B".
Thanks!