tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r332477 [2/2] - in /jakarta/tapestry/trunk: ./ .settings/ contrib/src/java/org/apache/tapestry/contrib/ajax/ contrib/src/java/org/apache/tapestry/contrib/inspector/ contrib/src/java/org/apache/tapestry/contrib/palette/ examples/Workbench/sr...
Date Fri, 11 Nov 2005 07:07:01 GMT
Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/InfrastructureImpl.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/InfrastructureImpl.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/InfrastructureImpl.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/InfrastructureImpl.java Thu Nov 10 23:06:29 2005
@@ -26,6 +26,7 @@
 import org.apache.hivemind.Resource;
 import org.apache.hivemind.service.ThreadLocale;
 import org.apache.hivemind.util.Defense;
+import org.apache.tapestry.IRequestCycle;
 import org.apache.tapestry.asset.AssetFactory;
 import org.apache.tapestry.coerce.ValueConverter;
 import org.apache.tapestry.describe.HTMLDescriber;
@@ -50,7 +51,7 @@
 import org.apache.tapestry.services.LinkFactory;
 import org.apache.tapestry.services.ObjectPool;
 import org.apache.tapestry.services.RequestCycleFactory;
-import org.apache.tapestry.services.ResetEventCoordinator;
+import org.apache.tapestry.services.ResetEventHub;
 import org.apache.tapestry.services.ResponseRenderer;
 import org.apache.tapestry.services.ServiceMap;
 import org.apache.tapestry.services.TemplateSource;
@@ -182,9 +183,9 @@
         return (RequestExceptionReporter) getProperty("requestExceptionReporter");
     }
 
-    public ResetEventCoordinator getResetEventCoordinator()
+    public ResetEventHub getResetEventHub()
     {
-        return (ResetEventCoordinator) getProperty("resetEventCoordinator");
+        return (ResetEventHub) getProperty("resetEventHub");
     }
 
     public WebResponse getResponse()
@@ -276,6 +277,11 @@
     public ClassFinder getClassFinder()
     {
         return (ClassFinder) getProperty("classFinder");
+    }
+
+    public IRequestCycle getRequestCycle()
+    {
+        return (IRequestCycle) getProperty("requestCycle");
     }
 
     public Object getProperty(String propertyName)

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/LinkFactoryImpl.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/LinkFactoryImpl.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/LinkFactoryImpl.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/LinkFactoryImpl.java Thu Nov 10 23:06:29 2005
@@ -65,6 +65,8 @@
 
     private WebRequest _request;
 
+    private IRequestCycle _requestCycle;
+
     private PropertyPersistenceStrategySource _persistenceStrategySource;
 
     public void initializeService()
@@ -94,14 +96,13 @@
 
     }
 
-    public ILink constructLink(IRequestCycle cycle, boolean post, Map parameters, boolean stateful)
+    public ILink constructLink(boolean post, Map parameters, boolean stateful)
     {
-        Defense.notNull(cycle, "cycle");
         Defense.notNull(parameters, "parameters");
 
         squeezeServiceParameters(parameters);
 
-        IEngine engine = cycle.getEngine();
+        IEngine engine = _requestCycle.getEngine();
 
         ServiceEncoding serviceEncoding = createServiceEncoding(parameters);
 
@@ -109,15 +110,12 @@
         // into the link.
 
         if (stateful)
-            _persistenceStrategySource.addParametersForPersistentProperties(
-                    serviceEncoding,
-                    cycle,
-                    post);
+            _persistenceStrategySource.addParametersForPersistentProperties(serviceEncoding, post);
 
         String fullServletPath = _contextPath + serviceEncoding.getServletPath();
 
-        return new EngineServiceLink(cycle, fullServletPath, engine.getOutputEncoding(), _codec,
-                _request, parameters, stateful);
+        return new EngineServiceLink(_requestCycle, fullServletPath, engine.getOutputEncoding(),
+                _codec, _request, parameters, stateful);
     }
 
     public ServiceEncoder[] getServiceEncoders()
@@ -226,5 +224,10 @@
             PropertyPersistenceStrategySource persistenceStrategySource)
     {
         _persistenceStrategySource = persistenceStrategySource;
+    }
+
+    public void setRequestCycle(IRequestCycle requestCycle)
+    {
+        _requestCycle = requestCycle;
     }
 }

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/RequestCycleFactoryImpl.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/RequestCycleFactoryImpl.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/RequestCycleFactoryImpl.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/RequestCycleFactoryImpl.java Thu Nov 10 23:06:29 2005
@@ -34,6 +34,7 @@
 import org.apache.tapestry.services.AbsoluteURLBuilder;
 import org.apache.tapestry.services.Infrastructure;
 import org.apache.tapestry.services.RequestCycleFactory;
+import org.apache.tapestry.services.RequestGlobals;
 import org.apache.tapestry.services.ServiceConstants;
 import org.apache.tapestry.util.QueryParameterMap;
 import org.apache.tapestry.web.WebRequest;
@@ -61,13 +62,12 @@
 
     private RequestCycleEnvironment _environment;
 
