if (isPostBack) {
// try to restore the view
ViewHandler viewHandler = Util.getViewHandler(facesContext);
if (null == (viewRoot =
viewHandler.restoreView(facesContext, viewId))) {
JSFVersionTracker tracker =
getAssociate(facesContext).getJSFVersionTracker();
// The tracker will be null if the user turned off the
// version tracking feature.
if (null != tracker) {
// Get the versions of the current ViewHandler and
// StateManager. If they are older than the current
// version of the implementation, fall back to the
// JSF 1.1 behavior.
// NOTE: The ViewHandler or StateManager could
// be registered using something other than
// the faces-config.xml, if this is the case,
// the assume that we're using a 1.2 implementation.
boolean viewHandlerIsOld;
boolean stateManagerIsOld;
Version toTest = tracker.
getVersionForTrackedClassName(viewHandler
.getClass().getName());
if (toTest != null) {
Version currentVersion = tracker.getCurrentVersion();
viewHandlerIsOld = (toTest.compareTo(currentVersion) < 0);
toTest = tracker.
getVersionForTrackedClassName(facesContext
.getApplication().getStateManager()
.getClass().getName());
stateManagerIsOld = (toTest.compareTo(currentVersion) < 0);
} else {