public void processRestoreState(FacesContext context,
                                    Object state) {
        if (context == null) {
            throw new NullPointerException();
        }

        pushComponentToEL(context, null);

        try {
            Object[] stateStruct = (Object[]) state;
            Object[] childState = (Object[]) stateStruct[CHILD_STATE];

            // Process this component itself
            restoreState(context, stateStruct[MY_STATE]);

            int i = 0;

            // Process all the children of this component
            if (this.getChildCount() > 0) {
                for (UIComponent kid : getChildren()) {
                    if (kid.isTransient()) {
                        continue;
                    }
                    Object currentState = childState[i++];
                    if (currentState == null) {
                        continue;
                    }
                    kid.processRestoreState(context, currentState);
                }
            }

            // process all of the facets of this component
            if (this.getFacetCount() > 0) {
                int facetsSize = getFacets().size();
                int j = 0;
                Object[] facetSaveState;
                String facetName;
                UIComponent facet;
                Object facetState;
                while (j < facetsSize) {
                    if (null != (facetSaveState = (Object[]) childState[i++])) {
                        facetName = (String) facetSaveState[0];
                        facetState = facetSaveState[1];
                        facet = getFacets().get(facetName);
                        facet.processRestoreState(context, facetState);
                    }
                    ++j;
                }
            }
        } finally {
            popComponentFromEL(context);
        }
    }
public void processRestoreState ( FacesContext context , Object state ) { if ( context == null ) { throw new NullPointerException ( ) ; } pushComponentToEL ( context , null ) ; try { Object [ ] stateStruct = ( Object [ ] ) state ; Object [ ] childState = ( Object [ ] ) stateStruct [ CHILD_STATE ] ; restoreState ( context , stateStruct [ MY_STATE ] ) ; int i = 0 ; if ( this . getChildCount ( ) > 0 ) { for ( UIComponent kid : getChildren ( ) ) { if ( kid . isTransient ( ) ) { continue ; } Object currentState = childState [ i ++ ] ; if ( currentState == null ) { continue ; } kid . processRestoreState ( context , currentState ) ; } } if ( this . getFacetCount ( ) > 0 ) { int facetsSize = getFacets ( ) . size ( ) ; int j = 0 ; Object [ ] facetSaveState ; String facetName ; UIComponent facet ; Object facetState ; while ( j < facetsSize ) { if ( null != ( facetSaveState = ( Object [ ] ) childState [ i ++ ] ) ) { facetName = ( String ) facetSaveState [ 0 ] ; facetState = facetSaveState [ 1 ] ; facet = getFacets ( ) . get ( facetName ) ; facet . processRestoreState ( context , facetState ) ; } ++ j ; } } } finally { popComponentFromEL ( context ) ; } }
@throws NullPointerException {@inheritDoc}