-    private HttpServletRequest _servletRequest;
-
-    private HttpServletResponse _servletResponse;
+    private RequestGlobals _requestGlobals;
 
     public void initializeService()
     {
-        RequestContext context = new RequestContext(_servletRequest, _servletResponse);
+        RequestContext context = new RequestContext(_requestGlobals.getRequest(), _requestGlobals
+                .getResponse());
 
         _environment = new RequestCycleEnvironment(_errorHandler, _infrastructure, context,
                 _strategySource, _absoluteURLBuilder);
@@ -85,7 +85,12 @@
 
         String serviceName = findService(parameters);
 
-        return new RequestCycle(engine, parameters, serviceName, monitor, _environment);
+        IRequestCycle cycle = new RequestCycle(engine, parameters, serviceName, monitor,
+                _environment);
+
+        _requestGlobals.store(cycle);
+
+        return cycle;
     }
 
     private String findService(QueryParameterMap parameters)
@@ -165,13 +170,8 @@
         _absoluteURLBuilder = absoluteURLBuilder;
     }
 
-    public void setServletRequest(HttpServletRequest servletRequest)
-    {
-        _servletRequest = servletRequest;
-    }
-
-    public void setServletResponse(HttpServletResponse servletResponse)
+    public void setRequestGlobals(RequestGlobals requestGlobals)
     {
-        _servletResponse = servletResponse;
+        _requestGlobals = requestGlobals;
     }
 }

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/RequestGlobalsImpl.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/RequestGlobalsImpl.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/RequestGlobalsImpl.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/RequestGlobalsImpl.java Thu Nov 10 23:06:29 2005
@@ -17,6 +17,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.tapestry.IRequestCycle;
 import org.apache.tapestry.services.RequestGlobals;
 import org.apache.tapestry.web.WebRequest;
 import org.apache.tapestry.web.WebResponse;
@@ -38,6 +39,8 @@
 
     private HttpServletResponse _response;
 
+    private IRequestCycle _requestCycle;
+
     public WebRequest getWebRequest()
     {
         return _webRequest;
@@ -68,5 +71,15 @@
     {
         _request = request;
         _response = response;
+    }
+
+    public IRequestCycle getRequestCycle()
+    {
+        return _requestCycle;
+    }
+
+    public void store(IRequestCycle cycle)
+    {
+        _requestCycle = cycle;
     }
 }

Copied: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/ResetEventHubImpl.java (from r329587, jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/ResetEventCoordinatorImpl.java)
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/ResetEventHubImpl.java?p2=jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/ResetEventHubImpl.java&p1=jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/ResetEventCoordinatorImpl.java&r1=329587&r2=332477&rev=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/ResetEventCoordinatorImpl.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/ResetEventHubImpl.java Thu Nov 10 23:06:29 2005
@@ -18,16 +18,16 @@
 
 import org.apache.hivemind.util.EventListenerList;
 import org.apache.tapestry.event.ResetEventListener;
-import org.apache.tapestry.services.ResetEventCoordinator;
+import org.apache.tapestry.services.ResetEventHub;
 
 /**
- * Implementation of the <code>tapestry.ResetEventCoordinator</code>
+ * Implementation of the <code>tapestry.ResetEventHub</code>
  * service.
  *
  * @author Howard Lewis Ship
  * @since 4.0
  */
-public class ResetEventCoordinatorImpl implements ResetEventCoordinator
+public class ResetEventHubImpl implements ResetEventHub
 {
     private EventListenerList _listeners = new EventListenerList();
 

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/TemplateSourceImpl.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/TemplateSourceImpl.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/TemplateSourceImpl.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/services/impl/TemplateSourceImpl.java Thu Nov 10 23:06:29 2005
@@ -287,7 +287,7 @@
     private ComponentTemplate readTemplateFromAsset(IRequestCycle cycle, IComponent component,
             IAsset asset)
     {
-        InputStream stream = asset.getResourceAsStream(cycle);
+        InputStream stream = asset.getResourceAsStream();
 
         char[] templateData = null;
 

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/util/PageRenderSupportImpl.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/util/PageRenderSupportImpl.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/util/PageRenderSupportImpl.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/util/PageRenderSupportImpl.java Thu Nov 10 23:06:29 2005
@@ -169,7 +169,7 @@
 
             IAsset asset = _assetFactory.createAsset(scriptLocation, null);
 
-            String url = asset.buildURL(cycle);
+            String url = asset.buildURL();
 
             // Note: important to use begin(), not beginEmpty(), because browser don't
             // interpret <script .../> properly.

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/wml/Image.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/wml/Image.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/wml/Image.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/wml/Image.java Thu Nov 10 23:06:29 2005
@@ -42,7 +42,7 @@
         {
             writer.beginEmpty("img");
 
-            writer.attribute("src", getImage().buildURL(cycle));
+            writer.attribute("src", getImage().buildURL());
 
             writer.attribute("alt", getAlt());
 

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/BaseComponentTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/BaseComponentTestCase.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/BaseComponentTestCase.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/BaseComponentTestCase.java Thu Nov 10 23:06:29 2005
@@ -292,7 +292,7 @@
 
     protected void trainBuildURL(IAsset asset, IRequestCycle cycle, String URL)
     {
-        asset.buildURL(cycle);
+        asset.buildURL();
 
         setReturnValue(asset, URL);
     }
@@ -361,19 +361,19 @@
     protected void trainGetLink(IEngineService service, IRequestCycle cycle, boolean post,
             Object parameter, ILink link)
     {
-        service.getLink(cycle, post, parameter);
+        service.getLink(post, parameter);
         setReturnValue(service, link);
     }
 
     protected void trainGetLinkCheckIgnoreParameter(IEngineService service, IRequestCycle cycle,
             boolean post, Object parameter, ILink link)
     {
-        service.getLink(cycle, post, parameter);
+        service.getLink(post, parameter);
 
         ArgumentMatcher ignore = new IgnoreMatcher();
 
         getControl(service).setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[]
-        { null, null, ignore, null }));
+        { null, ignore, null }));
 
         setReturnValue(service, link);
     }

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/ServiceTestCase.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/ServiceTestCase.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/ServiceTestCase.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/ServiceTestCase.java Thu Nov 10 23:06:29 2005
@@ -126,7 +126,7 @@
     {
         LinkFactory lf = (LinkFactory) newMock(LinkFactory.class);
 
-        lf.constructLink(cycle, false, parameters, stateful);
+        lf.constructLink(false, parameters, stateful);
 
         setReturnValue(lf, link);
 

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestActionService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestActionService.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestActionService.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestActionService.java Thu Nov 10 23:06:29 2005
@@ -77,7 +77,7 @@
         MockControl lfc = newControl(LinkFactory.class);
         LinkFactory lf = (LinkFactory) lfc.getMock();
 
-        lf.constructLink(cycle, false, parameters, true);
+        lf.constructLink(false, parameters, true);
         lfc.setReturnValue(link);
 
         replayControls();
@@ -85,14 +85,15 @@
         ActionService as = new ActionService();
         as.setLinkFactory(lf);
         as.setRequest(request);
+        as.setRequestCycle(cycle);
 
         ActionServiceParameter p = new ActionServiceParameter(component, "action-id");
 
-        assertSame(link, as.getLink(cycle, false, p));
+        assertSame(link, as.getLink(false, p));
 
         verifyControls();
     }
