Ok, I was able to get it to work for the server side, but now I'm trying to expand the node on the client side.
I can select a toplevel node from the following code, which apparently simulates a click of the node. However, this doesn't seem to work if the node is not at the top level. So I assume I need to expand the parent node in order to get the child node to be selected?
nodeparent.expand() throws an error.
var node = ddtLocations.get_embeddedTree().findNodeByValue(results);
var nodeparent = node.get_parent();
var nodeElement = node.get_element();