In our application, we need to have statefulness for the tree and treegrid. We are using the setStateful(true) api which in turn internally uses stateManager and cookieProvider for maintaing the state.

I want to implement our own custom stateprovider. I need an example for this on how to do.
Many Thanks in advance for any help in this direction.