-    
+
     public void testGetLinkSimplePost()
     {
         MockControl componentc = newControl(IComponent.class);
@@ -129,7 +130,7 @@
         MockControl lfc = newControl(LinkFactory.class);
         LinkFactory lf = (LinkFactory) lfc.getMock();
 
-        lf.constructLink(cycle, true, parameters, true);
+        lf.constructLink(true, parameters, true);
         lfc.setReturnValue(link);
 
         replayControls();
@@ -137,12 +138,13 @@
         ActionService as = new ActionService();
         as.setLinkFactory(lf);
         as.setRequest(request);
+        as.setRequestCycle(cycle);
 
         ActionServiceParameter p = new ActionServiceParameter(component, "action-id");
 
-        assertSame(link, as.getLink(cycle, true, p));
+        assertSame(link, as.getLink(true, p));
 
-        verifyControls();      
+        verifyControls();
     }
 
     public void testGetLinkComplex()
@@ -181,7 +183,7 @@
         MockControl lfc = newControl(LinkFactory.class);
         LinkFactory lf = (LinkFactory) lfc.getMock();
 
-        lf.constructLink(cycle, false, parameters, true);
+        lf.constructLink(false, parameters, true);
         lfc.setReturnValue(link);
 
         replayControls();
@@ -189,10 +191,11 @@
         ActionService as = new ActionService();
         as.setLinkFactory(lf);
         as.setRequest(request);
+        as.setRequestCycle(cycle);
 
         ActionServiceParameter p = new ActionServiceParameter(component, "action-id");
 
-        assertSame(link, as.getLink(cycle, false, p));
+        assertSame(link, as.getLink(false, p));
 
         verifyControls();
     }

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestDirectService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestDirectService.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestDirectService.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestDirectService.java Thu Nov 10 23:06:29 2005
@@ -77,7 +77,7 @@
 
         ILink link = newLink();
 
-        lf.constructLink(cycle, false, parameters, true);
+        lf.constructLink(false, parameters, true);
         lfc.setReturnValue(link);
 
         replayControls();
@@ -86,12 +86,13 @@
 
         ds.setLinkFactory(lf);
         ds.setRequest(request);
+        ds.setRequestCycle(cycle);
 
-        assertSame(link, ds.getLink(cycle, false, new DirectServiceParameter(c, serviceParameters)));
+        assertSame(link, ds.getLink(false, new DirectServiceParameter(c, serviceParameters)));
 
         verifyControls();
     }
-    
+
     public void testGetLinkOnSamePageForPost()
     {
         IPage page = newPage("ThePage");
@@ -129,7 +130,7 @@
 
         ILink link = newLink();
 
-        lf.constructLink(cycle, true, parameters, true);
+        lf.constructLink(true, parameters, true);
         lfc.setReturnValue(link);
 
         replayControls();
@@ -138,8 +139,9 @@
 
         ds.setLinkFactory(lf);
         ds.setRequest(request);
+        ds.setRequestCycle(cycle);
 
-        assertSame(link, ds.getLink(cycle, true, new DirectServiceParameter(c, serviceParameters)));
+        assertSame(link, ds.getLink(true, new DirectServiceParameter(c, serviceParameters)));
 
         verifyControls();
     }
@@ -180,7 +182,7 @@
 
         ILink link = newLink();
 
-        lf.constructLink(cycle, false, parameters, true);
+        lf.constructLink(false, parameters, true);
         lfc.setReturnValue(link);
 
         replayControls();
@@ -188,8 +190,9 @@
         DirectService ds = new DirectService();
         ds.setLinkFactory(lf);
         ds.setRequest(request);
+        ds.setRequestCycle(cycle);
 
-        assertSame(link, ds.getLink(cycle, false, new DirectServiceParameter(c, serviceParameters)));
+        assertSame(link, ds.getLink(false, new DirectServiceParameter(c, serviceParameters)));
 
         verifyControls();
     }
