Mar 25, 2009, 12:46 PM
Selected Node - tree panel
Hi everyone,
Thanks for your help regarding my last post.
I have the following situation: one treepanel(master) and one grid(details). When I click a node in the tree panel, I would like to pass a parameter to the store of the grid and load data.
Here is what I did so far:
For the tree I added a listener for the tree node click event and it works fine.
In the store I am (desperately) trying to get the selected node id *from the tree and put it in the parameter, but I cannot succeed.
I have tried various options, such as:
or*
plus few others, but without success.
Please help.
Thanks in advance,
Thanks for your help regarding my last post.
I have the following situation: one treepanel(master) and one grid(details). When I click a node in the tree panel, I would like to pass a parameter to the store of the grid and load data.
Here is what I did so far:
For the tree I added a listener for the tree node click event and it works fine.
<ext:TreePanel ID="tree1" ...>
...
<Listeners>
<Click Handler="#{StatusBar1}.setStatus({text: 'Node: ' + node.text + '', clear: true});#{store1}.reload();" />
</Listeners>
...
In the store I am (desperately) trying to get the selected node id *from the tree and put it in the parameter, but I cannot succeed.
<ext:Store runat="server" ID="store1"...>
...
** * * *<BaseParams>
** * * * * *<ext:Parameter Name="selNodeID" Value="#{tree1}.getSelectionModel().getSelectedItem().id" Mode="Raw" />
** * * *</BaseParams>
I have tried various options, such as:
** * * * * *<ext:Parameter Name="selNodeID" Value="#{tree1}.getSelectionModel().getSelectedItem.id" Mode="Raw" />
or*
** * * * * *<ext:Parameter Name="selNodeID" Value="#{tree1}.getSelectionModel().selections.items[0].data.id" Mode="Raw" />
plus few others, but without success.
Please help.
Thanks in advance,