myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject svn commit: r642685 - in /myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr: PPRLifecycle.java PPRLifecycleFactory.java PPRLifecycleWrapper.java PPRViewRootWrapper.java
Date Sun, 30 Mar 2008 05:15:23 GMT
Author: imario
Date: Sat Mar 29 22:15:22 2008
New Revision: 642685

URL: http://svn.apache.org/viewvc?rev=642685&view=rev
Log:
Renamed PPRLifecycle, changed way how to deal with facesContext in PPRViewRootWrapper - now
again use the passed in context - which means we have to ensure the FacesContextWrapper is
JSF 1.2 able.

Added:
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRLifecycleWrapper.java
      - copied, changed from r642555, myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRLifecycle.java
Removed:
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRLifecycle.java
Modified:
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRLifecycleFactory.java
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRViewRootWrapper.java

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRLifecycleFactory.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRLifecycleFactory.java?rev=642685&r1=642684&r2=642685&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRLifecycleFactory.java
(original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRLifecycleFactory.java
Sat Mar 29 22:15:22 2008
@@ -8,13 +8,13 @@
 {
     private final LifecycleFactory delegate;
 
-    private final PPRLifecycle pprLifecycle;
+    private final PPRLifecycleWrapper pprLifecycle;
 
     public PPRLifecycleFactory(LifecycleFactory delegate)
     {
         this.delegate = delegate;
 
-        pprLifecycle = new PPRLifecycle(this.delegate.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE));
+        pprLifecycle = new PPRLifecycleWrapper(this.delegate.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE));
     }
     
     public void addLifecycle(String lifecycleId, Lifecycle lifecycle)

