public Object getState(FacesContext context, String viewId) {
	Object stateArray[] = { getTreeStructureToRestore(context, viewId),
				getComponentStateToRestore(context) };
	return stateArray;
    }
public Object getState ( FacesContext context , String viewId ) { Object stateArray [ ] = { getTreeStructureToRestore ( context , viewId ) , getComponentStateToRestore ( context ) } ; return stateArray ; }
<p><span class="changed_modified_2_2">The</span> 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 class="changed_added_2_2">If the state saving method for this
application is {@link
javax.faces.application.StateManager#STATE_SAVING_METHOD_CLIENT},
<code>writeState()</code> will have encrypted the state in a tamper
evident manner.  If the state fails to decrypt, or decrypts but
indicates evidence of tampering, a
{@link javax.faces.application.ProtectedViewException} must be thrown.</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>.