tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject cvs commit: jakarta-tapestry/framework/src/test/org/apache/tapestry/junit/mock/wml Mock.application
Date Sun, 03 Apr 2005 14:50:34 GMT
hlship      2005/04/03 07:50:34

  Modified:    framework/src/descriptor/META-INF tapestry.bindings.xml
                        tapestry.request.xml tapestry.asset.xml
                        tapestry.describe.xml tapestry.markup.xml
                        tapestry.data.xml tapestry.url.xml hivemodule.xml
                        tapestry.multipart.xml tapestry.enhance.xml
                        tapestry.page.xml tapestry.state.xml
                        tapestry.globals.xml
               portlet/src/descriptor/META-INF
                        tapestry.portlet.services.xml hivemodule.xml
               portlet/src/test/org/apache/tapestry/portlet
                        TestApplicationPortlet.java
               src/documentation/content/xdocs index.xml
               portlet/src/java/org/apache/tapestry/portlet
                        SetupPortletApplicationGlobals.java
               framework/src/test/org/apache/tapestry/junit/mock/wml
                        Mock.application
  Added:       framework/src/descriptor/META-INF tapestry.error.xml
               framework/src/test/org/apache/tapestry/services/impl
                        DeferredObjectTranslator.java
                        TestInfrastructure.java
                        TestDeferredObjectTranslator.java
               framework/src/test/org/apache/tapestry/error
                        TestExceptionPresenter.java
  Log:
  Implement a more sophisticated, less code-heavy, approach to configuring the Infrastructure service's properties.
  Factor the presentation of runtime exceptions out into a new service, ExceptionPresenter.
  
  Revision  Changes    Path
  1.10      +1 -1      jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.bindings.xml
  
  Index: tapestry.bindings.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.bindings.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- tapestry.bindings.xml	24 Feb 2005 18:54:18 -0000	1.9
  +++ tapestry.bindings.xml	3 Apr 2005 14:50:33 -0000	1.10
  @@ -167,7 +167,7 @@
       <binding prefix="hivemind" service-id="HiveMindBindingFactory"/>
     </contribution>
     
  -  <service-point id="BindingSource" interface="BindingSource">
  +  <service-point id="BindingSource">
       
       <invoke-factory>
         <construct class="org.apache.tapestry.services.impl.BindingSourceImpl">
  
  
  
  1.26      +13 -9     jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.request.xml
  
  Index: tapestry.request.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.request.xml,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- tapestry.request.xml	24 Mar 2005 16:50:16 -0000	1.25
  +++ tapestry.request.xml	3 Apr 2005 14:50:33 -0000	1.26
  @@ -32,7 +32,7 @@
       </invoke-factory> 
     </service-point>  
     
  -  <service-point id="RequestLocaleManager" interface="RequestLocaleManager">
  +  <service-point id="RequestLocaleManager">
       
       Encapsulates the logic for extracting the locale for the current request.
       
  @@ -45,7 +45,7 @@
       </invoke-factory>
     </service-point>  
     
  -  <service-point id="CookieSource" interface="CookieSource">
  +  <service-point id="CookieSource">
       
       Allows access to incoming HTTP cookie values for the active (per-thread) request.
       
  @@ -57,7 +57,7 @@
       </invoke-factory>    
     </service-point>  
     
  -  <service-point id="EngineManager" interface="EngineManager">
  +  <service-point id="EngineManager">
       Obtains an IEngine implementation for the current request, either from a pool of
       such engine instance, from a factory, or from the HttpSession.
       
  @@ -70,7 +70,7 @@
       </invoke-factory>
     </service-point>  
     
  -  <service-point id="EngineFactory" interface="EngineFactory">
  +  <service-point id="EngineFactory">
       
       Responsible for creating new instances of IEngine as needed.
       
  @@ -89,7 +89,7 @@
       
     </configuration-point> 
     
  -  <service-point id="ServletRequestServicer" interface="ServletRequestServicer">
  +  <service-point id="ServletRequestServicer">
       
       A pipeline for handling each request.
       
  @@ -121,7 +121,7 @@
   	
     </configuration-point>   
     
  -  <service-point id="WebRequestServicer" interface="WebRequestServicer">
  +  <service-point id="WebRequestServicer">
       
   	A secondary pipeline for handling each requests wrapped in the WebRequest abstraction
   	layer.
  @@ -166,7 +166,7 @@
       
     </service-point>
     
  -  <service-point id="ResponseRenderer" interface="ResponseRenderer">
  +  <service-point id="ResponseRenderer">
       Renders the active page as the response.
       
       <invoke-factory>
  @@ -178,7 +178,11 @@
       </invoke-factory>
     </service-point>
     
  -  <service-point id="AbsoluteURLBuilder" interface="AbsoluteURLBuilder">
  +  <contribution configuration-id="tapestry.Infrastructure">
  +    <property name="responseRenderer" object="service:ResponseRenderer"/>
  +  </contribution>
  +  
  +  <service-point id="AbsoluteURLBuilder">
       
       Uses HttpServletRequest information to build complete URLs, suitable for use when
       sending client-side redirects.
  @@ -191,7 +195,7 @@
       
     </service-point>
     
  -  <service-point id="RequestCycleFactory" interface="RequestCycleFactory">
  +  <service-point id="RequestCycleFactory">
       
       Creates new IRequestCycle instances.
       
  
  
  
  1.12      +15 -16    jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.asset.xml
  
  Index: tapestry.asset.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.asset.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- tapestry.asset.xml	30 Mar 2005 16:27:05 -0000	1.11
  +++ tapestry.asset.xml	3 Apr 2005 14:50:33 -0000	1.12
  @@ -23,21 +23,20 @@
       
       Maps asset path prefixes to AssetFactory implementations.
       
  -<schema>
  +    <schema>
         <element name="factory">
  -      <attribute name="prefix" required="true" unique="true">
  -        The prefix to map.
  -      </attribute>
  -      <attribute name="object" required="true" translator="object">
  -        The asset factory for the prefix.
  -      </attribute>
  +        <attribute name="prefix" required="true" unique="true">
  +          The prefix to map.
  +        </attribute>
  +        <attribute name="object" required="true" translator="object">
  +          The asset factory for the prefix.
  +        </attribute>
         
  -      <conversion class="AssetFactoryContribution">
  -        <map attribute="object" property="factory"/>
  -      </conversion>
  -    </element>
  -
  -</schema>    
  +        <conversion class="AssetFactoryContribution">
  +          <map attribute="object" property="factory"/>
  +        </conversion>
  +      </element>
  +    </schema>    
     </configuration-point>
     
     <contribution configuration-id="AssetFactories">
  @@ -103,7 +102,7 @@
       </invoke-factory>
     </service-point>
     
  -  <service-point id="AssetSource" interface="AssetSource">
  +  <service-point id="AssetSource">
       
       The master factory for assets, which identifies the correct
       AssetFactory based on the prefix of the asset path (if any).
  @@ -118,7 +117,7 @@
     </service-point>
   
   
  -  <service-point id="ResourceDigestSource" interface="ResourceDigestSource">
  +  <service-point id="ResourceDigestSource">
       
       Reads and caches Digest digests of files exposed by the AssetService.
       
  @@ -127,7 +126,7 @@
       </invoke-factory>
     </service-point>  
     
  -  <service-point id="AssetExternalizer" interface="AssetExternalizer">
  +  <service-point id="AssetExternalizer">
       
       Used by the AssetService to copy private assets out onto the file system within
       a web folder, so that static URLs to the assets may be generated.
  
  
  
  1.4       +8 -4      jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.describe.xml
  
  Index: tapestry.describe.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.describe.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- tapestry.describe.xml	30 Mar 2005 16:27:05 -0000	1.3
  +++ tapestry.describe.xml	3 Apr 2005 14:50:33 -0000	1.4
  @@ -35,7 +35,7 @@
   		<strategy class="javax.servlet.Servlet" object="instance:ServletStrategy"/>
   	</contribution>
   	
  -	<service-point id="DescribableStrategy" interface="DescribableStrategy">
  +	<service-point id="DescribableStrategy">
   		Strategy registry facade for DescribableStrategy.
   		
   		<invoke-factory service-id="hivemind.lib.StrategyFactory">
  @@ -43,7 +43,7 @@
   		</invoke-factory>
   	</service-point>
   	
  -	<service-point id="HTMLDescriber" interface="HTMLDescriber">
  +	<service-point id="HTMLDescriber">
   		
   		Describes an object in an HTML format.
   		
  @@ -53,6 +53,10 @@
   			</construct>
   		</invoke-factory>
   	</service-point>
  +  
  +  <contribution configuration-id="tapestry.Infrastructure">
  +     <property name="HTMLDescriber" object="service:HTMLDescriber"/>
  +  </contribution>  
   	
   	<service-point id="DefaultRenderStrategy" interface="RenderStrategy">
   		
  @@ -77,7 +81,7 @@
   		<strategy class="org.apache.hivemind.Location" object="instance:LocationRenderStrategy"/>
   	</contribution>
   	
  -	<service-point id="RenderStrategy" interface="RenderStrategy">
  +	<service-point id="RenderStrategy">
   		
   		Strategy service based on the RenderStrategies configuration point, which
       allows arbitrary objects to be rendered as HTML.
  @@ -87,7 +91,7 @@
   		</invoke-factory>
   	</service-point>
   	
  -	<service-point id="RenderableAdapterFactory" interface="RenderableAdapterFactory">
  +	<service-point id="RenderableAdapterFactory">
   		
   		Provider renderable (IRender) adapters for arbitrary objects.
   		
  
  
  
  1.2       +1 -1      jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.markup.xml
  
  Index: tapestry.markup.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.markup.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- tapestry.markup.xml	22 Mar 2005 13:40:54 -0000	1.1
  +++ tapestry.markup.xml	3 Apr 2005 14:50:33 -0000	1.2
  @@ -53,7 +53,7 @@
       <content type="text/vnd.wap.wml" filter="instance:org.apache.tapestry.wml.WMLMarkupFilter"/>
     </contribution>
     
  -  <service-point id="MarkupWriterSource" interface="MarkupWriterSource">
  +  <service-point id="MarkupWriterSource">
       
       Source for markup writer instances, used when rendering page-oriented
       responses to the client.
  
  
  
  1.3       +2 -2      jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.data.xml
  
  Index: tapestry.data.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.data.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- tapestry.data.xml	6 Jan 2005 02:17:26 -0000	1.2
  +++ tapestry.data.xml	3 Apr 2005 14:50:33 -0000	1.3
  @@ -15,12 +15,12 @@
      limitations under the License.
   -->
   
  -<module id="tapestry.data" version="3.1.0">
  +<module id="tapestry.data" version="3.1.0" package="org.apache.tapestry.services">
     
     Module used to define the DataSqueezer service and related.  To come: configuratons for defining
     squeeze adaptors.
     
  -  <service-point id="DataSqueezer" interface="org.apache.tapestry.services.DataSqueezer">
  +  <service-point id="DataSqueezer">
       
       Converts back and forth between primitive and object types and encoded strings.
       
  
  
  
  1.12      +4 -0      jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.url.xml
  
  Index: tapestry.url.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.url.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- tapestry.url.xml	22 Mar 2005 21:54:39 -0000	1.11
  +++ tapestry.url.xml	3 Apr 2005 14:50:33 -0000	1.12
  @@ -38,6 +38,10 @@
     <contribution configuration-id="hivemind.FactoryDefaults">
       <default symbol="org.apache.tapestry.servlet-path" value="/app"/>
     </contribution>
  +  
  +  <contribution configuration-id="tapestry.Infrastructure">
  +    <property name="linkFactory" object="service:LinkFactory"/>
  +  </contribution>  
   
     <configuration-point id="ServiceEncoders">
       
  
  
  
  1.36      +100 -31   jakarta-tapestry/framework/src/descriptor/META-INF/hivemodule.xml
  
  Index: hivemodule.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/hivemodule.xml,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- hivemodule.xml	29 Mar 2005 22:19:54 -0000	1.35
  +++ hivemodule.xml	3 Apr 2005 14:50:33 -0000	1.36
  @@ -43,8 +43,9 @@
     <sub-module descriptor="tapestry.multipart.xml"/>
     <sub-module descriptor="tapestry.describe.xml"/>
     <sub-module descriptor="tapestry.markup.xml"/>
  +  <sub-module descriptor="tapestry.error.xml"/>
       
  -  <service-point id="ClasspathResourceFactory" interface="ClasspathResourceFactory">
  +  <service-point id="ClasspathResourceFactory">
     
       Constructs new instances of ClasspathResource.
       
  @@ -52,47 +53,99 @@
         <construct class="impl.ClasspathResourceFactoryImpl"/>
       </invoke-factory>
     </service-point>
  +  
  +  <schema id="Infrastructure">
  +    
  +    Defines contributions to the Infrastructure and
  +    InfrastructureOverride configuration points.
  +    
  +    <element name="property">
  +      
  +      Defines an object to plug into a property of Infrastructure.
  +      
  +      <attribute name="name" required="true">
  +        The name of the Infrastructure property.
  +      </attribute>
  +      
  +      <attribute name="mode">
  +        The mode this contribution applies to. The Infrastructure
  +        is initalized to a particular mode.  Contributions
  +        that specify a mode override contribution that don't specify a mode,
  +        but are ignored if the contribution mode doesn't match the
  +        Infrastructure mode.
  +      </attribute>
  +      
  +      <attribute name="object" required="true" translator="deferred-object">
  +        The object to be contributed into the Infrastructure property.
  +      </attribute>
  +      
  +      <conversion class="impl.InfrastructureContribution">
  +        <map attribute="name" property="property"/>
  +        <map attribute="object" property="deferredObject"/>
  +      </conversion>
  +      
  +    </element>
  +    
  +  </schema>
  +  
  +  <configuration-point id="Infrastructure" schema-id="Infrastructure">
  +    
  +    The "factory" set of contributions into the configuration.  These
  +    contributions are overridden by
  +    the InfrastructureOverrides configuration point.
  +    
  +  </configuration-point>
  +  
  +  <configuration-point id="InfrastructureOverrides" schema-id="Infrastructure">
  +    
  +    Provides a way for applications to easily override Infrastructure properties.
  +    
  +  </configuration-point>
      
  -  <service-point id="Infrastructure" interface="Infrastructure">
  +  <service-point id="Infrastructure">
       
       A kind of "clearing house" of other services. The Infrastructure is provided to the
       IEngine instance via the InvokeEngineTerminator service (using an HttpServletRequest
       attribute).  The engine can then get the other services it depends upon.
       The infrastructure: object provider allows access to the properties
  -    of this service.
  +    of this service.  The Infrastructure and InfrastructureOverrides
  +    configuration points define which services are mapped to which
  +    Infrastructure properties.
       
       <invoke-factory>
         <construct class="impl.InfrastructureImpl">
  -        <set-object  property="applicationSpecification" value="service-property:tapestry.globals.ApplicationGlobals:specification"/>
  -        <set-service property="applicationPropertySource" service-id="tapestry.props.ApplicationPropertySource"/>
  -        <set-service property="globalPropertySource" service-id="tapestry.props.GlobalPropertySource"/>
  -        <set-service property="componentMessagesSource" service-id="ComponentMessagesSource"/>
  -        <set-service property="resetEventCoordinator" service-id="ResetEventCoordinator"/>
  -        <set-service property="templateSource" service-id="tapestry.parse.TemplateSource"/>
  -        <set-service property="specificationSource" service-id="tapestry.parse.SpecificationSource"/>
  -        <set-service property="objectPool" service-id="GlobalObjectPool"/>
  -        <set-service property="pageSource" service-id="tapestry.page.PageSource"/>
  -        <set-service property="dataSqueezer" service-id="tapestry.data.DataSqueezer"/>
  -        <set-service property="scriptSource" service-id="tapestry.script.ScriptSource"/>
  -        <set-service property="serviceMap" service-id="tapestry.services.ServiceMap"/>
  -        <set-service property="requestExceptionReporter" service-id="RequestExceptionReporter"/>
  -        <set-object property="responseRenderer" value="service-property:tapestry.globals.ApplicationGlobals:responseRenderer"/>
  -        <set-object property="linkFactory" value="service-property:tapestry.globals.ApplicationGlobals:linkFactory"/>
  -        <set-service property="requestCycleFactory" service-id="tapestry.request.RequestCycleFactory"/>
  -        <set-service property="applicationStateManager" service-id="tapestry.state.ApplicationStateManager"/>
  -        <set-service property="request" service-id="tapestry.globals.WebRequest"/>
  -        <set-service property="response" service-id="tapestry.globals.WebResponse"/>
  -        <set-service property="componentPropertySource" service-id="tapestry.props.ComponentPropertySource"/>
  -        <set-object property="applicationId" value="service-property:tapestry.globals.ApplicationGlobals:activatorName"/>
  -        <set-service property="context" service-id="tapestry.globals.WebContext"/>
           <set-service property="threadLocale" service-id="hivemind.ThreadLocale"/>
  -        <set-service property="markupWriterSource" service-id="tapestry.markup.MarkupWriterSource"/>
  -        <set-object property="HTMLDescriber" value="service-property:tapestry.globals.ApplicationGlobals:HTMLDescriber"/>
  -      </construct>
  +        <set-configuration property="normalContributions" configuration-id="Infrastructure"/>
  +        <set-configuration property="overrideContributions" configuration-id="InfrastructureOverrides"/>
  +       </construct>
       </invoke-factory>
       
     </service-point>
     
  +  <contribution configuration-id="Infrastructure">
  +    <property name="applicationSpecification" object="service-property:tapestry.globals.ApplicationGlobals:specification"/>
  +    <property name="applicationPropertySource" object="service:tapestry.props.ApplicationPropertySource"/>
  +    <property name="globalPropertySource" object="service:tapestry.props.GlobalPropertySource"/>
  +    <property name="componentMessagesSource" object="service:ComponentMessagesSource"/>
  +    <property name="resetEventCoordinator" object="service:ResetEventCoordinator"/>
  +    <property name="templateSource" object="service:tapestry.parse.TemplateSource"/>
  +    <property name="specificationSource" object="service:tapestry.parse.SpecificationSource"/>
  +    <property name="objectPool" object="service:GlobalObjectPool"/>
  +    <property name="pageSource" object="service:tapestry.page.PageSource"/>
  +    <property name="dataSqueezer" object="service:tapestry.data.DataSqueezer"/>
  +    <property name="scriptSource" object="service:tapestry.script.ScriptSource"/>
  +    <property name="serviceMap" object="service:tapestry.services.ServiceMap"/>
  +    <property name="requestExceptionReporter" object="service:RequestExceptionReporter"/>
  +    <property name="requestCycleFactory" object="service:tapestry.request.RequestCycleFactory"/>
  +    <property name="applicationStateManager" object="service:tapestry.state.ApplicationStateManager"/>
  +    <property name="request" object="service:tapestry.globals.WebRequest"/>
  +    <property name="response" object="service:tapestry.globals.WebResponse"/>
  +    <property name="componentPropertySource" object="service:tapestry.props.ComponentPropertySource"/>
  +    <property name="applicationId" object="service-property:tapestry.globals.ApplicationGlobals:activatorName"/>
  +    <property name="context" object="service:tapestry.globals.WebContext"/>
  +    <property name="markupWriterSource" object="service:tapestry.markup.MarkupWriterSource"/>
  +  </contribution>
  +  
     <service-point id="ExtensionLookupFactory" interface="org.apache.hivemind.ServiceImplementationFactory">
       
       A service factory that, in fact, attempts to obtain service implementations
  @@ -121,7 +174,7 @@
     </service-point>
     
     
  -  <service-point id="ResetEventCoordinator" interface="ResetEventCoordinator">
  +  <service-point id="ResetEventCoordinator">
       
       Coordinator for services that have cached information that should be cleared out (this happens
       constantly in development, much more rarely in production).
  @@ -144,7 +197,7 @@
     </service-point> 
     
     
  -  <service-point id="ComponentMessagesSource" interface="ComponentMessagesSource">
  +  <service-point id="ComponentMessagesSource">
       
       Used to provide components (including pages) with access to their own localized messages.
       
  @@ -186,12 +239,28 @@
       </invoke-factory>
     </service-point>
     
  +  <service-point id="DeferredObjectTranslator" interface="org.apache.hivemind.schema.Translator" visibility="private">
  +    
  +    Translator that encapsulates the ObjectTranslator, returning DeferredObjects. This is to prevent
  +    premature or unnecessary object creation by the ObjectTranslator.
  +    
  +    <invoke-factory>
  +      <construct class="impl.DeferredObjectTranslator">
  +        <set-service property="objectTranslator" service-id="ObjectTranslator"/>
  +      </construct>
  +    </invoke-factory>
  +  </service-point>
  +  
  +  <contribution configuration-id="hivemind.Translators">
  +    <translator name="deferred-object" service-id="DeferredObjectTranslator"/>
  +  </contribution>
  +  
     <service-point id="ObjectTranslator" interface="org.apache.hivemind.schema.Translator" visibility="private">
       
       Translator that works with ObjectProviders to find or create objects.  This is a duplicate
       of the HiveMind service (which is also private).
         
  -    <invoke-factory>
  +    <invoke-factory model="primitive">
         <construct
           class="org.apache.hivemind.service.impl.ObjectTranslator">
           <set-configuration configuration-id="hivemind.ObjectProviders" property="contributions"/>
  
  
  
  1.4       +1 -1      jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.multipart.xml
  
  Index: tapestry.multipart.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.multipart.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- tapestry.multipart.xml	15 Mar 2005 16:44:17 -0000	1.3
  +++ tapestry.multipart.xml	3 Apr 2005 14:50:33 -0000	1.4
  @@ -19,7 +19,7 @@
     
     Support for multipart/form-data encoded requests used for file uploads.
     
  -  <service-point id="MultipartDecoder" interface="MultipartDecoder">
  +  <service-point id="MultipartDecoder">
       
       Service responsible for parsing and decoding multipart form submissions. 
       
  
  
  
  1.16      +1 -1      jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.enhance.xml
  
  Index: tapestry.enhance.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.enhance.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- tapestry.enhance.xml	24 Feb 2005 18:54:18 -0000	1.15
  +++ tapestry.enhance.xml	3 Apr 2005 14:50:33 -0000	1.16
  @@ -46,7 +46,7 @@
       
     </service-point>
     
  -  <service-point id="EnhancedClassValidator" interface="EnhancedClassValidator">
  +  <service-point id="EnhancedClassValidator">
       
       Validates that an enhanced class does implement all abstract methods inherited from super-classes.
       
  
  
  
  1.14      +1 -1      jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.page.xml
  
  Index: tapestry.page.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.page.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- tapestry.page.xml	28 Feb 2005 18:44:52 -0000	1.13
  +++ tapestry.page.xml	3 Apr 2005 14:50:33 -0000	1.14
  @@ -141,7 +141,7 @@
       
     </configuration-point>
     
  -  <service-point id="PageClassProvider" interface="PageClassProvider">
  +  <service-point id="PageClassProvider">
       
       Chain built around thePgaeClassProviderChain configuration point, used to determine
       the class to instantiate for a particular page (within a namespace).
  
  
  
  1.7       +1 -1      jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.state.xml
  
  Index: tapestry.state.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.state.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- tapestry.state.xml	25 Feb 2005 18:01:31 -0000	1.6
  +++ tapestry.state.xml	3 Apr 2005 14:50:33 -0000	1.7
  @@ -195,7 +195,7 @@
       
     </service-point>
     
  -  <service-point id="ApplicationStateManager" interface="ApplicationStateManager">
  +  <service-point id="ApplicationStateManager">
       
       <invoke-factory model="pooled">
         <construct class="ApplicationStateManagerImpl">
  
  
  
  1.15      +3 -5      jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.globals.xml
  
  Index: tapestry.globals.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.globals.xml,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- tapestry.globals.xml	29 Mar 2005 22:19:54 -0000	1.14
  +++ tapestry.globals.xml	3 Apr 2005 14:50:33 -0000	1.15
  @@ -21,12 +21,12 @@
     services) about the current request. In addition, services based
     on this global information are provided.
     
  -  <service-point id="ApplicationGlobals" interface="ApplicationGlobals">
  +  <service-point id="ApplicationGlobals">
       <create-instance class="impl.ApplicationGlobalsImpl" model="primitive"/>
     </service-point>
    
     
  -  <service-point id="RequestGlobals" interface="RequestGlobals">
  +  <service-point id="RequestGlobals">
       Stores the request and response for the current thread.
       
       <create-instance class="impl.RequestGlobalsImpl" model="threaded"/>
  @@ -94,10 +94,8 @@
     <invoke-factory model="primitive">
       <construct class="impl.SetupServletApplicationGlobals">
         <set-service property="globals" service-id="ApplicationGlobals"/>
  -      <set-service property="responseRenderer" service-id="tapestry.request.ResponseRenderer"/>
  -      <set-service property="linkFactory" service-id="tapestry.url.LinkFactory"/>
         <set-configuration property="factoryServices" configuration-id="tapestry.services.FactoryServices"/>
  -      <set-service property="HTMLDescriber" service-id="tapestry.describe.HTMLDescriber"/>
  +      <set-service property="infrastructure" service-id="tapestry.Infrastructure"/>
       </construct>
     </invoke-factory>
    </service-point>
  
  
  
  1.1                  jakarta-tapestry/framework/src/descriptor/META-INF/tapestry.error.xml
  
  Index: tapestry.error.xml
  ===================================================================
  <?xml version="1.0"?>
  <!-- 
     Copyright 2005 The Apache Software Foundation
  
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
  
         http://www.apache.org/licenses/LICENSE-2.0
  
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
  -->
  
  <module id="tapestry.error" version="3.1.0" package="org.apache.tapestry.error">
    
    Handling of common runtime errors.
    
    <service-point id="ExceptionPresenter">
      
      <invoke-factory>
        <construct class="ExceptionPresenterImpl">
          <set-object property="exceptionPageName" 
                         value="app-property:org.apache.tapestry.exception-page-name"/>
          <set-object property="requestExceptionReporter"
                         value="infrastructure:requestExceptionReporter"/>
          <set-object property="responseRenderer"
                        value="infrastructure:responseRenderer"/>
        </construct>
      </invoke-factory>
      
    </service-point>
    
    <contribution configuration-id="hivemind.FactoryDefaults">
      <default symbol="org.apache.tapestry.exception-page-name" value="Exception"/>
    </contribution>
    
    <contribution configuration-id="tapestry.Infrastructure">
      <property name="exceptionPresenter" object="service:ExceptionPresenter"/>
    </contribution>
    
  </module>
  
  
  1.1                  jakarta-tapestry/framework/src/test/org/apache/tapestry/services/impl/DeferredObjectTranslator.java
  
  Index: DeferredObjectTranslator.java
  ===================================================================
  // Copyright 2005 The Apache Software Foundation
  //
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
  
  package org.apache.tapestry.services.impl;
  
  import org.apache.hivemind.Location;
  import org.apache.hivemind.internal.Module;
  import org.apache.hivemind.schema.Translator;
  
  /**
   * Service <code>tapestry.DeferredObjectTranslator</code>, which is used to encapsulate the
   * ObjectTranslator and return {@link org.apache.tapestry.services.impl.DeferredObjectImpl}instances.
   * These allow the translator to <em>not be executed until (and unless)
   * the value is needed</em>,
   * with the added expense that you have to de-referrence the
   * {@link org.apache.tapestry.services.impl.DeferredObjectImpl}.
   * 
   * @author Howard M. Lewis Ship
   * @since 3.1
   */
  public class DeferredObjectTranslator implements Translator
  {
      private Translator _objectTranslator;
  
      public Object translate(Module module, Class propertyType, String inputValue, Location location)
      {
          return new DeferredObjectImpl(_objectTranslator, module, inputValue, location);
      }
  
      public void setObjectTranslator(Translator objectTranslator)
      {
          _objectTranslator = objectTranslator;
      }
  }
  
  
  1.1                  jakarta-tapestry/framework/src/test/org/apache/tapestry/services/impl/TestInfrastructure.java
  
  Index: TestInfrastructure.java
  ===================================================================
  // Copyright 2005 The Apache Software Foundation
  //
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
  
  package org.apache.tapestry.services.impl;
  
  import java.util.ArrayList;
  import java.util.Collections;
  import java.util.List;
  
  import org.apache.hivemind.ApplicationRuntimeException;
  import org.apache.hivemind.ErrorLog;
  import org.apache.hivemind.Location;
  import org.apache.hivemind.test.HiveMindTestCase;
  
  /**
   * Tests for {@link org.apache.tapestry.services.impl.InfrastructureImpl}.
   * 
   * @author Howard M. Lewis Ship
   * @since 3.1
   */
  public class TestInfrastructure extends HiveMindTestCase
  {
      private static class DeferredObjectFixture implements DeferredObject
      {
          private Object _object;
  
          private Location _location;
  
          public DeferredObjectFixture(Object object, Location location)
          {
              _object = object;
              _location = location;
          }
  
          public Location getLocation()
          {
              return _location;
          }
  
          public Object getObject()
          {
              return _object;
          }
      }
  
      private InfrastructureContribution newContribution(String propertyName, String mode,
              Object object)
      {
          return newContribution(propertyName, mode, object, null);
      }
  
      private InfrastructureContribution newContribution(String propertyName, String mode,
              Object object, Location location)
      {
          DeferredObject deferred = new DeferredObjectFixture(object, location);
  
          InfrastructureContribution ic = new InfrastructureContribution();
          ic.setDeferredObject(deferred);
          ic.setProperty(propertyName);
          ic.setMode(mode);
          ic.setLocation(location);
  
          return ic;
      }
  
      public void testGetPropertyUninitialized()
      {
          InfrastructureImpl infra = new InfrastructureImpl();
  
          try
          {
              infra.getProperty("foo");
              unreachable();
          }
          catch (IllegalStateException ex)
          {
              assertEquals(ImplMessages.infrastructureNotInitialized(), ex.getMessage());
          }
      }
  
      public void testGetNullProperty()
      {
          InfrastructureImpl infra = new InfrastructureImpl();
  
          infra.setNormalContributions(Collections.EMPTY_LIST);
          infra.setOverrideContributions(Collections.EMPTY_LIST);
  
          infra.initialize("test");
  
          try
          {
              infra.getProperty("fred");
              unreachable();
          }
          catch (ApplicationRuntimeException ex)
          {
              assertEquals(ImplMessages.missingInfrastructureProperty("fred"), ex.getMessage());
          }
      }
  
      public void testReinitalize()
      {
          InfrastructureImpl infra = new InfrastructureImpl();
  
          infra.setNormalContributions(Collections.EMPTY_LIST);
          infra.setOverrideContributions(Collections.EMPTY_LIST);
  
          infra.initialize("ONE");
  
          try
          {
              infra.initialize("TWO");
              unreachable();
          }
          catch (IllegalStateException ex)
          {
              assertEquals(ImplMessages.infrastructureAlreadyInitialized("TWO", "ONE"), ex
                      .getMessage());
          }
      }
  
      /**
       * Test that a contribution for a mode quietly overrides a contribution for the same property
       * that does not specify a mode.
       */
  
      public void testModeOverridesNonMode()
      {
          Object fredModal = new Object();
          Object plainFred = new Object();
  
          InfrastructureImpl infra = new InfrastructureImpl();
  
          List l = new ArrayList();
          l.add(newContribution("fred", "bedrock", fredModal));
          l.add(newContribution("fred", null, plainFred));
  
          infra.setNormalContributions(l);
          infra.setOverrideContributions(Collections.EMPTY_LIST);
  
          infra.initialize("bedrock");
  
          assertSame(fredModal, infra.getProperty("fred"));
      }
      
      public void testWrongModeIgnored()
      {
          Object fredModal = new Object();
          Object wrongFred = new Object();
  
          InfrastructureImpl infra = new InfrastructureImpl();
  
          List l = new ArrayList();
          l.add(newContribution("fred", "bedrock", fredModal));
          l.add(newContribution("fred", "shale", wrongFred));
  
          infra.setNormalContributions(l);
          infra.setOverrideContributions(Collections.EMPTY_LIST);
  
          infra.initialize("bedrock");
  
          assertSame(fredModal, infra.getProperty("fred"));
      }
  
      /**
       * Test that override contributions trump contributions from the normal path.
       */
  
      public void testOverrides()
      {
          Object normalFred = new Object();
          Object overrideFred = new Object();
  
          InfrastructureImpl infra = new InfrastructureImpl();
  
          infra.setNormalContributions(Collections.singletonList(newContribution(
                  "fred",
                  null,
                  normalFred)));
          infra.setOverrideContributions(Collections.singletonList(newContribution(
                  "fred",
                  null,
                  overrideFred)));
  
          infra.initialize("bedrock");
  
          assertSame(overrideFred, infra.getProperty("fred"));
      }
  
      public void testDuplicate()
      {
          ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
  
          Location l1 = fabricateLocation(99);
          Location l2 = fabricateLocation(132);
  
          Object fredModal = new Object();
          Object duplicateFred = new Object();
  
          List l = new ArrayList();
          l.add(newContribution("fred", "bedrock", fredModal, l1));
          InfrastructureContribution conflict = newContribution("fred", "bedrock", duplicateFred, l2);
          l.add(conflict);
  
          log.error(ImplMessages.duplicateInfrastructureContribution(conflict, l1), l2, null);
  
          replayControls();
  
          InfrastructureImpl infra = new InfrastructureImpl();
          infra.setNormalContributions(l);
          infra.setOverrideContributions(Collections.EMPTY_LIST);
          infra.setErrorLog(log);
  
          infra.initialize("bedrock");
  
          assertSame(fredModal, infra.getProperty("fred"));
  
          verifyControls();
      }
  }
  
  
  1.1                  jakarta-tapestry/framework/src/test/org/apache/tapestry/services/impl/TestDeferredObjectTranslator.java
  
  Index: TestDeferredObjectTranslator.java
  ===================================================================
  // Copyright 2005 The Apache Software Foundation
  //
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
  
  package org.apache.tapestry.services.impl;
  
  import org.apache.hivemind.Location;
  import org.apache.hivemind.internal.Module;
  import org.apache.hivemind.schema.Translator;
  import org.apache.hivemind.test.HiveMindTestCase;
  import org.easymock.MockControl;
  
  /**
   * Tests for {@link org.apache.tapestry.services.impl.DeferredObjectImpl}&nbsp;and
   * {@link org.apache.tapestry.services.impl.DeferredObjectTranslator}.
   * 
   * @author Howard M. Lewis Ship
   * @since 3.1
   */
  public class TestDeferredObjectTranslator extends HiveMindTestCase
  {
      private Module newModule()
      {
          return (Module) newMock(Module.class);
      }
  
      private Location newLocation()
      {
          return (Location) newMock(Location.class);
      }
  
      private Translator newTranslator(Module module, String objectReference, Location location,
              Object result)
      {
          MockControl control = newControl(Translator.class);
          Translator translator = (Translator) control.getMock();
  
          translator.translate(module, Object.class, objectReference, location);
          control.setReturnValue(result);
  
          return translator;
      }
  
      public void testDeferredObject()
      {
          Object object = new Object();
          Module module = newModule();
          Location l = newLocation();
          Translator translator = newTranslator(module, "OBJ-REFERENCE", l, object);
  
          replayControls();
  
          DeferredObject deferred = new DeferredObjectImpl(translator, module, "OBJ-REFERENCE", l);
  
          assertSame(object, deferred.getObject());
  
          // Check that a second call returns a cached value.
  
          assertSame(object, deferred.getObject());
  
          verifyControls();
  
          assertSame(l, deferred.getLocation());
      }
  
      public void testDeferredObjectTranslator()
      {
          Object object = new Object();
          Module module = newModule();
          Location l = newLocation();
          Translator objectTranslator = newTranslator(module, "OBJ-REFERENCE", l, object);
  
          replayControls();
  
          DeferredObjectTranslator translator = new DeferredObjectTranslator();
          translator.setObjectTranslator(objectTranslator);
  
          DeferredObject deferred = (DeferredObject) translator.translate(
                  module,
                  Object.class,
                  "OBJ-REFERENCE",
                  l);
  
          assertSame(object, deferred.getObject());
  
          // Check that a second call returns a cached value.
  
          assertSame(object, deferred.getObject());
  
          verifyControls();
  
          assertSame(l, deferred.getLocation());
      }
  }
  
  
  1.7       +4 -0      jakarta-tapestry/portlet/src/descriptor/META-INF/tapestry.portlet.services.xml
  
  Index: tapestry.portlet.services.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/portlet/src/descriptor/META-INF/tapestry.portlet.services.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- tapestry.portlet.services.xml	29 Mar 2005 22:19:54 -0000	1.6
  +++ tapestry.portlet.services.xml	3 Apr 2005 14:50:33 -0000	1.7
  @@ -90,6 +90,10 @@
     </invoke-factory>
    </service-point>
     
  +  <contribution configuration-id="tapestry.Infrastructure">
  +    <property name="responseRenderer" mode="portlet" object="service:ResponseRenderer"/>
  +  </contribution>
  +    
     <contribution configuration-id="hivemind.FactoryDefaults">
       <default symbol="org.apache.tapestry.portlet.home-page" value="View"/>
     </contribution>
  
  
  
  1.9       +6 -3      jakarta-tapestry/portlet/src/descriptor/META-INF/hivemodule.xml
  
  Index: hivemodule.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/portlet/src/descriptor/META-INF/hivemodule.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- hivemodule.xml	30 Mar 2005 16:27:05 -0000	1.8
  +++ hivemodule.xml	3 Apr 2005 14:50:33 -0000	1.9
  @@ -200,14 +200,17 @@
     <invoke-factory model="primitive">
       <construct class="SetupPortletApplicationGlobals">
         <set-service property="globals" service-id="tapestry.globals.ApplicationGlobals"/>
  -      <set-service property="responseRenderer" service-id="tapestry.portlet.services.ResponseRenderer"/>
  -      <set-service property="linkFactory" service-id="PortletLinkFactory"/>
         <set-configuration property="factoryServices" configuration-id="tapestry.portlet.services.FactoryServices"/>
  -      <set-service property="HTMLDescriber" service-id="PortletHTMLDescriber"/>      
  +      <set-service property="infrastructure" service-id="tapestry.Infrastructure"/>      
       </construct>
     </invoke-factory>
    </service-point>
    
  +  <contribution configuration-id="tapestry.Infrastructure">
  +    <property name="linkFactory" mode="portlet" object="service:PortletLinkFactory"/>
  +    <property name="HTMLDescriber" mode="portlet" object="service:PortletHTMLDescriber"/>
  +  </contribution>
  +   
    <contribution configuration-id="PortletApplicationInitializers">
     <command id="SetupServletApplicationGlobals" object="service:SetupPortletApplicationGlobals"/>
    </contribution> 
  
  
  
  1.4       +1 -1      jakarta-tapestry/portlet/src/test/org/apache/tapestry/portlet/TestApplicationPortlet.java
  
  Index: TestApplicationPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/portlet/src/test/org/apache/tapestry/portlet/TestApplicationPortlet.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestApplicationPortlet.java	31 Mar 2005 16:35:19 -0000	1.3
  +++ TestApplicationPortlet.java	3 Apr 2005 14:50:33 -0000	1.4
  @@ -119,7 +119,7 @@
           PortletContext context = (PortletContext) contextc.getMock();
   
           config.getPortletName();
  -        configc.setReturnValue("myportlet", 2);
  +        configc.setReturnValue("myportlet", 3);
   
           // Called once in ApplicationPortlet code,
           // then inside PortletWebContextInitializer
  
  
  
  1.1                  jakarta-tapestry/framework/src/test/org/apache/tapestry/error/TestExceptionPresenter.java
  
  Index: TestExceptionPresenter.java
  ===================================================================
  // Copyright 2005 The Apache Software Foundation
  //
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
  
  package org.apache.tapestry.error;
  
  import org.apache.hivemind.ApplicationRuntimeException;
  import org.apache.hivemind.test.HiveMindTestCase;
  import org.apache.tapestry.IPage;
  import org.apache.tapestry.IRequestCycle;
  import org.apache.tapestry.error.ExceptionPresenterImpl;
  import org.apache.tapestry.html.BasePage;
  import org.apache.tapestry.services.RequestExceptionReporter;
  import org.apache.tapestry.services.ResponseRenderer;
  import org.apache.tapestry.test.Creator;
  import org.easymock.MockControl;
  
  /**
   * Tests for {@link org.apache.tapestry.error.ExceptionPresenterImpl}.
   * 
   * @author Howard M. Lewis Ship
   * @since 3.1
   */
  public class TestExceptionPresenter extends HiveMindTestCase
  {
      public abstract static class ExceptionFixture extends BasePage
      {
          public abstract void setException(Throwable exception);
      }
  
      private IPage newPage()
      {
          Creator c = new Creator();
  
          return (IPage) c.newInstance(ExceptionFixture.class);
      }
  
      private IRequestCycle newCycle(String pageName, IPage page)
      {
          MockControl control = newControl(IRequestCycle.class);
          IRequestCycle cycle = (IRequestCycle) control.getMock();
  
          cycle.getPage(pageName);
          control.setReturnValue(page);
  
          return cycle;
      }
  
      private ResponseRenderer newRenderer(IRequestCycle cycle, Throwable throwable) throws Exception
      {
          MockControl control = newControl(ResponseRenderer.class);
          ResponseRenderer renderer = (ResponseRenderer) control.getMock();
  
          renderer.renderResponse(cycle);
  
          if (throwable != null)
              control.setThrowable(throwable);
  
          return renderer;
      }
  
      private RequestExceptionReporter newReporter()
      {
          return (RequestExceptionReporter) newMock(RequestExceptionReporter.class);
      }
  
      public void testSuccess() throws Exception
      {
          Throwable cause = new IllegalArgumentException();
          IPage page = newPage();
  
          IRequestCycle cycle = newCycle("Exception", page);
          ResponseRenderer renderer = newRenderer(cycle, null);
  
          cycle.activate(page);
  
          replayControls();
  
          ExceptionPresenterImpl ep = new ExceptionPresenterImpl();
          ep.setExceptionPageName("Exception");
          ep.setResponseRenderer(renderer);
  
          ep.presentException(cycle, cause);
  
          verifyControls();
  
          assertSame(cause, page.getProperty("exception"));
      }
  
      public void testFailure() throws Exception
      {
          Throwable cause = new IllegalArgumentException();
          Throwable renderCause = new ApplicationRuntimeException("Some failure.");
  
          IPage page = newPage();
  
          IRequestCycle cycle = newCycle("Exception", page);
          ResponseRenderer renderer = newRenderer(cycle, renderCause);
          RequestExceptionReporter reporter = newReporter();
  
          cycle.activate(page);
  
          reporter.reportRequestException(ErrorMessages.unableToProcessClientRequest(cause), cause);
          reporter.reportRequestException(
                  ErrorMessages.unableToPresentExceptionPage(renderCause),
                  renderCause);
  
          replayControls();
  
          ExceptionPresenterImpl ep = new ExceptionPresenterImpl();
          ep.setExceptionPageName("Exception");
          ep.setResponseRenderer(renderer);
          ep.setRequestExceptionReporter(reporter);
  
          try
          {
              ep.presentException(cycle, cause);
              unreachable();
          }
          catch (ApplicationRuntimeException ex)
          {
              assertSame(renderCause, ex.getRootCause());
          }
  
          verifyControls();
  
          assertSame(cause, page.getProperty("exception"));
      }
  }
  
  
  1.6       +3 -2      jakarta-tapestry/src/documentation/content/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/src/documentation/content/xdocs/index.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- index.xml	5 Jan 2005 23:17:19 -0000	1.5
  +++ index.xml	3 Apr 2005 14:50:33 -0000	1.6
  @@ -88,7 +88,7 @@
   </p>
   
   <p>
  -If you are using Tapestry in a production environment, it is recommended that you stick with Tapestry <strong>3.0.1</strong>,
  +If you are using Tapestry in a production environment, it is recommended that you stick with Tapestry <strong>3.0.3</strong>,
   the latest stable release.
   </p>
     
  @@ -146,7 +146,8 @@
   
   <p>
   A <link href="site:wiki">Wiki</link> has been set 
  -up to discuss Tapestry and plan new features.
  +up to discuss Tapestry and plan new features, as well as provide a list
  +of <link href="http://wiki.apache.org/jakarta-tapestry/TapestryTutorials">Tapestry tutorials.</link>
   </p>
   
   </section>
  
  
  
  1.2       +1 -5      jakarta-tapestry/portlet/src/java/org/apache/tapestry/portlet/SetupPortletApplicationGlobals.java
  
  Index: SetupPortletApplicationGlobals.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/portlet/src/java/org/apache/tapestry/portlet/SetupPortletApplicationGlobals.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SetupPortletApplicationGlobals.java	22 Mar 2005 21:54:39 -0000	1.1
  +++ SetupPortletApplicationGlobals.java	3 Apr 2005 14:50:34 -0000	1.2
  @@ -14,12 +14,8 @@
   
   package org.apache.tapestry.portlet;
   
  -import java.util.List;
  -
   import javax.portlet.PortletConfig;
   
  -import org.apache.tapestry.services.ApplicationGlobals;
  -import org.apache.tapestry.services.ResponseRenderer;
   import org.apache.tapestry.services.impl.AbstractSetupApplicationGlobals;
   
   /**
  @@ -35,7 +31,7 @@
   
       public void initialize(PortletConfig portletConfig)
       {
  -        initialize();
  +        initialize("portlet");
       }
   
   }
  \ No newline at end of file
  
  
  
  1.3       +5 -3      jakarta-tapestry/framework/src/test/org/apache/tapestry/junit/mock/wml/Mock.application
  
  Index: Mock.application
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/junit/mock/wml/Mock.application,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Mock.application	5 Jan 2005 23:17:24 -0000	1.2
  +++ Mock.application	3 Apr 2005 14:50:34 -0000	1.3
  @@ -16,12 +16,14 @@
   -->
   
   <!DOCTYPE application PUBLIC
  -  "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
  -  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
  +  "-//Apache Software Foundation//Tapestry Specification 3.1//EN"
  +  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_1.dtd">
   
   <application name="JUnit Mock WML Application" engine-class="org.apache.tapestry.wml.WMLEngine">
   
  -    <property name="org.apache.tapestry.template-extension" value="wml"/>
  +    <meta key="org.apache.tapestry.exception-page-name" value="WMLException"/>
  +	
  +    <meta key="org.apache.tapestry.template-extension" value="wml"/>
   
       <library id="wml" specification-path="/org/apache/tapestry/wml/WML.library"/>
   
  
  
  

---------------------------------------------------------------------
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