Copied: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRLifecycleWrapper.java
(from r642555, myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRLifecycle.java)
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRLifecycleWrapper.java?p2=myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRLifecycleWrapper.java&p1=myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRLifecycle.java&r1=642555&r2=642685&rev=642685&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRLifecycle.java
(original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRLifecycleWrapper.java
Sat Mar 29 22:15:22 2008
@@ -24,11 +24,11 @@
 import javax.faces.event.PhaseListener;
 import javax.faces.lifecycle.Lifecycle;
 
-public class PPRLifecycle extends Lifecycle
+public class PPRLifecycleWrapper extends Lifecycle
 {
     private final Lifecycle delegate;
 
-    public PPRLifecycle(Lifecycle delegate)
+    public PPRLifecycleWrapper(Lifecycle delegate)
     {
         this.delegate = delegate;
     }
@@ -52,7 +52,7 @@
                         return null;
                     }
 
-                    return new PPRViewRootWrapper(context, viewRoot);
+                    return new PPRViewRootWrapper(viewRoot);
                 }
             };
 

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRViewRootWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRViewRootWrapper.java?rev=642685&r1=642684&r2=642685&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRViewRootWrapper.java
(original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ppr/PPRViewRootWrapper.java
Sat Mar 29 22:15:22 2008
@@ -36,12 +36,10 @@
 public class PPRViewRootWrapper extends UIViewRoot
 {
     private final UIViewRoot delegateViewRoot;
-    private final FacesContext delegateFacesContext;
 
-    public PPRViewRootWrapper(FacesContext delegateFacesContext, UIViewRoot delegateViewRoot)
+    public PPRViewRootWrapper(UIViewRoot delegateViewRoot)
     {
         this.delegateViewRoot = delegateViewRoot;
-        this.delegateFacesContext = delegateFacesContext;
     }
 
     public boolean getRendersChildren()
@@ -77,16 +75,16 @@
 
     public void processDecodes(FacesContext context)
     {
-        delegateViewRoot.processDecodes(delegateFacesContext);
+        delegateViewRoot.processDecodes(context);
     }
 
     public void processValidators(FacesContext context)
     {
-        Map requestMap = delegateFacesContext.getExternalContext().getRequestMap();
+        Map requestMap = context.getExternalContext().getRequestMap();
         List allProcessComponents = (List) requestMap.get(PPRSupport.PROCESS_COMPONENTS);
         if (allProcessComponents != null)
         {
-            invokeOnComponents(delegateFacesContext, allProcessComponents, new ContextCallback()
+            invokeOnComponents(context, allProcessComponents, new ContextCallback()
             {
                 public void invokeContextCallback(FacesContext context, UIComponent target)
                 {
@@ -96,7 +94,7 @@
         }
         else
         {
-            delegateViewRoot.processValidators(delegateFacesContext);
+            delegateViewRoot.processValidators(context);
         }
     }
 
@@ -107,7 +105,7 @@
         {
             String componentId = (String) iterComponents.next();
 
-            UIComponent component = delegateFacesContext.getViewRoot().findComponent(componentId);
+            UIComponent component = context.getViewRoot().findComponent(componentId);
             if (component instanceof UIComponentPerspective)
             {
                 UIComponentPerspective uiComponentPerspective = (UIComponentPerspective)
component;
@@ -115,7 +113,7 @@
                 {
                     public Object execute(FacesContext context, UIComponent component)
                     {
-                        contextCallback.invokeContextCallback(delegateFacesContext, component);
+                        contextCallback.invokeContextCallback(context, component);
                         return null;
                     }
                 };
@@ -123,18 +121,18 @@
             }
             else
             {
-                contextCallback.invokeContextCallback(delegateFacesContext, component);
+                contextCallback.invokeContextCallback(context, component);
             }
         }
     }
 
     public void processUpdates(FacesContext context)
     {
-        Map requestMap = delegateFacesContext.getExternalContext().getRequestMap();
+        Map requestMap = context.getExternalContext().getRequestMap();
         List allProcessComponents = (List) requestMap.get(PPRSupport.PROCESS_COMPONENTS);
         if (allProcessComponents != null)
         {
-            invokeOnComponents(delegateFacesContext, allProcessComponents, new ContextCallback()
+            invokeOnComponents(context, allProcessComponents, new ContextCallback()
             {
                 public void invokeContextCallback(FacesContext context, UIComponent target)
                 {
@@ -144,19 +142,19 @@
         }
         else
         {
-            delegateViewRoot.processUpdates(delegateFacesContext);
+            delegateViewRoot.processUpdates(context);
         }
     }
 
     public void processApplication(FacesContext context)
     {
-        delegateViewRoot.processApplication(delegateFacesContext);
+        delegateViewRoot.processApplication(context);
     }
 
     public void encodeBegin(FacesContext context)
         throws java.io.IOException
     {
-        delegateViewRoot.encodeBegin(delegateFacesContext);
+        delegateViewRoot.encodeBegin(context);
     }
 
     /* Provides a unique id for this component instance.
@@ -199,12 +197,12 @@
 
     public Object saveState(FacesContext context)
     {
-        return delegateViewRoot.saveState(delegateFacesContext);
+        return delegateViewRoot.saveState(context);
     }
 
     public void restoreState(FacesContext context, Object state)
     {
-        delegateViewRoot.restoreState(delegateFacesContext, state);
+        delegateViewRoot.restoreState(context, state);
     }
 
     public Map getAttributes()
@@ -224,7 +222,7 @@
 
     public String getClientId(FacesContext context)
     {
-        return delegateViewRoot.getClientId(delegateFacesContext);
+        return delegateViewRoot.getClientId(context);
     }
 
     public String getId()
@@ -275,29 +273,29 @@
 
     public void decode(FacesContext context)
     {
-        delegateViewRoot.decode(delegateFacesContext);
+        delegateViewRoot.decode(context);
     }
 
     public void encodeChildren(FacesContext context)
         throws IOException
     {
-        delegateViewRoot.encodeChildren(delegateFacesContext);
+        delegateViewRoot.encodeChildren(context);
     }
 
     public void encodeEnd(FacesContext context)
         throws IOException
     {
-        delegateViewRoot.encodeEnd(delegateFacesContext);
+        delegateViewRoot.encodeEnd(context);
     }
 
     public Object processSaveState(FacesContext context)
     {
-        return delegateViewRoot.processSaveState(delegateFacesContext);
+        return delegateViewRoot.processSaveState(context);
     }
 
     public void processRestoreState(FacesContext context, Object state)
     {
-        delegateViewRoot.processRestoreState(delegateFacesContext, state);
+        delegateViewRoot.processRestoreState(context, state);
     }
 
     public boolean isTransient()



Mime
View raw message