RenderKit renderKit = getRenderKitFactory().getRenderKit(facesContext, uiViewRoot.getRenderKitId());
ResponseStateManager responseStateManager = renderKit.getResponseStateManager();
if (isLegacyResponseStateManager(responseStateManager))
{
responseStateManager.writeState(facesContext, serializedView);
}
else if (!isSavingStateInClient(facesContext))
{
Object[] state = new Object[2];
state[JSF_SEQUENCE_INDEX] = Integer.toString(getNextViewSequence(facesContext), Character.MAX_RADIX);