You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by sed <se...@gmail.com> on 2007/06/21 11:40:26 UTC
Programmatically selecting node of Tomahawk Tree2
Hi,
How can I programmatically select node in Tomahawk Tree2 component?
What method should I use?
siteMapTree.setNodeId(String.valueOf(page.getID()));
or
siteMapTree.getDataModel().getTreeState().setSelected(String.valueOf(page.getID()));
I have tried to use both but it doesn't work.
Re: Programmatically selecting node of Tomahawk Tree2
Posted by Andrew Robinson <an...@gmail.com>.
The node ID of the tree is a series of indexes, not node ID (I know,
very confusing).
So try things like:
siteMapTree.setNodeId("0");
siteMapTree.setNodeId("0:1");
siteMapTree.setNodeId("0:1:2");
siteMapTree.setNodeId("0:1:1:0");
There are other emails about this if you dig deep into the archives of
the mailing list.
On 6/21/07, sed <se...@gmail.com> wrote:
> Hi,
>
> How can I programmatically select node in Tomahawk Tree2 component?
>
> What method should I use?
> siteMapTree.setNodeId(String.valueOf(page.getID()));
> or
> siteMapTree.getDataModel().getTreeState().setSelected(String.valueOf(page.getID()));
>
> I have tried to use both but it doesn't work.
>