/** * @since 1.2 */ public Object getState(FacesContext context, String viewId) { Object[] structureAndState = new Object[2]; structureAndState[0] = getTreeStructureToRestore(context, viewId); structureAndState[1] = getComponentStateToRestore(context); return structureAndState; }
/** * @since 1.2 */ public Object getState(FacesContext context, String viewId) { Object[] structureAndState = new Object[2]; structureAndState[0] = getTreeStructureToRestore(context, viewId); structureAndState[1] = getComponentStateToRestore(context); return structureAndState; }
@Override @Deprecated public Object getTreeStructureToRestore(FacesContext context, String viewId) { return getWrapped().getTreeStructureToRestore(context, viewId); }
/** * <p>The implementation must inspect the current request and return * an Object representing the tree structure and component state * passed in to a previous invocation of {@link * #writeState(javax.faces.context.FacesContext,java.lang.Object)}.</p> * * <p>For backwards compatability with existing * <code>ResponseStateManager</code> implementations, the default * implementation of this method calls {@link * #getTreeStructureToRestore} and {@link * #getComponentStateToRestore} and creates and returns a two * element <code>Object</code> array with element zero containing * the <code>structure</code> property and element one containing * the <code>state</code> property of the * <code>SerializedView</code>.</p> * * @since 1.2 * * @param context The {@link FacesContext} instance for the current request * @param viewId View identifier of the view to be restored * * @return the tree structure and component state Object passed in * to <code>writeState</code>. If this is an initial request, this * method returns <code>null</code>. */ public Object getState(FacesContext context, String viewId) { Object stateArray[] = { getTreeStructureToRestore(context, viewId), getComponentStateToRestore(context) }; return stateArray; }
Object stateArray[] = { getTreeStructureToRestore(context, viewId), getComponentStateToRestore(context) }; return stateArray;
/** * <p>The implementation must inspect the current request and return * an Object representing the tree structure and component state * passed in to a previous invocation of {@link * #writeState(javax.faces.context.FacesContext,java.lang.Object)}.</p> * * <p>For backwards compatability with existing * <code>ResponseStateManager</code> implementations, the default * implementation of this method calls {@link * #getTreeStructureToRestore} and {@link * #getComponentStateToRestore} and creates and returns a two * element <code>Object</code> array with element zero containing * the <code>structure</code> property and element one containing * the <code>state</code> property of the * <code>SerializedView</code>.</p> * * @since 1.2 * * @param context The {@link FacesContext} instance for the current request * @param viewId View identifier of the view to be restored * * @return the tree structure and component state Object passed in * to <code>writeState</code>. If this is an initial request, this * method returns <code>null</code>. */ public Object getState(FacesContext context, String viewId) { Object stateArray[] = { getTreeStructureToRestore(context, viewId), getComponentStateToRestore(context) }; return stateArray; }
Object stateArray[] = { getTreeStructureToRestore(context, viewId), getComponentStateToRestore(context) }; return stateArray;
Object stateArray[] = { getTreeStructureToRestore(context, viewId), getComponentStateToRestore(context) }; return stateArray;
Object stateArray[] = { getTreeStructureToRestore(context, viewId), getComponentStateToRestore(context) }; return stateArray;
Object stateArray[] = { getTreeStructureToRestore(context, viewId), getComponentStateToRestore(context) }; return stateArray;
Object stateArray[] = { getTreeStructureToRestore(context, viewId), getComponentStateToRestore(context) }; return stateArray;
Object stateArray[] = { getTreeStructureToRestore(context, viewId), getComponentStateToRestore(context) }; return stateArray;
Object stateArray[] = { getTreeStructureToRestore(context, viewId), getComponentStateToRestore(context) }; return stateArray;
protected UIViewRoot restoreTreeStructureFromClient(FacesContext context, String viewId, String renderKitId) { ResponseStateManager responseStateManager = ResponseStateManagerUtil .getResponseStateManager(context, renderKitId); TreeStructure struct = (TreeStructure) responseStateManager .getTreeStructureToRestore(context, viewId); if (struct == null) { return null; } return (UIViewRoot) getTreeStructureManager().restoreTreeStructure( struct); }
protected UIViewRoot restoreTreeStructureFromClient( final FacesContext context, final String viewId, final String renderKitId) { final ResponseStateManager responseStateManager = getResponseStateManager( context, renderKitId); final TreeStructure struct = (TreeStructure) responseStateManager .getTreeStructureToRestore(context, viewId); if (struct == null) { return null; } return (UIViewRoot) getTreeStructureManager().restoreTreeStructure( struct); }
Object treeStructure = responseStateManager.getTreeStructureToRestore(facesContext, viewId); if (treeStructure == null)
Object treeStructure = responseStateManager.getTreeStructureToRestore(facesContext, viewId); if (treeStructure == null)
Object treeStructure = responseStateManager.getTreeStructureToRestore(facesContext, viewId); if (treeStructure == null)
id = ((stateArray != null) ? stateArray[0] : null); } else { id = rsm.getTreeStructureToRestore(context, viewId);
@SuppressWarnings("deprecation") private UIViewRoot restoreTree(FacesContext context, String viewId, String renderKitId) { ResponseStateManager rsm = RenderKitUtils.getResponseStateManager(context, renderKitId); Object[] treeStructure; if (hasGetStateMethod(rsm)) { Object[] stateArray = (Object[]) rsm.getState(context, viewId); if (stateArray == null) { // this is necessary as some frameworks may call // ViewHandler.restoreView() for non-postback requests. return null; } treeStructure = (Object[]) stateArray[0]; } else { treeStructure = (Object[]) rsm .getTreeStructureToRestore(context, viewId); } if (treeStructure == null) { return null; } UIViewRoot root = restoreTree(treeStructure); root.setViewId(viewId); return root; }