Author: awiner
Date: Fri May 26 13:46:13 2006
New Revision: 409743

URL: http://svn.apache.org/viewvc?rev=409743&view=rev
Log:
Add configuration option to disable the View Root Caching optimization for 
ADFFACES-14,
<t:saveState> tomahawk component doesn't work with ADF Faces.

Modified:
    
incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/application/StateManagerImpl.java

Modified: 
incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/application/StateManagerImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/application/StateManagerImpl.java?rev=409743&r1=409742&r2=409743&view=diff
==============================================================================
--- 
incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/application/StateManagerImpl.java
 (original)
+++ 
incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/application/StateManagerImpl.java
 Fri May 26 13:46:13 2006
@@ -232,6 +232,13 @@
         // Sadly, we can't save just a SerializedView, because we should
         // save a serialized object, and SerializedView is a *non*-static
         // inner class of StateManager
+        PageState pageState = new PageState(
+            structure,
+            state,
+            // Save the view root into the page state as a transient
+            // if this feature has not been disabled
+            _useViewRootCache(context) ? root : null);
+
         token = cache.addNewEntry(new PageState(structure, state, root),
                                   stateMap);
       }
@@ -355,12 +362,7 @@
 
       _LOG.fine("Successfully found view state for token {0}", token);
 
-      UIViewRoot root;
-      if (_useViewRootCache(context))
-        root = viewState.popRoot(); // bug 4712492
-      else
-        root = null;
-
+      UIViewRoot root = viewState.popRoot(); // bug 4712492
       if (root != null)
       {
         _LOG.finer("UIViewRoot for token {0} already exists. Bypassing 
restoreState", token);


Reply via email to