Tree

Hi,
In tree control how to get the selected value of a node

var id = tree.getSelectedItemId();
var text = tree.getItemText(id);