@@ -230,7 +233,7 @@
 
         ILink link = newLink();
 
-        lf.constructLink(cycle, false, parameters, true);
+        lf.constructLink(false, parameters, true);
         lfc.setReturnValue(link);
 
         replayControls();
@@ -238,8 +241,9 @@
         DirectService ds = new DirectService();
         ds.setLinkFactory(lf);
         ds.setRequest(request);
+        ds.setRequestCycle(cycle);
 
-        assertSame(link, ds.getLink(cycle, false, new DirectServiceParameter(c, serviceParameters)));
+        assertSame(link, ds.getLink(false, new DirectServiceParameter(c, serviceParameters)));
 
         verifyControls();
     }

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestExternalService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestExternalService.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestExternalService.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestExternalService.java Thu Nov 10 23:06:29 2005
@@ -61,9 +61,7 @@
 
         ILink link = (ILink) newMock(ILink.class);
 
-        IRequestCycle cycle = (IRequestCycle) newMock(IRequestCycle.class);
-
-        lf.constructLink(cycle, false, parameters, true);
+        lf.constructLink(false, parameters, true);
         lfc.setReturnValue(link);
 
         replayControls();
@@ -73,7 +71,7 @@
 
         ExternalServiceParameter p = new ExternalServiceParameter("ActivePage", serviceParameters);
 
-        assertSame(link, es.getLink(cycle, false, p));
+        assertSame(link, es.getLink(false, p));
 
         verifyControls();
     }

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestPageService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestPageService.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestPageService.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestPageService.java Thu Nov 10 23:06:29 2005
@@ -41,9 +41,7 @@
         MockControl lfc = newControl(LinkFactory.class);
         LinkFactory lf = (LinkFactory) lfc.getMock();
 
-        IRequestCycle cycle = newCycle();
-
-        lf.constructLink(cycle, false, parameters, true);
+        lf.constructLink(false, parameters, true);
         lfc.setReturnValue(link);
 
         replayControls();
@@ -51,7 +49,7 @@
         PageService ps = new PageService();
         ps.setLinkFactory(lf);
 
-        assertSame(link, ps.getLink(cycle, false, "TargetPage"));
+        assertSame(link, ps.getLink(false, "TargetPage"));
 
         verifyControls();
     }

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestResetService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestResetService.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestResetService.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/engine/TestResetService.java Thu Nov 10 23:06:29 2005
@@ -59,8 +59,9 @@
 
         ResetService s = new ResetService();
         s.setLinkFactory(lf);
+        s.setRequestCycle(cycle);
 
-        assertSame(link, s.getLink(cycle, false, null));
+        assertSame(link, s.getLink(false, null));
 
         verifyControls();
     }
@@ -71,7 +72,7 @@
 
         try
         {
-            s.getLink(null, false, "NonNullValue");
+            s.getLink(false, "NonNullValue");
             unreachable();
         }
         catch (IllegalArgumentException ex)

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/FormSupportTest.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/FormSupportTest.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/FormSupportTest.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/FormSupportTest.java Thu Nov 10 23:06:29 2005
@@ -699,7 +699,7 @@
         writer.println();
 
         trainHiddenBlock(writer, "fred", "");
-        
+
         nested.close();
 
         writer.end();
