You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2008/02/22 03:22:49 UTC
svn commit: r630069 -
/myfaces/trinidad/trunk_1.2.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java
Author: arobinson74
Date: Thu Feb 21 18:22:46 2008
New Revision: 630069
URL: http://svn.apache.org/viewvc?rev=630069&view=rev
Log:
Fix for TRINIDAD-955
Added back in the JSF 1.1 deprecated functionality to support JSF
state managers (i.e. facelets)
Modified:
myfaces/trinidad/trunk_1.2.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java
Modified: myfaces/trinidad/trunk_1.2.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk_1.2.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java?rev=630069&r1=630068&r2=630069&view=diff
==============================================================================
--- myfaces/trinidad/trunk_1.2.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java (original)
+++ myfaces/trinidad/trunk_1.2.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java Thu Feb 21 18:22:46 2008
@@ -18,14 +18,14 @@
*/
package org.apache.myfaces.trinidadinternal.application;
+import java.io.IOException;
import java.io.Serializable;
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import java.util.Locale;
+import java.util.Map;
import javax.faces.FactoryFinder;
import javax.faces.application.StateManager;
@@ -38,21 +38,16 @@
import javax.faces.render.RenderKitFactory;
import javax.faces.render.ResponseStateManager;
-import org.apache.myfaces.trinidad.logging.TrinidadLogger;
-
import org.apache.myfaces.trinidad.component.UIXComponentBase;
import org.apache.myfaces.trinidad.context.RequestContext;
-
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
+import org.apache.myfaces.trinidad.util.ExternalContextUtils;
import org.apache.myfaces.trinidadinternal.util.LRUCache;
import org.apache.myfaces.trinidadinternal.util.SubKeyMap;
import org.apache.myfaces.trinidadinternal.util.TokenCache;
-// Imported only for a String constant - so no runtime dependency
import com.sun.facelets.FaceletViewHandler;
-import java.io.IOException;
-import org.apache.myfaces.trinidad.util.ExternalContextUtils;
-
/**
* StateManager that handles a hybrid client/server strategy: a
* SerializedView is stored on the server, and only a small token
@@ -149,6 +144,18 @@
return super.saveView(context);
}
+ @Override @SuppressWarnings("deprecation")
+ public SerializedView saveSerializedView(FacesContext context)
+ {
+ assert(context != null);
+
+ if(isSavingStateInClient(context))
+ {
+ return _saveSerializedView(context);
+ }
+
+ return _delegate.saveSerializedView(context);
+ }
/**
* Save a component tree as an Object.
@@ -240,7 +247,7 @@
return root;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({"unchecked", "deprecation"})
private SerializedView _saveSerializedView(FacesContext context)
{
SerializedView view = _getCachedSerializedView(context);
@@ -454,14 +461,14 @@
}
- @Override
+ @Override @SuppressWarnings("deprecation")
public void writeState(FacesContext context,
SerializedView state) throws IOException
{
_delegate.writeState(context, state);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({"unchecked", "deprecation"})
@Override
public UIViewRoot restoreView(FacesContext context, String viewId,
String renderKitId)
@@ -905,7 +912,7 @@
}
}
-
+ @SuppressWarnings("deprecation")
private SerializedView _getCachedSerializedView(
FacesContext context)
{
@@ -913,7 +920,7 @@
getRequestMap().get(_CACHED_SERIALIZED_VIEW);
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({"unchecked","deprecation"})
private void _saveCachedSerializedView(
FacesContext context, SerializedView state)
{