There are two events on the browser tree (there are in the
BrowserTree class):
refreshTreeFromId(Control oControl, ArgumentList oArgs);
refreshTreeFromAbsolutePath(Control oControl, ArgumentList oArgs);
These let you set the currently selected node on the browser tree.
Look at the webtopclassicclassic.jsp file for an example. This has
two methods, onClickContentObject() and onClickAbsolutePath(), that
handle this. I think you can actually just call onClickAbsolutePath() to get it to work. You can fire this from Javascript, but it's
probably easier to do it from your Java code. The args requires one
item called ids, which should be a list of the node IDs separated
by '.'s (the node IDs are usually the same as the component that the
node would launch). So your code should look something like this
(this assumes that the node IDs are in a String array called
componentIds; where you get them from is up to you):
ArgumentList oArgs = new ArgumentList();
StringBuffer ids = new StringBuffer(72);
for (int i = 0; i < componentIds.length; i++)
{
if (ids.length() != 0)
{
ids.append('.');
}
ids.append(componentIds[i]);
}
if (ids.length() != 0)
{
oArgs.add("ids", ids.toString());
}
setClientEvent("onClickAbsolutePath", oArgs);
You'll probably need to play with this a little bit, but once you get it down, it's fairly straighforward.