I spend hours to find how to keep the tree statebut what I found are too complex
Set componentState="#{bean.stateObject}".