How can we change the Tree Leaf Icon, when the Leaf is clicked. Only for the clicked Node/Leaf


I have tried the below mentioned code snippet(which i got from some thread) ..to change the image icon for tree node leaf but still the image is not changing .....plzzzz help me out of this i have tried lot of options...

yourTreePanel.getSelectionModel().on('selectionchange',
function(sm, node){
node.ui.elNode.removeClass("the-class-with-the-icon-you-want-to-remove");
node.ui.elNode.addClass("the-class-with-the-icon-you-want-to-add");
}, this, true);