If the node of your tree are represented by custom objects in your Java code you may have to use a rowKeyConverter. For this you could extend TreeNodeImpl and override getChildrenKeysIterator().
In order to handle user events RichFaces will have to identify the tree nodes and therefore creates an identification-String on the server to send it to the client and when the id comes back RichFaces must find the object for the tree node. As RichFaces does not know your custom object, it can just use toString().
But you can implement a rowKeyConverter for the job of converting.
use of rowKeyConvertor is like below and it works for the below components,
Convert for a row key object.It converts the entity to some String or some class.......
Try look on the below link for help,