/** * @param context * @param state * @see javax.faces.component.UIComponentBase#processRestoreState(javax.faces.context.FacesContext, * java.lang.Object) */ public void processRestoreState(FacesContext context, Object state) { original.processRestoreState(context, state); }
protected void restoreComponentStateFromClient(final FacesContext context, final UIViewRoot viewRoot, final String renderKitId) { final ResponseStateManager responseStateManager = getResponseStateManager( context, renderKitId); final Object state = responseStateManager .getComponentStateToRestore(context); viewRoot.processRestoreState(context, state); }
protected void restoreComponentStateFromClient(FacesContext context, UIViewRoot viewRoot, String renderKitId) { ResponseStateManager responseStateManager = ResponseStateManagerUtil .getResponseStateManager(context, renderKitId); Object state = responseStateManager.getComponentStateToRestore(context); viewRoot.processRestoreState(context, state); }
protected void restoreComponentStateFromServer(FacesContext context, UIViewRoot viewRoot) { SerializedView serializedView = getSerializedViewFromServer(context .getExternalContext(), viewRoot.getViewId()); if (serializedView == null) { return; } Object state = serializedView.getState(); if (state == null) { return; } viewRoot.processRestoreState(context, state); }
protected void restoreComponentStateFromServer(final FacesContext context, final UIViewRoot viewRoot) { final SerializedView serializedView = getSerializedViewFromServer(viewRoot .getViewId()); if (serializedView == null) { return; } final Object state = serializedView.getState(); if (state == null) { return; } viewRoot.processRestoreState(context, state); }
protected void restoreComponentState(FacesContext context, UIViewRoot viewRoot, String renderKitId) { if (!JsfUtils.isFlowRequest()) { super.restoreComponentState(context, viewRoot, renderKitId); return; } RequestContext requestContext = RequestContextHolder.getRequestContext(); SerializedView view = (SerializedView) requestContext.getViewScope().get(SERIALIZED_VIEW_STATE); viewRoot.processRestoreState(context, view.componentState); logger.debug("UIViewRoot component state restored"); }
public UIViewRoot restoreView(FacesContext facesContext, String viewId, String renderKitId) { if (log.isTraceEnabled()) log.trace("Entering restoreView - viewId: "+viewId+" ; renderKitId: "+renderKitId); RenderKit renderKit = getRenderKitFactory().getRenderKit(facesContext, renderKitId); ResponseStateManager responseStateManager = renderKit.getResponseStateManager(); Object state; if (isSavingStateInClient(facesContext)) { if (log.isTraceEnabled()) log.trace("Restoring view from client"); state = responseStateManager.getState(facesContext, viewId); } else { if (log.isTraceEnabled()) log.trace("Restoring view from session"); Integer serverStateId = getServerStateId((Object[]) responseStateManager.getState(facesContext, viewId)); state = getSerializedViewFromServletSession(facesContext, viewId, serverStateId); } UIViewRoot uiViewRoot = null; if (state != null) { Object[] stateArray = (Object[])state; TreeStructureManager tsm = new TreeStructureManager(); uiViewRoot = tsm.restoreTreeStructure(stateArray[0]); if (uiViewRoot != null) { uiViewRoot.processRestoreState(facesContext, stateArray[1]); } } if (log.isTraceEnabled()) log.trace("Exiting restoreView - "+viewId); return uiViewRoot; }
result.processRestoreState(context, state[1]);
@SuppressWarnings("deprecation") private void restoreState(FacesContext context, UIViewRoot root, String renderKitId) { ResponseStateManager rsm = RenderKitUtils.getResponseStateManager(context, renderKitId); Object state; if (ReflectionUtils.lookupMethod(rsm.getClass(), "getState", FacesContext.class, String.class) != null) { Object[] stateArray = (Object[]) rsm.getState(context, root.getViewId()); state = stateArray[1]; } else { state = rsm.getComponentStateToRestore(context); } root.processRestoreState(context, state); }
result.processRestoreState(context, state[1]);
uiViewRoot.processRestoreState(facesContext, stateArray[1]);
result.processRestoreState(context, state[1]);
result.processRestoreState(context, state[1]);
facesContext.getViewRoot().processRestoreState( facesContext, s);
uiViewRoot.processRestoreState(facesContext, stateArray[1]);
uiViewRoot.processRestoreState(facesContext, stateArray[1]);
uiViewRoot.processRestoreState(facesContext, stateArray[1]);
uiViewRoot.processRestoreState(facesContext, serializedComponentStates);
uiViewRoot.processRestoreState(facesContext, serializedComponentStates);
uiViewRoot.processRestoreState(facesContext, serializedComponentStates);