Your question isn't very clear to me: are those click commands (with the XPath) not working because they result in "element not found" errors or because the click simply isn't causing the behavior your expect?
If it's an element-not-found issue, I suggest you use Firebug's $x function in the console to refine your XPath. You can run this function call in the Firebug function to see what the XPath is truly evaluating to:
$x("//div[@id=\"foo:classTree\"]/div/div/table[XXX]/tbody/tr/td/a")
Where XXX is some index. This is by far the best way to figure out the right XPath.
If the problem is that the click is just not really causing the tree map to change, try switching from click() to fireEvent("//xpath", "click") and see if that helps.