Seam SVN: r14254 - branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2011-12-22 16:07:46 -0500 (Thu, 22 Dec 2011)
New Revision: 14254
Modified:
branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamViewHandler.java
Log:
JBSEAM-4652, JBSEAM-4639 fixed SeamViewHandler.restoreView()
implementation for JSF2 processing
Modified: branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamViewHandler.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamViewHandler.java 2011-12-16 11:44:51 UTC (rev 14253)
+++ branches/community/Seam_2_3/jboss-seam-jsf2/src/main/java/org/jboss/seam/jsf/SeamViewHandler.java 2011-12-22 21:07:46 UTC (rev 14254)
@@ -7,6 +7,7 @@
import javax.faces.FacesException;
import javax.faces.application.ViewHandler;
+import javax.faces.application.ViewHandlerWrapper;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.view.ViewDeclarationLanguage;
@@ -23,44 +24,9 @@
* @author Gavin King
*
*/
-public class SeamViewHandler extends ViewHandler
+public class SeamViewHandler extends ViewHandlerWrapper
{
- @Override
- public String deriveLogicalViewId(FacesContext context, String rawViewId)
- {
- // TODO Auto-generated method stub
- return super.deriveLogicalViewId(context, rawViewId);
- }
-
- @Override
- public String deriveViewId(FacesContext context, String rawViewId)
- {
- // TODO Auto-generated method stub
- return super.deriveViewId(context, rawViewId);
- }
-
- @Override
- public String getBookmarkableURL(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams)
- {
- // TODO Auto-generated method stub
- return super.getBookmarkableURL(context, viewId, parameters, includeViewParams);
- }
-
- @Override
- public String getRedirectURL(FacesContext context, String viewId, Map<String, List<String>> parameters, boolean includeViewParams)
- {
- // TODO Auto-generated method stub
- return super.getRedirectURL(context, viewId, parameters, includeViewParams);
- }
-
- @Override
- public ViewDeclarationLanguage getViewDeclarationLanguage(FacesContext context, String viewId)
- {
- // TODO Auto-generated method stub
- return super.getViewDeclarationLanguage(context, viewId);
- }
-
private ViewHandler viewHandler;
public SeamViewHandler(ViewHandler viewHandler)
@@ -128,7 +94,9 @@
@Override
public UIViewRoot restoreView(FacesContext ctx, String viewId)
{
- return viewHandler.restoreView(ctx, viewId);
+ UIViewRoot viewRoot =viewHandler.restoreView(ctx, viewId);
+ viewRoot.setViewId(viewHandler.deriveViewId(ctx,viewId));
+ return viewRoot;
}
@Override
@@ -137,4 +105,10 @@
viewHandler.writeState(ctx);
}
+ @Override
+ public ViewHandler getWrapped()
+ {
+ return viewHandler;
+ }
+
}