@@ -719,7 +719,6 @@
     public void testRewindExtraReservedIds()
     {
         IMarkupWriter writer = newWriter();
-        NestedMarkupWriter nested = newNestedWriter();
         IRequestCycle cycle = newCycle();
         IEngine engine = newEngine(getClassResolver());
         IValidationDelegate delegate = newDelegate();
@@ -1052,7 +1051,7 @@
         writer.println();
 
         trainHiddenBlock(writer, "fred", "barney");
-        
+
         nested.close();
 
         writer.end();

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/TestImageSubmit.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/TestImageSubmit.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/TestImageSubmit.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/TestImageSubmit.java Thu Nov 10 23:06:29 2005
@@ -40,7 +40,7 @@
         MockControl control = newControl(IAsset.class);
         IAsset asset = (IAsset) control.getMock();
 
-        asset.buildURL(cycle);
+        asset.buildURL();
         control.setReturnValue(imageURL);
 
         return asset;

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/mock/c21/NameMismatchService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/mock/c21/NameMismatchService.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/mock/c21/NameMismatchService.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/mock/c21/NameMismatchService.java Thu Nov 10 23:06:29 2005
@@ -23,7 +23,7 @@
 public class NameMismatchService implements IEngineService
 {
 
-    public ILink getLink(IRequestCycle cycle, boolean post, Object parameter)
+    public ILink getLink(boolean post, Object parameter)
     {
         return null;
     }

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/mock/c21/PrivateService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/mock/c21/PrivateService.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/mock/c21/PrivateService.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/junit/mock/c21/PrivateService.java Thu Nov 10 23:06:29 2005
@@ -33,7 +33,7 @@
     {
     }
 
-    public ILink getLink(IRequestCycle cycle, boolean post, Object parameter)
+    public ILink getLink(boolean post, Object parameter)
     {
         return null;
     }

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/link/DefaultLinkRendererTest.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/link/DefaultLinkRendererTest.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/link/DefaultLinkRendererTest.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/link/DefaultLinkRendererTest.java Thu Nov 10 23:06:29 2005
@@ -150,7 +150,6 @@
         NestedMarkupWriter nested = newNestedWriter();
         IRequestCycle cycle = newCycle();
         ILinkComponent component = newComponent();
-        Location l = newLocation();
         ILink link = newLink();
 
         trainGetAttribute(cycle, Tapestry.LINK_COMPONENT_ATTRIBUTE_NAME, null);

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/record/TestClientPropertyPersistenceStrategy.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/record/TestClientPropertyPersistenceStrategy.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/record/TestClientPropertyPersistenceStrategy.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/record/TestClientPropertyPersistenceStrategy.java Thu Nov 10 23:06:29 2005
@@ -107,7 +107,6 @@
         MockControl requestc = newControl(WebRequest.class);
         WebRequest request = (WebRequest) requestc.getMock();
 
-        IRequestCycle cycle = (IRequestCycle) newMock(IRequestCycle.class);
         ServiceEncoding encoding = (ServiceEncoding) newMock(ServiceEncoding.class);
 
         request.getParameterNames();
@@ -128,7 +127,7 @@
 
         strategy.initializeService();
 
-        strategy.addParametersForPersistentProperties(encoding, cycle, false);
+        strategy.addParametersForPersistentProperties(encoding, false);
 
         verifyControls();
     }
@@ -180,14 +179,17 @@
 
         replayControls();
 
+        PageClientPropertyPersistenceScope scope = new PageClientPropertyPersistenceScope();
+        scope.setRequestCycle(cycle);
+
         ClientPropertyPersistenceStrategy strategy = new ClientPropertyPersistenceStrategy();
         strategy.setRequest(request);
-        strategy.setScope(new PageClientPropertyPersistenceScope());
+        strategy.setScope(scope);
         strategy.setEncoder(newEncoder());
 
         strategy.initializeService();
 
-        strategy.addParametersForPersistentProperties(encoding, cycle, false);
+        strategy.addParametersForPersistentProperties(encoding, false);
 
         verifyControls();
 

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/record/TestPropertyPersistenceStrategySource.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/record/TestPropertyPersistenceStrategySource.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/record/TestPropertyPersistenceStrategySource.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/record/TestPropertyPersistenceStrategySource.java Thu Nov 10 23:06:29 2005
@@ -110,11 +110,10 @@
 
     public void testAddParameters()
     {
-        IRequestCycle cycle = newCycle();
         PropertyPersistenceStrategy strategy = newStrategy();
         ServiceEncoding encoding = (ServiceEncoding) newMock(ServiceEncoding.class);
 
-        strategy.addParametersForPersistentProperties(encoding, cycle, false);
+        strategy.addParametersForPersistentProperties(encoding, false);
 
         replayControls();
 
@@ -122,15 +121,15 @@
         source.setContributions(newContributions("whatever", strategy));
         source.initializeService();
 
-        source.addParametersForPersistentProperties(encoding, cycle, false);
+        source.addParametersForPersistentProperties(encoding, false);
 
         verifyControls();
 
-        strategy.addParametersForPersistentProperties(encoding, cycle, true);
+        strategy.addParametersForPersistentProperties(encoding, true);
 
         replayControls();
 
-        source.addParametersForPersistentProperties(encoding, cycle, true);
+        source.addParametersForPersistentProperties(encoding, true);
     }
 
     public void testDiscardStoredChanges()

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestBasicInfrastructure.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestBasicInfrastructure.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestBasicInfrastructure.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestBasicInfrastructure.java Thu Nov 10 23:06:29 2005
@@ -28,7 +28,7 @@
 import org.apache.tapestry.engine.IPropertySource;
 import org.apache.tapestry.services.ClasspathResourceFactory;
 import org.apache.tapestry.services.Infrastructure;
-import org.apache.tapestry.services.ResetEventCoordinator;
+import org.apache.tapestry.services.ResetEventHub;
 import org.easymock.MockControl;
 
 /**
@@ -150,9 +150,9 @@
         MockControl ifrControl = newControl(Infrastructure.class);
         Infrastructure ifr = (Infrastructure) ifrControl.getMock();
 
-        ResetEventCoordinator coord = (ResetEventCoordinator) newMock(ResetEventCoordinator.class);
+        ResetEventHub coord = (ResetEventHub) newMock(ResetEventHub.class);
 
-        ifr.getResetEventCoordinator();
+        ifr.getResetEventHub();
         ifrControl.setReturnValue(coord);
 
         replayControls();
@@ -161,7 +161,7 @@
 
         p.setInfrastructure(ifr);
 
-        Object actual = p.provideObject(null, null, "resetEventCoordinator", null);
+        Object actual = p.provideObject(null, null, "resetEventHub", null);
 
         assertSame(coord, actual);
 

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestDisableCachingFilter.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestDisableCachingFilter.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestDisableCachingFilter.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestDisableCachingFilter.java Thu Nov 10 23:06:29 2005
@@ -18,7 +18,7 @@
 import org.apache.hivemind.ErrorLog;
 import org.apache.hivemind.Location;
 import org.apache.hivemind.test.HiveMindTestCase;
-import org.apache.tapestry.services.ResetEventCoordinator;
+import org.apache.tapestry.services.ResetEventHub;
 import org.apache.tapestry.services.WebRequestServicer;
 import org.apache.tapestry.web.WebRequest;
 import org.apache.tapestry.web.WebResponse;
@@ -47,9 +47,9 @@
         return (WebRequestServicer) newMock(WebRequestServicer.class);
     }
 
-    private ResetEventCoordinator newREC()
+    private ResetEventHub newREC()
     {
-        return (ResetEventCoordinator) newMock(ResetEventCoordinator.class);
+        return (ResetEventHub) newMock(ResetEventHub.class);
     }
 
     public void testNormal() throws Exception
@@ -57,7 +57,7 @@
         WebRequest request = newRequest();
         WebResponse response = newResponse();
         WebRequestServicer servicer = newServicer();
-        ResetEventCoordinator rec = newREC();
+        ResetEventHub rec = newREC();
 
         servicer.service(request, response);
         rec.fireResetEvent();
@@ -65,7 +65,7 @@
         replayControls();
 
         DisableCachingFilter f = new DisableCachingFilter();
-        f.setResetEventCoordinator(rec);
+        f.setResetEventHub(rec);
 
         f.service(request, response, servicer);
 
@@ -77,8 +77,8 @@
         WebRequest request = newRequest();
         WebResponse response = newResponse();
         WebRequestServicer servicer = newServicer();
-        MockControl control = newControl(ResetEventCoordinator.class);
-        ResetEventCoordinator rec = (ResetEventCoordinator) control.getMock();
+        MockControl control = newControl(ResetEventHub.class);
+        ResetEventHub rec = (ResetEventHub) control.getMock();
         ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
 
         Location l = fabricateLocation(99);
@@ -95,7 +95,7 @@
         replayControls();
 
         DisableCachingFilter f = new DisableCachingFilter();
-        f.setResetEventCoordinator(rec);
+        f.setResetEventHub(rec);
         f.setErrorLog(log);
 
         f.service(request, response, servicer);

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestEngineServiceInnerProxy.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestEngineServiceInnerProxy.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestEngineServiceInnerProxy.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestEngineServiceInnerProxy.java Thu Nov 10 23:06:29 2005
@@ -67,14 +67,13 @@
     public void testGetLink()
     {
         ILink link = newLink();
-        IRequestCycle cycle = newCycle();
 
         MockControl control = newControl(IEngineService.class);
         IEngineService service = (IEngineService) control.getMock();
 
         Object parameter = new Object();
 
-        service.getLink(cycle, false, parameter);
+        service.getLink(false, parameter);
         control.setReturnValue(link);
 
         EngineServiceSource source = newSource("fred", service);
@@ -86,7 +85,7 @@
 
         outer.installDelegate(inner);
 
-        assertSame(link, outer.getLink(cycle, false, parameter));
+        assertSame(link, outer.getLink(false, parameter));
 
         assertSame(service, outer.getDelegate());
 

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestEngineServiceOuterProxy.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestEngineServiceOuterProxy.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestEngineServiceOuterProxy.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestEngineServiceOuterProxy.java Thu Nov 10 23:06:29 2005
@@ -37,7 +37,6 @@
 
     public void testGetLink()
     {
-        IRequestCycle cycle = newCycle();
         ILink link = (ILink) newMock(ILink.class);
 
         MockControl control = newControl(IEngineService.class);
@@ -45,7 +44,7 @@
 
         Object parameter = new Object();
 
-        delegate.getLink(cycle, false, parameter);
+        delegate.getLink(false, parameter);
         control.setReturnValue(link);
 
         replayControls();
@@ -53,7 +52,7 @@
         EngineServiceOuterProxy proxy = new EngineServiceOuterProxy("xxx");
         proxy.installDelegate(delegate);
 
-        assertSame(link, proxy.getLink(cycle, false, parameter));
+        assertSame(link, proxy.getLink(false, parameter));
 
         verifyControls();
     }

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestLinkFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestLinkFactory.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestLinkFactory.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/services/impl/TestLinkFactory.java Thu Nov 10 23:06:29 2005
@@ -84,8 +84,7 @@
         {
         }
 
-        public void addParametersForPersistentProperties(ServiceEncoding encoding,
-                IRequestCycle cycle, boolean post)
+        public void addParametersForPersistentProperties(ServiceEncoding encoding, boolean post)
         {
             encoding.setParameterValue("foo", "bar");
         }
@@ -134,13 +133,14 @@
         lf.setContextPath("/context");
         lf.setServletPath("/app");
         lf.setRequest(request);
+        lf.setRequestCycle(cycle);
 
         lf.initializeService();
 
         Map parameters = new HashMap();
         parameters.put(ServiceConstants.SERVICE, "myservice");
 
-        ILink link = lf.constructLink(cycle, false, parameters, false);
+        ILink link = lf.constructLink(false, parameters, false);
 
         verifyControls();
 
@@ -162,7 +162,7 @@
 
         engine.getOutputEncoding();
         enginec.setReturnValue("utf-8");
-        
+
         cycle.encodeURL("/context/app?foo=bar&service=myservice");
         cyclec.setReturnValue("{encoded}");
 
@@ -176,13 +176,14 @@
         lf.setServletPath("/app");
         lf.setRequest(request);
         lf.setPersistenceStrategySource(new MockSource());
+        lf.setRequestCycle(cycle);
 
         lf.initializeService();
 
         Map parameters = new HashMap();
         parameters.put(ServiceConstants.SERVICE, "myservice");
 
-        ILink link = lf.constructLink(cycle, false, parameters, true);
+        ILink link = lf.constructLink(false, parameters, true);
 
         assertEquals("{encoded}", link.getURL());
 
@@ -208,13 +209,14 @@
         lf.setContextPath("/context");
         lf.setServletPath("/app");
         lf.setRequest(request);
+        lf.setRequestCycle(cycle);
 
         lf.initializeService();
 
         Map parameters = new HashMap();
         parameters.put(ServiceConstants.SERVICE, "myservice");
 
-        ILink link = lf.constructLink(cycle, false, parameters, false);
+        ILink link = lf.constructLink(false, parameters, false);
 
         verifyControls();
 
@@ -241,6 +243,7 @@
         lf.setContextPath("/context");
         lf.setServletPath("/app");
         lf.setRequest(request);
+        lf.setRequestCycle(cycle);
 
         lf.initializeService();
 
@@ -248,7 +251,7 @@
         parameters.put(ServiceConstants.SERVICE, "page");
         parameters.put(ServiceConstants.PAGE, "Barney");
 
-        ILink link = lf.constructLink(cycle, false, parameters, false);
+        ILink link = lf.constructLink(false, parameters, false);
 
         verifyControls();
 
@@ -277,6 +280,7 @@
         lf.setServletPath("/app");
         lf.setDataSqueezer(DataSqueezerUtil.createUnitTestSqueezer());
         lf.setRequest(request);
+        lf.setRequestCycle(cycle);
 
         lf.initializeService();
 
@@ -286,7 +290,7 @@
         parameters.put(ServiceConstants.PARAMETER, new Object[]
         { Boolean.TRUE });
 
-        ILink link = lf.constructLink(cycle, false, parameters, false);
+        ILink link = lf.constructLink(false, parameters, false);
 
         verifyControls();
 

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/util/TestPageRenderSupport.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/util/TestPageRenderSupport.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/util/TestPageRenderSupport.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/util/TestPageRenderSupport.java Thu Nov 10 23:06:29 2005
@@ -56,7 +56,7 @@
         MockControl control = newControl(IAsset.class);
         IAsset asset = (IAsset) control.getMock();
 
-        asset.buildURL(cycle);
+        asset.buildURL();
         control.setReturnValue(url);
 
         return asset;

Modified: jakarta/tapestry/trunk/portlet/src/descriptor/META-INF/hivemodule.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/portlet/src/descriptor/META-INF/hivemodule.xml?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/portlet/src/descriptor/META-INF/hivemodule.xml (original)
+++ jakarta/tapestry/trunk/portlet/src/descriptor/META-INF/hivemodule.xml Thu Nov 10 23:06:29 2005
@@ -198,6 +198,7 @@
         <set-object property="dataSqueezer" value="infrastructure:dataSqueezer"/>
         <set-configuration property="contributions" configuration-id="tapestry.url.ServiceEncoders"/>
         <set-service property="renderResponse" service-id="RenderResponse"/>
+        <set-object property="requestCycle" value="infrastructure:requestCycle"/>        
       </construct>
     </invoke-factory>
     
@@ -220,7 +221,7 @@
  
   <contribution configuration-id="tapestry.Infrastructure">
     <property name="linkFactory" mode="portlet" object="service:PortletLinkFactory"/>
-    <property name="rootDescriptionReceiverFactory " mode="portlet" object="PortletRootDescriptionReceiverFactory "/>
+    <property name="rootDescriptionReceiverFactory " mode="portlet" object="service:PortletRootDescriptionReceiverFactory"/>
     <property name="exceptionPresenter" mode="portlet" object="service:PortletExceptionPresenter"/>
     <property name="staleLinkExceptionPresenter" mode="portlet" object="service:PortletStaleLinkExceptionPresenter"/>
     <property name="staleSessionExceptionPresenter" mode="portlet" object="service:PortletStaleSessionExceptionPresenter"/>

Modified: jakarta/tapestry/trunk/portlet/src/java/org/apache/tapestry/portlet/ExceptionService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/portlet/src/java/org/apache/tapestry/portlet/ExceptionService.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/portlet/src/java/org/apache/tapestry/portlet/ExceptionService.java (original)
+++ jakarta/tapestry/trunk/portlet/src/java/org/apache/tapestry/portlet/ExceptionService.java Thu Nov 10 23:06:29 2005
@@ -40,7 +40,7 @@
 
     private PortletRequestGlobals _globals;
 
-    public ILink getLink(IRequestCycle cycle, boolean post, Object parameter)
+    public ILink getLink(boolean post, Object parameter)
     {
         throw new UnsupportedOperationException(PortletMessages.unsupportedMethod("getLink"));
     }

Modified: jakarta/tapestry/trunk/portlet/src/java/org/apache/tapestry/portlet/PortletHomeService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/portlet/src/java/org/apache/tapestry/portlet/PortletHomeService.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/portlet/src/java/org/apache/tapestry/portlet/PortletHomeService.java (original)
+++ jakarta/tapestry/trunk/portlet/src/java/org/apache/tapestry/portlet/PortletHomeService.java Thu Nov 10 23:06:29 2005
@@ -52,7 +52,7 @@
         return Tapestry.HOME_SERVICE;
     }
 
-    public ILink getLink(IRequestCycle cycle, boolean post, Object parameter)
+    public ILink getLink(boolean post, Object parameter)
     {
         if (parameter != null)
             throw new IllegalArgumentException(EngineMessages.serviceNoParameter(this));
@@ -61,7 +61,7 @@
 
         parameters.put(ServiceConstants.SERVICE, getName());
 
-        return _linkFactory.constructLink(cycle, post, parameters, true);
+        return _linkFactory.constructLink(post, parameters, true);
     }
 
     public void setLinkFactory(LinkFactory linkFactory)

Modified: jakarta/tapestry/trunk/portlet/src/java/org/apache/tapestry/portlet/PortletLinkFactoryImpl.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/portlet/src/java/org/apache/tapestry/portlet/PortletLinkFactoryImpl.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/portlet/src/java/org/apache/tapestry/portlet/PortletLinkFactoryImpl.java (original)
+++ jakarta/tapestry/trunk/portlet/src/java/org/apache/tapestry/portlet/PortletLinkFactoryImpl.java Thu Nov 10 23:06:29 2005
@@ -36,20 +36,26 @@
 {
     private RenderResponse _renderResponse;
 
+    private IRequestCycle _requestCycle;
+
     public void setRenderResponse(RenderResponse renderResponse)
     {
         _renderResponse = renderResponse;
     }
 
-    public ILink constructLink(IRequestCycle cycle, boolean post, Map parameters, boolean stateful)
+    public ILink constructLink(boolean post, Map parameters, boolean stateful)
     {
-        Defense.notNull(cycle, "cycle");
         Defense.notNull(parameters, "parameters");
 
         squeezeServiceParameters(parameters);
 
         PortletURL url = _renderResponse.createActionURL();
 
-        return new PortletLink(cycle, url, new QueryParameterMap(parameters), stateful);
+        return new PortletLink(_requestCycle, url, new QueryParameterMap(parameters), stateful);
+    }
+
+    public void setRequestCycle(IRequestCycle requestCycle)
+    {
+        _requestCycle = requestCycle;
     }
 }

Modified: jakarta/tapestry/trunk/portlet/src/java/org/apache/tapestry/portlet/RenderService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/portlet/src/java/org/apache/tapestry/portlet/RenderService.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/portlet/src/java/org/apache/tapestry/portlet/RenderService.java (original)
+++ jakarta/tapestry/trunk/portlet/src/java/org/apache/tapestry/portlet/RenderService.java Thu Nov 10 23:06:29 2005
@@ -51,7 +51,7 @@
 
     private PortletPageResolver _pageResolver;
 
-    public ILink getLink(IRequestCycle cycle, boolean post, Object parameter)
+    public ILink getLink(boolean post, Object parameter)
     {
         throw new UnsupportedOperationException(PortletMessages.unsupportedMethod("getLink"));
     }

Modified: jakarta/tapestry/trunk/portlet/src/test/org/apache/tapestry/portlet/TestPortletHomeService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/portlet/src/test/org/apache/tapestry/portlet/TestPortletHomeService.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/portlet/src/test/org/apache/tapestry/portlet/TestPortletHomeService.java (original)
+++ jakarta/tapestry/trunk/portlet/src/test/org/apache/tapestry/portlet/TestPortletHomeService.java Thu Nov 10 23:06:29 2005
@@ -123,9 +123,8 @@
         LinkFactory factory = (LinkFactory) factoryc.getMock();
 
         ILink link = (ILink) newMock(ILink.class);
-        IRequestCycle cycle = newCycle();
 
-        factory.constructLink(cycle, false, parameters, true);
+        factory.constructLink(false, parameters, true);
         factoryc.setReturnValue(link);
 
         replayControls();
@@ -133,7 +132,7 @@
         PortletHomeService phs = new PortletHomeService();
         phs.setLinkFactory(factory);
 
-        assertSame(link, phs.getLink(cycle, false, null));
+        assertSame(link, phs.getLink(false, null));
 
         verifyControls();
     }
@@ -142,7 +141,7 @@
     {
         try
         {
-            new PortletHomeService().getLink(null, false, "PARAMETER");
+            new PortletHomeService().getLink(false, "PARAMETER");
             unreachable();
         }
         catch (IllegalArgumentException ex)

Modified: jakarta/tapestry/trunk/portlet/src/test/org/apache/tapestry/portlet/TestRenderService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/portlet/src/test/org/apache/tapestry/portlet/TestRenderService.java?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/portlet/src/test/org/apache/tapestry/portlet/TestRenderService.java (original)
+++ jakarta/tapestry/trunk/portlet/src/test/org/apache/tapestry/portlet/TestRenderService.java Thu Nov 10 23:06:29 2005
@@ -23,7 +23,7 @@
 
         try
         {
-            rs.getLink(null, false, null);
+            rs.getLink(false, null);
             unreachable();
         }
         catch (UnsupportedOperationException ex)

Modified: jakarta/tapestry/trunk/status.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/status.xml?rev=332477&r1=332476&r2=332477&view=diff
==============================================================================
--- jakarta/tapestry/trunk/status.xml (original)
+++ jakarta/tapestry/trunk/status.xml Thu Nov 10 23:06:29 2005
@@ -55,6 +55,7 @@
       <action type="fix" dev="HLS" fixes-bug="TAPESTRT-678">LinkSubmit does not work correctly when the browser's back button is used and the form resubmitted normally</action>
       <action type="add" dev="HLS" fixes-bug="TAPESTRY-731">Extend RequestDisplay component (used on the Exception page) to also report the internal status of key Tapestry services</action>
       <action type="fix" dev="HLS" fixes-bug="TAPESTRY-742">LinkSubmit renders overly verbose JavaScript</action>
+      <action type="fix" dev="HLS" fixes-bug="TAPESTRY-620">Expose the current IRequestCycle as an injectable service</action>
     </release>
     <release version="4.0-beta-12" date="Oct 30 2005">
       <action type="fix" dev="HLS" fixes-bug="TAPESTRY-718">Asset injection makes assets appear as null inside finishLoad()</action>



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message