I am trying to set icon with the setItemImage2(itemId, image1,image2,image3)
but only one icon is set - the icon does not change when open / closed of node, but as a function setting 3 ico “image1,image2,image3”. how to install on another node icon to display normal opening / closing?

setItemImage2(itemId, image1,image2,image3)

here image2 is the icon for open folder and image3 - for closed folder.

This method should be called after xml loading:

tree.loadXML(url,function(){ tree.setItemImage2(itemId, leaf,openFolder,closedFolder); })

Also you may define images using im0, im1 and im2 attributes in the xml.