//===========================================
// first, locate the saved state information
//===========================================
RenderKit renderKit = getRenderKitFactory().getRenderKit(facesContext, renderKitId);
ResponseStateManager responseStateManager = renderKit.getResponseStateManager();
Object serializedComponentStates;
if (isSavingStateInClient(facesContext))
{
if (isLegacyResponseStateManager(responseStateManager))
{
serializedComponentStates = responseStateManager.getComponentStateToRestore(facesContext);
}
else
{
serializedComponentStates = responseStateManager.getState(facesContext, uiViewRoot.getViewId());
}
if (serializedComponentStates == null)
{
log.severe("No serialized component state found in client request!");
// mark UIViewRoot invalid by resetting view id
uiViewRoot.setViewId(null);
return;
}
}
else
{
Integer serverStateId = getServerStateId((Object[]) responseStateManager.getState(facesContext, uiViewRoot.getViewId()));
Object[] stateObj = (Object[])( (serverStateId == null)? null : getSerializedViewFromServletSession(facesContext, uiViewRoot.getViewId(), serverStateId) );
if (stateObj == null)
{
log.severe("No serialized view found in server session!");