SerializedView serializedView = null;
UIViewRoot viewRoot = context.getViewRoot();
if (null != viewRoot && (!viewRoot.isTransient()) ) {
TreeStrutureNode treeStructure = new TreeStrutureNode();
treeStructure.apply(context, viewRoot, new HashSet());
Object treeState = viewRoot.processSaveState(context);
Object state[] = { treeState, getAdditionalState(context) };
if (isSavingStateInClient(context)) {
serializedView = new SerializedView(treeStructure, state);
} else {
serializedView = saveStateInSession(context, treeStructure,