code: @Override
      public void processRestoreState(FacesContext context, Object state) {
  
          // hack to work around older state managers that may not set the
          // view root early enough
          if (context.getViewRoot() == null) {
              context.setViewRoot(this);
          }
          super.processRestoreState(context, state);
  
      }
docs: <p class="changed_added_2_0"><span
  class="changed_deleted_2_0_rev_a">The</span> default
  implementation must call {@link
  UIComponentBase#processRestoreState} from within a
  <code>try</code> block.  The <code>try</code> block must have a
  <code>finally</code> block that ensures that no {@link
  FacesEvent}s remain in the event queue. <a
  class="changed_deleted_2_0_rev_a" title="text removed in 2.0 Rev a: and that the this.visitTree is called, passing a ContextCallback that takes the following action: call the processEvent method of the current component. The argument event must be an instance of PostRestoreStateEvent whose component property is the current component in the traversal.">&nbsp;&nbsp;&nbsp;</a> </p>
  @param context the <code>FacesContext</code> for this requets
  @param state the opaque state object obtained from the {@link
  javax.faces.application.StateManager}