You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2008/08/05 02:44:00 UTC

svn commit: r682554 [1/2] - in /tapestry/tapestry5/trunk: src/site/apt/ src/site/apt/cookbook/ src/site/resources/cookbook/ tapestry-core/src/main/java/org/apache/tapestry5/ tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/ tapestry-core/s...

Author: hlship
Date: Mon Aug  4 17:43:59 2008
New Revision: 682554

URL: http://svn.apache.org/viewvc?rev=682554&view=rev
Log:
TAPESTRY-2552: Provide easier overrides for Grid, BeanEditor property display & edit blocks

Added:
    tapestry/tapestry5/trunk/src/site/resources/cookbook/
    tapestry/tapestry5/trunk/src/site/resources/cookbook/error1.png   (with props)
    tapestry/tapestry5/trunk/src/site/resources/cookbook/error2.png   (with props)
    tapestry/tapestry5/trunk/src/site/resources/cookbook/error3.png   (with props)
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/PropertyOverrides.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/PropertyOverridesImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ResponseRenderer.java
      - copied, changed from r679133, tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ResponseRenderer.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/PropertyOverridesImplTest.java
Removed:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ResponseRenderer.java
Modified:
    tapestry/tapestry5/trunk/src/site/apt/cookbook/index.apt
    tapestry/tapestry5/trunk/src/site/apt/index.apt
    tapestry/tapestry5/trunk/src/site/apt/upgrade.apt
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractPropertyOutput.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanDisplay.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanDisplay.xdoc
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditForm.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/GridColumns.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/GridRows.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/PropertyEditor.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ServiceStatus.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/BeanModelSourceImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DefaultRequestExceptionHandler.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/InternalModule.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ResponseRendererImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/BeanModelSource.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ExceptionReporter.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/PageDocumentGenerator.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/BeanDisplay.tml
    tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/GridRows.tml
    tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css
    tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/conf.apt
    tapestry/tapestry5/trunk/tapestry-core/src/site/apt/index.apt
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/BeanEditorTest.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/PropertyEditorTest.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/AdditionalIntegrationTests.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/AddedGridColumnsDemo.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/SimpleTrackGridDemo.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/grid/CollectionGridDataSourceTest.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/BeanModelSourceImplTest.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ResponseRendererImplTest.java

Modified: tapestry/tapestry5/trunk/src/site/apt/cookbook/index.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/apt/cookbook/index.apt?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/src/site/apt/cookbook/index.apt (original)
+++ tapestry/tapestry5/trunk/src/site/apt/cookbook/index.apt Mon Aug  4 17:43:59 2008
@@ -4,3 +4,6 @@
 
   The Tapestry Cookbook is a collection of tips and tricks for commonly occuring
   patterns in Tapestry.
+
+  The cookbook conists of a number of pages; use the standard site navigation (on the left side of the page)
+  to reach the pages.
\ No newline at end of file

Modified: tapestry/tapestry5/trunk/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/apt/index.apt?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/src/site/apt/index.apt (original)
+++ tapestry/tapestry5/trunk/src/site/apt/index.apt Mon Aug  4 17:43:59 2008
@@ -32,28 +32,6 @@
 
  Tapestry is released under the Apache Software Licence 2.0.
 
-Where To Go
-
- You are currently reading the Tapestry 5 project site.  Tapestry itself is broken into several modules:
- 
-*---+---+
-| {{{tapestry-annotations/index.html}tapestry-annotations}} | A few Tapestry annotations that may be used with non-component classes. |
-*---+---+
-| {{{tapestry-core/index.html}tapestry-core}} | The core implementation of the Tapestry framework, including all the primary built-in components. |
-*---+---+
-| {{{tapestry-hibernate/index.html}tapestry-hibernate}} |  Integration with the {{{http://hibernate.org}Hibernate}} Object/Relational Mapping framework. |
-*---+---+
-| {{{tapestry-ioc/index.html}tapestry-ioc}} |  The Tapestry Inversion of Control Container. |
-*---+---+
-| {{{tapestry-spring/index.html}tapestry-spring}} |  Integration with {{{http://springframework.org}Spring}}. |
-*---+---+
-| {{{tapestry-test/index.html}tapestry-test}} |  Tapestry test utilities. |
-*---+---+
-| {{{tapestry-upload/index.html}tapestry-upload}} |  Tapestry file upload component. |
-*---+---+
- 
-  Or, you can start with the {{{screencast.html}screencasts}}, which give you a better idea about how Tapestry fits together.
-
 Roadmap
 
   Tapestry is, of course, an open-source project, with all the work coming from unpaid volunteers.  That being said, our rough timeline is as follows:
@@ -68,8 +46,10 @@
     is increasingly stable.  Further "stable" with Tapestry usually refers to names of interfaces and methods, not to code quality,
     which is always very, very high.
 
-  * We are now edging towards a release candidate, with most work being documentation, minor bug fixes and modest
-    enhancements.
+  * We are now finally edging towards a release candidate, with most work being documentation, minor bug fixes and modest
+    enhancements. Note that Tapestry team members have been using Tapestry 5 to build production applications, and those
+    experiences are being applied back to the framework to improve its quality: we're finding rough edges and we're
+    smoothing them out.
      
   []
 
@@ -102,6 +82,29 @@
 | {{{http://code.google.com/p/tapestry5-treegrid/}tapestry5-treegrid}} | Gabriel Landais |  Combination tree navigation and data grid, based on sstree. |
 *--+--+--+
 
+New And Of Note
+
+  * Work has started on a {{{cookbook}Tapestry Cookbook}}, showing how to tackle common scenarios. 
+
+  * Component methods may be marked with the @Log annotation, to enable debug logging of
+    method entry (with parameters) and exit (with return value, or thrown exception).
+
+  * It is now possible to provide method invocation advice to component methods. This opens up
+    a very powerful Aspect Oriented Programming approach to Tapestry components.
+
+  * The Exception Report page now identifies the version of the Tapestry framework, and lists
+    out System properties (including the Java classpath).
+
+  * The {{{tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html}Grid}} component can now update itself in place,
+    using Ajax, when paging or sorting links are clicked.
+
+  * Added a zone parameter to the  {{{tapestry-core/ref/org/apache/tapestry5/corelib/components/BeanEditForm.html}BeanEditForm}}
+    component, to support Ajax updates.
+
+  * The @Cached annotation has been added to allowing the caching of method results.
+
+  []
+
 
 What's changed since Tapestry 4?
 
@@ -113,8 +116,7 @@
   * Components no longer extend from base classes.
   
   * {{{tapestry-core/guide/component-classes.html}Components classes are no longer <abstract>}}.  
-     Components are pure, simple POJOs (<plain old Java
-    objects>).
+     Components are pure, simple POJOs (<plain old Java objects>).
   
   * Tapestry no longer uses XML page and component specification files. Information that used to
     be supplied in such files is now supplied directly in the Java class, using Java annotations and naming conventions.
@@ -129,56 +131,88 @@
     
   []
   
-New and Noteworthy
-
-  * In order to support Tapestry 4 applications co-existing with Tapestry 5 applications within the same WAR,
-    a small number of Tapestry 5 classes and packages have been renamed or refactored.  For more information,
-    see the upgrade notes for
-    {{{tapestry-ioc/upgrade.html}tapestry-ioc}} and
-    {{{tapestry-core/upgrade.html}tapestry-core}}.
-
-  * A {{{faq/general.html}FAQ (Frequently Asked Questions) page}} has been added.
-
-  * An {{{tapestry-ioc/overview.html}overview}} and {{{tapestry-ioc/cookbook/}cookbook}} for Tapestry IoC has been written.
-
-  * The nightly build on the {{{http://tapestry.formos.com/bamboo}Bamboo CI server}} now creates 
-    {{{http://tapestry.formos.com/nightly/tapestry5/}full documentation}}.
-
-  * There is now a RegistryStartup service, allowing you to provide logic that executes when the Registry is first created.
 
-  * Logging in Tapestry is now implemented on top of {{{http://www.slf4j.org/docs.html}Simple Logging Facade for Java}}.
- 
-  * A file upload form component has been added, in a new library: {{{tapestry-upload/}tapestry-upload}}. 
- 
-  * The {{{tapestry-spring/}tapestry-spring}} module has also been simplified, to make
-  Spring beans look like Tapestry IoC services. It's all now quite seamless.
-
-  * The {{{tapestry-ioc/}tapestry-ioc}} module has been simplified, removing the concept
-  of module ids and namespaces, as well as private services, and borrowing a lot of cool
-  ideas from {{{http://code.google.com/p/google-guice/}Guice}}. The goal is to make the container
-  all but invisible.
-
-  * Work has been started on {{{http://hibernate.org}Hibernate}} integration in the
-  new {{{tapestry-hibernate/}tapestry-hibernate}} module.
-
-  * A few simple utility classes for building integration tests (on top of 
-  {{{http://www.openqa.org/selenium/}Selenium}}) have been split out as a new module: 
-  {{{tapestry-test/}tapestry-test}}.
-    
-  * A  module for integrating Tapestry 5 with {{{http://springframework.org/}Spring}} has been
-  added: {{{tapestry-spring/}tapestry-spring}}.
+Adaptive API
 
-  * A Maven plugin to generate documentation about components and parameters has been added:
-  {{{tapestry-component-report/}tapestry-component-report}}.
- 
-  * {{{http://www.formos.com}Formos}} has donated hardware and bandwidth to support the Tapestry project, starting
-  with a {{{http://tapestry.formos.com/bamboo}continuous integration site}} running on
-  {{{http://www.atlassian.com/software/bamboo/}Bamboo}}.  And thanks to Atlassian for donating
-  the Bamboo license.
+  A key feature of Tapestry 5 is <adaptive API>.
 
-  * Howard Lewis Ship has begun work on a {{{tutorial1/}Tapestry 5 Tutorial}}. 
-  
-  [] 
+  In traditional Java frameworks, including Tapestry 4, user code is expected to
+  conform to the framework.  You create classes that extend from framework-provided
+  base classes, or implement framework-provided interfaces.
+
+  This works well until you upgrade to the next release of the framework: with
+  the new features of the upgrade, you will more often than not experience breaks
+  in backwards compatibility. Interfaces or base classes will have changed and your
+  existing code will need to be changed to match.
+
+  In Tapestry 5, the framework <adapts to your code>.  You have control over the
+  names of the methods, the parameters they take, and the value that is returned. This
+  is driven by annotations, which tell Tapestry under what circumstances your
+  methods are to be invoked.
+
+  For example, you may have a login form and have a method that gets invoked
+  when the form is submitted:
+
++----+
+public class Login
+{
+  @Persist
+  @Property
+  private String userId;
+
+  @Property
+  private String password;
+
+  @Component
+  private Form form;
+
+  @Inject
+  private LoginAuthenticator authenticator;
+
+  void onValidateForm()
+  {
+    if (! authenticator.isValidLogin(userId, password))
+    {
+      form.recordError("Invalid user name or password.");
+    }
+  }
+
+  Object onSuccess()
+  {
+    return PostLogin.class;
+  }
+
+}
++----+
+
+  This short snippet demonstrates a bit about how Tapestry operates.  Pages and services
+  within the application are injected with the @Inject annotation. The method names, onValidateForm()
+  and onSuccess(),
+  inform Tapestry about when the method is to be invoked.  The two events <validateForm> and <success> occur
+  when a form is submitted; "validateForm" is triggered to perform cross-field validations, and "success" is
+  only triggered when there are no validation errors. The onSuccess() method's
+  return value directs Tapestry on what to do next: jump to another page within the application
+  (here identified as the class for the page, but many other options exist).  When there are exceptions,
+  the page will be redisplayed to the user.
+
+  This also represents a distinct change from Tapestry 4. In earlier versions of Tapestry,
+  the Form component's listener parameter would be bound to the method to invoke, by name.  Further,
+  the listener method had to be public.
+  This new approach not only support multiple listeners, but provides an improved separation of
+  view concerns (inside the page's HTML template) and logic concerns, inside the Java class.
+
+  In many cases, additional information about the event is available, and can be passed
+  into the method by adding parameters to the method. Again, Tapestry will adapt
+  to your parameters, in whatever order you supply them.
+
+  Tapestry also saves you effort:  the @Property annotation marks a field as readable and writable;
+  Tapestry will provide the accessor methods automatically.
+
+  Finally, Tapestry 5 explicitly separates actions (requests that change things) and rendering (requests that
+  render pages) into two separate requests.  Performing an action, such as clicking a link or submitting a form,
+  results in a <client side redirect> to the new page. This is often called "redirect after post". This helps ensure
+  that URLs in the browser are book-markable ... but also requires that a bit more information be stored in the session
+  between requests (using the @Persist annotation).
     
 About Snapshots and Releases
 
@@ -211,7 +245,7 @@
 
   Tapestry is designed to be extremely scalable in several dimensions:
   
-  * Tapestry applications may contain many pages and many custom components.
+  * Tapestry applications may contain large numbers of pages and many custom components.
   
   * Tapestry applications may contain very complex functionality.
   

Modified: tapestry/tapestry5/trunk/src/site/apt/upgrade.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/apt/upgrade.apt?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/src/site/apt/upgrade.apt (original)
+++ tapestry/tapestry5/trunk/src/site/apt/upgrade.apt Mon Aug  4 17:43:59 2008
@@ -14,10 +14,19 @@
 
 Release 5.0.14
 
+  The signature of the
+  {{{../apidocs/org/apache/tapestry5/services/BeanModelSource.html}BeanModelSource}}.create()
+  method has changed; the last parameter is now Messages, not ComponentResources.
+
+  The Grid, PropertyDisplay, PropertyEditor and BeanEditor components have had their override
+  parameter changed from ComponentResources to
+  the new {{{apidocs/org/apache/tapestry5/PropertyOverrides.html}PropertyOverrides}} interface.
+  No changes should be necessary, as Tapestry can coerce ComponentResources to PropertyOverrides.
+
   Attempting to instantiate a component class will now result in a runtime exception (this is a common
-  beginner's mistake, pages and components should be injected, not instantiated).
+  beginner's mistake; pages and components should be injected, not instantiated).
 
-  Properties files in message catalogs are now already read using the UTF-8 charset.  Unlike traditional
+  Properties files in message catalogs are now automatically read using the UTF-8 charset.  Unlike traditional
   Java ResourceBundles, it is <not> necessary to use Java's <<<native2ascii>>> tool.
 
 * {{{https://issues.apache.org/jira/browse/TAPESTRY-2543}TAPESTRY-2543}}

Added: tapestry/tapestry5/trunk/src/site/resources/cookbook/error1.png
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/resources/cookbook/error1.png?rev=682554&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry5/trunk/src/site/resources/cookbook/error1.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry5/trunk/src/site/resources/cookbook/error2.png
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/resources/cookbook/error2.png?rev=682554&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry5/trunk/src/site/resources/cookbook/error2.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry5/trunk/src/site/resources/cookbook/error3.png
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/resources/cookbook/error3.png?rev=682554&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry5/trunk/src/site/resources/cookbook/error3.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/PropertyOverrides.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/PropertyOverrides.java?rev=682554&view=auto
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/PropertyOverrides.java (added)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/PropertyOverrides.java Mon Aug  4 17:43:59 2008
@@ -0,0 +1,41 @@
+//  Copyright 2008 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.tapestry5;
+
+import org.apache.tapestry5.ioc.Messages;
+
+/**
+ * Provides access to blocks and messages used when overriding property labels, and property display or edit blocks.
+ * Generally, this is a wrapper around {@link org.apache.tapestry5.ComponentResources}. An explicit implementation of
+ * this could be used to, for example, search for override blocks in multiple places.
+ *
+ * @see org.apache.tapestry5.corelib.components.PropertyDisplay
+ * @see org.apache.tapestry5.corelib.components.PropertyEditor
+ */
+public interface PropertyOverrides
+{
+    /**
+     * Returns the override messages (normally, the messages catalog for the component's container).
+     */
+    Messages getOverrideMessages();
+
+    /**
+     * Searches for an override block with the given name.
+     *
+     * @param name the name of the block (typically, an informal parameter to a component)
+     * @return the block if found, or null if not found
+     */
+    Block getOverrideBlock(String name);
+}

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java Mon Aug  4 17:43:59 2008
@@ -78,4 +78,10 @@
      * incoming requests. The default is "UTF-8".
      */
     public static final String CHARSET = "tapestry.charset";
+
+    /**
+     * Name of page used to report exceptions; the page must implement {@link org.apache.tapestry5.services.ExceptionReporter}.
+     * This is used by the default exception report handler service.
+     */
+    public static final String EXCEPTION_REPORT_PAGE = "ExceptionReport";
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractPropertyOutput.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractPropertyOutput.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractPropertyOutput.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/base/AbstractPropertyOutput.java Mon Aug  4 17:43:59 2008
@@ -15,9 +15,9 @@
 package org.apache.tapestry5.corelib.base;
 
 import org.apache.tapestry5.Block;
-import org.apache.tapestry5.ComponentResources;
 import org.apache.tapestry5.MarkupWriter;
 import org.apache.tapestry5.PropertyConduit;
+import org.apache.tapestry5.PropertyOverrides;
 import org.apache.tapestry5.annotations.Parameter;
 import org.apache.tapestry5.beaneditor.PropertyModel;
 import org.apache.tapestry5.ioc.Messages;
@@ -46,11 +46,10 @@
     private PropertyModel model;
 
     /**
-     * Resources used to search for block parameter overrides (this is normally the enclosing Grid component's
-     * resources).
+     * Used to search for block parameter overrides (this is normally the enclosing Grid component's resources).
      */
     @Parameter(required = true, allowNull = false)
-    private ComponentResources overrides;
+    private PropertyOverrides overrides;
 
     /**
      * Identifies the object being rendered. The component will extract a property from the object and render its value
@@ -78,7 +77,7 @@
      */
     protected Object renderPropertyValue(MarkupWriter writer, String overrideBlockId)
     {
-        Block override = overrides.getBlockParameter(overrideBlockId);
+        Block override = overrides.getOverrideBlock(overrideBlockId);
 
         if (override != null) return override;
 
@@ -90,7 +89,7 @@
             {
                 public Messages getMessages()
                 {
-                    return getOverrideMessages();
+                    return overrides.getOverrideMessages();
                 }
 
                 public Object getPropertyValue()
@@ -144,11 +143,6 @@
         }
     }
 
-    private Messages getOverrideMessages()
-    {
-        return overrides.getContainerMessages();
-    }
-
     /**
      * Returns false; there's no template and this prevents the body from rendering.
      */

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanDisplay.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanDisplay.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanDisplay.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanDisplay.java Mon Aug  4 17:43:59 2008
@@ -28,9 +28,15 @@
 import org.apache.tapestry5.services.ComponentDefaultProvider;
 
 /**
- * Used to display the properties of a bean, using an underlying {@link BeanModel}. The output is a series of
- * &lt;div&gt; elements for the property names and property values.   Only properties that have a known data type are
- * displayed.
+ * Used to display the properties of a bean, using an underlying {@link BeanModel}. The output definition list: a
+ * &lt;dl&gt; element containing a series of &lt;dt&gt;/&lt;dd&gt; pairs.  The property label is used as the &lt;dt&gt;
+ * and the property value (formatted as per the datatype) is the &lt;dd&gt;. Only properties that have a known data type
+ * are displayed.
+ * <p/>
+ * The property id is used as the class attribute of the &lt;dt&gt; and &lt;dd&gt; element, allowing CSS customization
+ * per property.  This does not occur when lean is bound to true.
+ * <p/>
+ * The outer &lt;dl&gt; element has the CSS class "t-beandisplay".
  *
  * @see org.apache.tapestry5.beaneditor.DataType
  * @see BeanModel
@@ -48,8 +54,7 @@
     private Object object;
 
     /**
-     * If true, then &lt;span&gt; tags around each output property will be omitted. If false, then a span tag (to
-     * identify the id of each property as the CSS class attribute) will be included.
+     * If true, then the CSS class attribute on the &lt;dt&gt; and &lt;dd&gt; elements will be ommitted.
      */
     @Parameter(value = "false")
     private boolean lean;
@@ -125,8 +130,8 @@
 
     void setupRender()
     {
-        if (model == null) model = modelSource.create(object.getClass(), false, overrides
-                .getContainerResources());
+        if (model == null) model = modelSource.create(object.getClass(), false,
+                                                      overrides.getContainerMessages());
 
         BeanModelUtils.modify(model, add, include, exclude, reorder);
     }
@@ -139,21 +144,9 @@
         return model.get(propertyName);
     }
 
-    public String getLabelClass()
-    {
-        return generateClassValue("t-beandisplay-label");
-    }
 
-    private String generateClassValue(String className)
+    public String getPropertyClass()
     {
-        if (lean) return className;
-
-        return className + " " + getPropertyModel().getId();
+        return lean ? null : getPropertyModel().getId();
     }
-
-    public String getValueClass()
-    {
-        return generateClassValue("t-beandisplay-value");
-    }
-
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanDisplay.xdoc
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanDisplay.xdoc?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanDisplay.xdoc (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanDisplay.xdoc Mon Aug  4 17:43:59 2008
@@ -30,30 +30,30 @@
                 <source><![CDATA[
 public class User
 {
-    private long _id;
+    @NonVisual
+    private long id;
     
-    private String _firstName;
+    private String firstName;
 
-    private String _lastName;
+    private String lastName;
 
-    private int _age;
+    private int age;
 
-    public long getId() { return _id; }
+    public long getId() { return id; }
 
-    @NonVisual
-    public void setId(long id) { _id = id; }
+     public void setId(long id) { this.id = id; }
 
-    public String getFirstName() { return _firstName; }
+    public String getFirstName() { return firstName; }
 
-    public void setFirstName(String firstName) { _firstName = firstName; }
+    public void setFirstName(String firstName) { this.firstName = firstName; }
 
-    public String getLastName() { return _lastName; }
+    public String getLastName() { return lastName; }
 
-    public void setLastName(String lastName) { _lastName = lastName; }
+    public void setLastName(String lastName) { this.lastName = lastName; }
 
-    public int getAge() { return _age; }
+    public int getAge() { return age; }
 
-    public void setAge(int age) { _age = age; }
+    public void setAge(int age) { this.age = age; }
 }]]></source>
 
                 <p>The @NonVisual annotation prevents the id property from being displayed.</p>
@@ -65,16 +65,16 @@
 public class ViewUser
 {
     @Persist
-    private User _user;
+    private User user;
 
     public User getUser()
     {
-        return _user;
+        return user;
     }
 
     public void setUser(User user)
     {
-        _user = user;
+        this.user = user;
     }
 }]]></source>
 
@@ -117,6 +117,30 @@
             </subsection>
         </section>
 
+        <section name="CSS Customization">
+
+            <p>
+                The content is rendered as a &lt;dl&gt; (definition list) element, containing &lt;dt&gt; (term) and
+                &lt;dd&gt; (definition) elements.
+            </p>
+
+            <p>
+                The &lt;dt&gt; will have the CSS class "t-beandisplay".
+            </p>
+
+            <p>
+                The &lt;dt&gt; and &lt;dd&gt; elements will have the property id as the CSS class name (i.e.,
+                "firstName", "lastName", etc.). This allows individual properties of the bean to have specific CSS rules
+                applied.
+            </p>
+
+            <p>
+                The ":" after the property label is supplied via CSS.
+            </p>
+
+
+        </section>
+
         <section name="Notes">
 
             <p>
@@ -127,7 +151,7 @@
 
             <p>
                 You can accomplish the same thing by changing the order of the
-                getter methods in the bean class.  The default order for properties is not alphabetical,
+                getter methods in the bean class. The default order for properties is not alphabetical,
                 it is the order of the getter methods.
             </p>
 
@@ -154,7 +178,7 @@
             <p>
                 Please refer to the
                 <a href="PageLink.html">PageLink</a>
-                component documentation for an alternate way to manage the _user field.
+                component documentation for an alternate way to manage the user field.
             </p>
 
         </section>

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditForm.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditForm.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditForm.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditForm.java Mon Aug  4 17:43:59 2008
@@ -108,7 +108,7 @@
     @Parameter(defaultPrefix = BindingConstants.LITERAL)
     private String zone;
 
-    @Component(parameters = { "clientValidation=inherit:clientValidation", "zone=inherit:zone" })
+    @Component(parameters = {"clientValidation=inherit:clientValidation", "zone=inherit:zone"})
     private Form form;
 
     /**
@@ -146,7 +146,7 @@
         {
             Class beanType = resources.getBoundType("object");
 
-            model = beanModelSource.create(beanType, true, resources.getContainerResources());
+            model = beanModelSource.create(beanType, true, resources.getContainerMessages());
         }
 
         BeanModelUtils.modify(model, add, include, exclude, reorder);

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/BeanEditor.java Mon Aug  4 17:43:59 2008
@@ -14,10 +14,7 @@
 
 package org.apache.tapestry5.corelib.components;
 
-import org.apache.tapestry5.Binding;
-import org.apache.tapestry5.BindingConstants;
-import org.apache.tapestry5.ComponentAction;
-import org.apache.tapestry5.ComponentResources;
+import org.apache.tapestry5.*;
 import org.apache.tapestry5.annotations.Environmental;
 import org.apache.tapestry5.annotations.Parameter;
 import org.apache.tapestry5.annotations.Property;
@@ -106,9 +103,9 @@
      * itself, but when the component is used within a BeanEditForm, it will be the BeanEditForm's resources that will
      * be searched.
      */
-    @Parameter(value = "componentResources")
+    @Parameter(value = "this", allowNull = false)
     @Property(write = false)
-    private ComponentResources overrides;
+    private PropertyOverrides overrides;
 
     @Inject
     private BeanModelSource modelSource;
@@ -152,7 +149,7 @@
         if (model == null)
         {
             Class type = resources.getBoundType("object");
-            model = modelSource.create(type, true, overrides.getContainerResources());
+            model = modelSource.create(type, true, overrides.getOverrideMessages());
         }
 
         BeanModelUtils.modify(model, add, include, exclude, reorder);
@@ -179,7 +176,7 @@
     }
 
     // For testing
-    void inject(ComponentResources resources, ComponentResources overrides, BeanModelSource source)
+    void inject(ComponentResources resources, PropertyOverrides overrides, BeanModelSource source)
     {
         this.resources = resources;
         this.overrides = overrides;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java Mon Aug  4 17:43:59 2008
@@ -214,16 +214,29 @@
 
     @SuppressWarnings("unused")
     @Component(
-            parameters = { "lean=inherit:lean", "overrides=componentResources", "zone=zone" })
+            parameters = {
+                    "lean=inherit:lean",
+                    "overrides=overrides",
+                    "zone=zone"})
     private GridColumns columns;
 
     @SuppressWarnings("unused")
     @Component(
-            parameters = { "rowClass=rowClass", "rowsPerPage=rowsPerPage", "currentPage=currentPage", "row=row",
-                    "volatile=inherit:volatile", "lean=inherit:lean" })
+            parameters = {
+                    "rowClass=rowClass",
+                    "rowsPerPage=rowsPerPage",
+                    "currentPage=currentPage",
+                    "row=row",
+                    "overrides=overrides",
+                    "volatile=inherit:volatile",
+                    "lean=inherit:lean"})
     private GridRows rows;
 
-    @Component(parameters = { "source=dataSource", "rowsPerPage=rowsPerPage", "currentPage=currentPage", "zone=zone" })
+    @Component(parameters = {
+            "source=dataSource",
+            "rowsPerPage=rowsPerPage",
+            "currentPage=currentPage",
+            "zone=zone"})
     private GridPager pager;
 
     @SuppressWarnings("unused")
@@ -248,6 +261,14 @@
     private RenderSupport renderSupport;
 
     /**
+     * Defines where block and label overrides are obtained from. By default, the Grid component provides block
+     * overrides (from its block parameters).
+     */
+    @Parameter(value = "this", allowNull = false)
+    @Property(write = false)
+    private PropertyOverrides overrides;
+
+    /**
      * Set up via the traditional or Ajax component event request handler
      */
     @Environmental
@@ -364,7 +385,7 @@
 
                 // Properties do not have to be read/write
 
-                return modelSource.create(rowType, false, containerResources);
+                return modelSource.create(rowType, false, overrides.getOverrideMessages());
             }
 
             /**

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/GridColumns.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/GridColumns.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/GridColumns.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/GridColumns.java Mon Aug  4 17:43:59 2008
@@ -17,6 +17,7 @@
 import org.apache.tapestry5.Asset;
 import org.apache.tapestry5.Block;
 import org.apache.tapestry5.ComponentResources;
+import org.apache.tapestry5.PropertyOverrides;
 import org.apache.tapestry5.annotations.*;
 import org.apache.tapestry5.beaneditor.PropertyModel;
 import org.apache.tapestry5.grid.ColumnSort;
@@ -55,8 +56,8 @@
      * Where to look for informal parameter Blocks used to override column headers.  The default is to look for such
      * overrides in the GridColumns component itself, but this is usually overridden.
      */
-    @Parameter("componentResources")
-    private ComponentResources overrides;
+    @Parameter("this")
+    private PropertyOverrides overrides;
 
 
     /**
@@ -67,7 +68,7 @@
 
     @SuppressWarnings("unused")
     @Component(
-            parameters = { "event=sort", "disabled=sortDisabled", "context=columnContext", "class=sortLinkClass", "zone=inherit:zone" })
+            parameters = {"event=sort", "disabled=sortDisabled", "context=columnContext", "class=sortLinkClass", "zone=inherit:zone"})
     private EventLink sort, sort2;
 
     @Inject
@@ -171,7 +172,7 @@
     {
         onSort(columnId);
 
-        resources.triggerEvent(InternalConstants.GRID_INPLACE_UPDATE, new Object[] { zone }, null);
+        resources.triggerEvent(InternalConstants.GRID_INPLACE_UPDATE, new Object[]{zone}, null);
 
         // Event is handled, don't trigger further event handler methods.
 
@@ -197,7 +198,7 @@
     {
         if (zone == null) return columnModel.getId();
 
-        return new Object[] { columnModel.getId(), zone };
+        return new Object[]{columnModel.getId(), zone};
     }
 
     public String getIconLabel()
@@ -227,7 +228,7 @@
 
     public Block getBlockForColumn()
     {
-        Block override = overrides.getBlockParameter(columnModel.getId() + "Header");
+        Block override = overrides.getOverrideBlock(columnModel.getId() + "Header");
 
         if (override != null) return override;
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/GridRows.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/GridRows.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/GridRows.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/GridRows.java Mon Aug  4 17:43:59 2008
@@ -28,6 +28,7 @@
 package org.apache.tapestry5.corelib.components;
 
 import org.apache.tapestry5.ComponentAction;
+import org.apache.tapestry5.PropertyOverrides;
 import org.apache.tapestry5.annotations.Environmental;
 import org.apache.tapestry5.annotations.Parameter;
 import org.apache.tapestry5.annotations.Property;
@@ -90,6 +91,13 @@
     private GridModel gridModel;
 
     /**
+     * Where to search for property override blocks.
+     */
+    @Parameter(required = true, allowNull = false)
+    @Property
+    private PropertyOverrides overrides;
+
+    /**
      * Number of rows displayed on each page. Long result sets are split across multiple pages.
      */
     @Parameter(required = true)

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/PropertyEditor.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/PropertyEditor.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/PropertyEditor.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/PropertyEditor.java Mon Aug  4 17:43:59 2008
@@ -88,10 +88,10 @@
     /**
      * Where to search for local overrides of property editing blocks as block parameters. This is normally the
      * containing component of the PropertyEditor, but when the component is used within a BeanEditor, it will be the
-     * BeanEditForm's block parameters that will be searched.
+     * BeanEditor's block parameters that will be searched.
      */
-    @Parameter(value = "componentResources")
-    private ComponentResources overrides;
+    @Parameter(value = "this", allowNull = false)
+    private PropertyOverrides overrides;
 
     /**
      * Identifies the property to be edited by the editor.
@@ -143,7 +143,7 @@
         {
             public Messages getContainerMessages()
             {
-                return overrides.getContainerMessages();
+                return overrides.getOverrideMessages();
             }
 
             public String getLabel()
@@ -174,7 +174,7 @@
             public FieldValidator getValidator(Field field)
             {
                 return fieldValidatorDefaultSource.createDefaultValidator(field, propertyName,
-                                                                          overrides.getContainerMessages(), locale,
+                                                                          overrides.getOverrideMessages(), locale,
                                                                           propertyModel.getPropertyType(),
                                                                           propertyModel.getConduit());
             }
@@ -230,7 +230,7 @@
      */
     Block beginRender()
     {
-        Block override = overrides.getBlockParameter(propertyModel.getId());
+        Block override = overrides.getOverrideBlock(propertyModel.getId());
 
         if (override != null)
         {
@@ -269,7 +269,7 @@
     /**
      * Used for testing.
      */
-    void inject(ComponentResources resources, ComponentResources overrides, PropertyModel propertyModel,
+    void inject(ComponentResources resources, PropertyOverrides overrides, PropertyModel propertyModel,
                 BeanBlockSource beanBlockSource, Messages messages, Object object)
     {
         this.resources = resources;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java Mon Aug  4 17:43:59 2008
@@ -17,13 +17,13 @@
 import org.apache.tapestry5.*;
 import org.apache.tapestry5.ContentType;
 import org.apache.tapestry5.annotations.*;
-import org.apache.tapestry5.internal.services.ResponseRenderer;
 import org.apache.tapestry5.internal.util.Holder;
 import org.apache.tapestry5.ioc.annotations.Inject;
 import org.apache.tapestry5.ioc.services.TypeCoercer;
 import org.apache.tapestry5.json.JSONObject;
 import org.apache.tapestry5.services.MarkupWriterFactory;
 import org.apache.tapestry5.services.Request;
+import org.apache.tapestry5.services.ResponseRenderer;
 import org.apache.tapestry5.util.TextStreamResponse;
 
 import java.util.Collections;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ServiceStatus.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ServiceStatus.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ServiceStatus.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/ServiceStatus.java Mon Aug  4 17:43:59 2008
@@ -1,4 +1,4 @@
-// Copyright 2007 The Apache Software Foundation
+// Copyright 2007, 2008 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.
@@ -14,10 +14,10 @@
 
 package org.apache.tapestry5.corelib.pages;
 
-import org.apache.tapestry5.ComponentResources;
 import org.apache.tapestry5.annotations.Meta;
 import org.apache.tapestry5.annotations.Property;
 import org.apache.tapestry5.beaneditor.BeanModel;
+import org.apache.tapestry5.ioc.Messages;
 import org.apache.tapestry5.ioc.Registry;
 import org.apache.tapestry5.ioc.annotations.Inject;
 import org.apache.tapestry5.ioc.services.ServiceActivity;
@@ -52,10 +52,10 @@
     private final BeanModel model;
 
     @Inject
-    private ComponentResources resources;
+    private Messages messages;
 
     {
-        model = source.create(ServiceActivity.class, false, resources);
+        model = source.create(ServiceActivity.class, false, messages);
 
         model.add("serviceInterface", null);
 

Added: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/PropertyOverridesImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/PropertyOverridesImpl.java?rev=682554&view=auto
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/PropertyOverridesImpl.java (added)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/PropertyOverridesImpl.java Mon Aug  4 17:43:59 2008
@@ -0,0 +1,44 @@
+//  Copyright 2008 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.tapestry5.internal;
+
+import org.apache.tapestry5.Block;
+import org.apache.tapestry5.ComponentResources;
+import org.apache.tapestry5.PropertyOverrides;
+import org.apache.tapestry5.ioc.Messages;
+
+public class PropertyOverridesImpl implements PropertyOverrides
+{
+    private final ComponentResources resources;
+
+    private final Messages messages;
+
+    public PropertyOverridesImpl(ComponentResources resources)
+    {
+        this.resources = resources;
+
+        messages = resources.getContainerMessages();
+    }
+
+    public Block getOverrideBlock(String name)
+    {
+        return resources.getBlockParameter(name);
+    }
+
+    public Messages getOverrideMessages()
+    {
+        return messages;
+    }
+}

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/BeanModelSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/BeanModelSourceImpl.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/BeanModelSourceImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/BeanModelSourceImpl.java Mon Aug  4 17:43:59 2008
@@ -14,7 +14,6 @@
 
 package org.apache.tapestry5.internal.services;
 
-import org.apache.tapestry5.ComponentResources;
 import org.apache.tapestry5.beaneditor.BeanModel;
 import org.apache.tapestry5.beaneditor.NonVisual;
 import org.apache.tapestry5.beaneditor.ReorderProperties;
@@ -141,12 +140,10 @@
         this.locator = locator;
     }
 
-    public <T> BeanModel<T> create(Class<T> beanClass, boolean filterReadOnlyProperties, ComponentResources resources)
+    public <T> BeanModel<T> create(Class<T> beanClass, boolean filterReadOnlyProperties, Messages messages)
     {
         Defense.notNull(beanClass, "beanClass");
-        Defense.notNull(resources, "resources");
-
-        Messages messages = resources.getMessages();
+        Defense.notNull(messages, "messages");
 
         ClassPropertyAdapter adapter = propertyAccess.getAdapter(beanClass);
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DefaultRequestExceptionHandler.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DefaultRequestExceptionHandler.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DefaultRequestExceptionHandler.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DefaultRequestExceptionHandler.java Mon Aug  4 17:43:59 2008
@@ -14,7 +14,10 @@
 
 package org.apache.tapestry5.internal.services;
 
+import org.apache.tapestry5.SymbolConstants;
 import org.apache.tapestry5.internal.structure.Page;
+import org.apache.tapestry5.ioc.annotations.Inject;
+import org.apache.tapestry5.ioc.annotations.Symbol;
 import org.apache.tapestry5.services.ExceptionReporter;
 import org.apache.tapestry5.services.RequestExceptionHandler;
 import org.slf4j.Logger;
@@ -33,18 +36,24 @@
 
     private final Logger logger;
 
-    public DefaultRequestExceptionHandler(RequestPageCache pageCache, PageResponseRenderer renderer, Logger logger)
+    private final String pageName;
+
+    public DefaultRequestExceptionHandler(RequestPageCache pageCache, PageResponseRenderer renderer, Logger logger,
+
+                                          @Inject @Symbol(SymbolConstants.EXCEPTION_REPORT_PAGE)
+                                          String pageName)
     {
         this.pageCache = pageCache;
         this.renderer = renderer;
         this.logger = logger;
+        this.pageName = pageName;
     }
 
     public void handleRequestException(Throwable exception) throws IOException
     {
         logger.error(ServicesMessages.requestException(exception), exception);
 
-        Page page = pageCache.get("ExceptionReport");
+        Page page = pageCache.get(pageName);
 
         ExceptionReporter rootComponent = (ExceptionReporter) page.getRootComponent();
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/InternalModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/InternalModule.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/InternalModule.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/InternalModule.java Mon Aug  4 17:43:59 2008
@@ -79,7 +79,6 @@
         binder.bind(PageRenderQueue.class, PageRenderQueueImpl.class);
         binder.bind(AjaxPartialResponseRenderer.class, AjaxPartialResponseRendererImpl.class);
         binder.bind(PageContentTypeAnalyzer.class, PageContentTypeAnalyzerImpl.class);
-        binder.bind(ResponseRenderer.class, ResponseRendererImpl.class);
         binder.bind(RequestPathOptimizer.class, RequestPathOptimizerImpl.class);
         binder.bind(PageResourcesSource.class, PageResourcesSourceImpl.class);
         binder.bind(RequestSecurityManager.class, RequestSecurityManagerImpl.class);

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ResponseRendererImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ResponseRendererImpl.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ResponseRendererImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ResponseRendererImpl.java Mon Aug  4 17:43:59 2008
@@ -18,6 +18,7 @@
 import org.apache.tapestry5.internal.structure.Page;
 import org.apache.tapestry5.ioc.internal.util.Defense;
 import org.apache.tapestry5.runtime.Component;
+import org.apache.tapestry5.services.ResponseRenderer;
 
 import java.io.IOException;
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/BeanModelSource.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/BeanModelSource.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/BeanModelSource.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/BeanModelSource.java Mon Aug  4 17:43:59 2008
@@ -14,8 +14,8 @@
 
 package org.apache.tapestry5.services;
 
-import org.apache.tapestry5.ComponentResources;
 import org.apache.tapestry5.beaneditor.BeanModel;
+import org.apache.tapestry5.ioc.Messages;
 
 /**
  * Used by a component to create a default {@link org.apache.tapestry5.beaneditor.BeanModel} for a particular bean
@@ -43,9 +43,8 @@
      *                                 etc.). If false, then both read-only and read-write properties will be included
      *                                 (appropriate for {@link org.apache.tapestry5.corelib.components.Grid} or {@link
      *                                 org.apache.tapestry5.corelib.components.BeanDisplay}).
-     * @param resources                used when resolving resources, especially component messages (used to access
-     *                                 labels)
+     * @param messages                 Used to find explicit overrides of
      * @return a model
      */
-    <T> BeanModel<T> create(Class<T> beanClass, boolean filterReadOnlyProperties, ComponentResources resources);
+    <T> BeanModel<T> create(Class<T> beanClass, boolean filterReadOnlyProperties, Messages messages);
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ExceptionReporter.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ExceptionReporter.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ExceptionReporter.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ExceptionReporter.java Mon Aug  4 17:43:59 2008
@@ -1,30 +1,30 @@
-// Copyright 2006 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.
-
+// Copyright 2006, 2007 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.tapestry5.services;
 
 /**
  * Interface implemented by a page used for reporting exceptions.
  *
- * @see RequestExceptionHandler
+ * @see org.apache.tapestry5.services.RequestExceptionHandler
  */
 public interface ExceptionReporter
 {
     /**
      * Used to communicate to the page what exception is to be reported.
      *
-     * @param exception
+     * @param exception runtime exception thrown during processing of the request
      */
     void reportException(Throwable exception);
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/PageDocumentGenerator.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/PageDocumentGenerator.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/PageDocumentGenerator.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/PageDocumentGenerator.java Mon Aug  4 17:43:59 2008
@@ -17,7 +17,7 @@
 import org.apache.tapestry5.dom.Document;
 
 /**
- * Interface used to programattically render a page, forming a {@link org.apache.tapestry5.dom.Document} which can then
+ * Interface used to programatically render a page, forming a {@link org.apache.tapestry5.dom.Document} which can then
  * be manipulated or {@link org.apache.tapestry5.dom.Document#toMarkup(java.io.PrintWriter) streamed to a PrintWriter}.
  */
 public interface PageDocumentGenerator

Copied: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ResponseRenderer.java (from r679133, tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ResponseRenderer.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ResponseRenderer.java?p2=tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ResponseRenderer.java&p1=tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ResponseRenderer.java&r1=679133&r2=682554&rev=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ResponseRenderer.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/ResponseRenderer.java Mon Aug  4 17:43:59 2008
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry5.internal.services;
+package org.apache.tapestry5.services;
 
 import org.apache.tapestry5.ContentType;
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java Mon Aug  4 17:43:59 2008
@@ -182,6 +182,7 @@
         binder.bind(AliasManager.class, AliasManagerImpl.class).withId("AliasOverrides");
         binder.bind(HiddenFieldLocationRules.class, HiddenFieldLocationRulesImpl.class);
         binder.bind(PageDocumentGenerator.class, PageDocumentGeneratorImpl.class);
+        binder.bind(ResponseRenderer.class, ResponseRendererImpl.class);
     }
 
     // ========================================================================
@@ -619,10 +620,20 @@
      * to {@link org.apache.tapestry5.corelib.data.GridPagerPosition} <li>List to {@link
      * org.apache.tapestry5.SelectModel} <li>{@link org.apache.tapestry5.runtime.ComponentResourcesAware} (typically, a
      * component) to {@link org.apache.tapestry5.ComponentResources} <li>String to {@link
-     * org.apache.tapestry5.corelib.data.BlankOption} </ul>
+     * org.apache.tapestry5.corelib.data.BlankOption} <li> {@link org.apache.tapestry5.ComponentResources} to {@link
+     * org.apache.tapestry5.PropertyOverrides} </ul>
      */
     public static void contributeTypeCoercer(Configuration<CoercionTuple> configuration)
     {
+        add(configuration, ComponentResources.class, PropertyOverrides.class,
+            new Coercion<ComponentResources, PropertyOverrides>()
+            {
+                public PropertyOverrides coerce(ComponentResources input)
+                {
+                    return new PropertyOverridesImpl(input);
+                }
+            });
+
         add(configuration, String.class, SelectModel.class, new Coercion<String, SelectModel>()
         {
             public SelectModel coerce(String input)
@@ -1750,6 +1761,8 @@
         configuration.add(SymbolConstants.CHARSET, "UTF-8");
 
         configuration.add(SymbolConstants.APPLICATION_CATALOG, "WEB-INF/${tapestry.app-name}.properties");
+
+        configuration.add(SymbolConstants.EXCEPTION_REPORT_PAGE, "ExceptionReport");
     }
 
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java Mon Aug  4 17:43:59 2008
@@ -866,9 +866,9 @@
     }
 
     protected final void train_create(BeanModelSource source, Class beanClass, boolean filterReadOnly,
-                                      ComponentResources containerResources, BeanModel model)
+                                      Messages messages, BeanModel model)
     {
-        expect(source.create(beanClass, filterReadOnly, containerResources)).andReturn(model);
+        expect(source.create(beanClass, filterReadOnly, messages)).andReturn(model);
     }
 
     protected final void train_getBoundType(ComponentResources resources, String parameterName, Class type)
@@ -1064,4 +1064,24 @@
     {
         expect(request.getAttribute(attibuteName)).andReturn(value);
     }
+
+    protected final void train_getBlockParameter(ComponentResources resources, String name, Block block)
+    {
+        expect(resources.getBlockParameter(name)).andReturn(block).atLeastOnce();
+    }
+
+    protected final PropertyOverrides mockPropertyOverrides()
+    {
+        return newMock(PropertyOverrides.class);
+    }
+
+    protected void train_getOverrideBlock(PropertyOverrides overrides, String name, Block block)
+    {
+        expect(overrides.getOverrideBlock(name)).andReturn(block).atLeastOnce();
+    }
+
+    protected final void train_getOverrideMessages(PropertyOverrides overrides, Messages messages)
+    {
+        expect(overrides.getOverrideMessages()).andReturn(messages);
+    }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/BeanDisplay.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/BeanDisplay.tml?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/BeanDisplay.tml (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/BeanDisplay.tml Mon Aug  4 17:43:59 2008
@@ -1,17 +1,15 @@
-<div class="t-beandisplay" xml:space="default"
-     xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
+<dl class="t-beandisplay" xml:space="default"
+    xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
 
+    <t:loop t:source="model.propertyNames" t:volatile="true" t:value="propertyName">
 
-    <div class="t-beandisplay-row" t:type="loop" t:source="model.propertyNames"
-         t:volatile="true" t:value="propertyName">
+        <dt class="${propertyClass}">${propertyModel.label}</dt>
 
-        <div class="${labelClass}">${propertyModel.label}:</div>
-
-        <div class="${valueClass}">
+        <dd class="${propertyClass}">
             <t:propertydisplay model="propertyModel" overrides="overrides" object="object"/>
-        </div>
-
-    </div>
+        </dd>
+    </t:loop>
+</dl>
+        
 
-</div>
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/GridRows.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/GridRows.tml?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/GridRows.tml (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/GridRows.tml Mon Aug  4 17:43:59 2008
@@ -1,7 +1,7 @@
 <tr class="${rowClass}" xml:space="default" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
     <t:loop source="propertyNames" value="propertyName" volatile="inherit:volatile">
         <td class="${cellClass}">
-            <t:gridcell model="columnModel" object="row" overrides="componentResources.containerResources"/>
+            <t:gridcell model="columnModel" object="row" overrides="overrides"/>
         </td>
     </t:loop>
 </tr>

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css Mon Aug  4 17:43:59 2008
@@ -127,7 +127,7 @@
     margin: 0px;
 }
 
-DIV.t-beaneditor, DIV.t-beandisplay {
+DIV.t-beaneditor {
     display: block;
     background: #ffc;
     border: 2px outset brown;
@@ -135,12 +135,6 @@
     font-family: "Trebuchet MS", Arial, sans-serif;
 }
 
-DIV.t-beandisplay {
-    background: #CCBE99;
-    border: 2px outset black;
-    width: auto;
-}
-
 DIV.t-beaneditor-row {
     padding: 4px 0px 2px 0px;
 }
@@ -149,11 +143,30 @@
     content: ":";
 }
 
-DIV.t-beandisplay-row {
-    clear: both;
+DL.t-beandisplay {
+    display: block;
+    padding: 2px;
+    font-family: "Trebuchet MS", Arial, sans-serif;
+    background: #CCBE99;
+    border: 2px outset black;
+    width: auto;
+}
+
+DL.t-beandisplay DT {
+    width: 250px;
+    display: inline;
+    float: left;
+    text-align: right;
+    clear: left;
+    padding-right: 3px;
+    vertical-align: middle;
+}
+
+DL.t-beandisplay DT:after {
+    content: ":";
 }
 
-DIV.t-beaneditor-row LABEL, DIV.t-beandisplay DIV.t-beandisplay-label {
+DIV.t-beaneditor-row LABEL {
     width: 250px;
     display: block;
     float: left;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/conf.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/conf.apt?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/conf.apt (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/conf.apt Mon Aug  4 17:43:59 2008
@@ -84,6 +84,9 @@
   {{{../../apidocs/org/apache/tapestry5/ioc/util/TimeInterval.html}particular format}}.
 
 
+  Many of these symbols have an associated constant in the class
+  {{{../../apidocs/org/apache/tapestry5/SymbolConstants.html}SymbolConstants}}.
+
   [tapestry.compress-whitespace]
     A flag (true or false).  When true (the default) whitespace in component templates is compressed by default
     (this can be fine-tuned using the standard xml:space attribute on an element in the template).
@@ -105,7 +108,11 @@
     rather than overriding selected rules within it, entails some risk.
 
     The default is org/apache/tapestry5/default.css, stored on the classpath.
-  
+
+  [tapestry.exception-report-page]
+
+    The name of the page used to report exceptions.  This defaults to "ExceptionReport".
+
   [tapestry.file-check-interval]
     Time interval between file system checks. During a file system check, only a single thread is active (all others
     are blocked) and any files loaded are checked for changes (this is part of {{{reload.html}automatic component reloading}}).
@@ -157,7 +164,7 @@
     is made available.  It will then create a new page instance (unless the hard limit has been reached).
 
     The default is 5 page instances.    Remember that page pooling is done seperately for each
-    page (and localization of the page).  
+    page (and localization of the page).
 
   [tapestry.page-pool.soft-wait]
     The time interval that Tapestry will wait for a page instance to become available before deciding whether to create
@@ -169,11 +176,12 @@
 
   [tapestry.scriptaculous]
     The path to the embedded copy of {{{http://script.aculo.us/}script.aculo.us}} packaged with Tapestry. This value may be overridden
-    to use a different version of the script.aculo.us library. Tapestry's default version is 1.8.0
-    (including Prototype 1.6.0).
+    to use a different version of the script.aculo.us library. Tapestry's default version is 1.8.1
+    (including Prototype 1.6.0.1).
 
   [tapestry.start-page-name]
-    The logical name of the start page, the page that is rendered for the <root URL>.  This is normally "start".    
+    The logical name of the start page, the page that is rendered for the <root URL>.  This is normally "start".
+    This functionality is vestigal: it has been superceded by the use of Index pages.
 
   [tapestry.supported-locales]
     A comma-separated list of supported locales.  Incoming requests as "narrowed" to one of these locales, based on closest match.
@@ -220,6 +228,6 @@
 
   The regular expression matches any path that begins with "/dwr/".
 
-  The regular expressions provided in the configuration are always compiled with case insensetivity enabled.
+  The regular expressions provided in the configuration are always compiled with case insensitivity enabled.
 
   Also note that actual files in your web application (images, stylesheets, etc.) are always ignored by Tapestry.
\ No newline at end of file

Modified: tapestry/tapestry5/trunk/tapestry-core/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/site/apt/index.apt?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/site/apt/index.apt (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/site/apt/index.apt Mon Aug  4 17:43:59 2008
@@ -8,168 +8,3 @@
   
   tapestry-core is built upon the {{{../tapestry-ioc/index.html}Tapestry IoC Container}}.
 
-New And Of Note
-
-  * Component methods may be marked with the @Log annotation, to enable debug logging of
-    method entry (with parameters) and exit (with return value, or thrown exception).
-
-  * It is now possible to provide method invocation advice to component methods. This opens up
-    a very powerful Aspect Oriented Programming approach to Tapestry components.
-
-  * The Exception Report page now identifies the version of the Tapestry framework, and lists
-    out System properties (including the Java classpath).
-
-  * The {{{ref/org/apache/tapestry5/corelib/components/Grid.html}Grid}} component can now update itself in place,
-    using Ajax, when paging or sorting links are clicked.
-
-  * Added a zone parameter to the  {{{ref/org/apache/tapestry5/corelib/components/BeanEditForm.;html}BeanEditForm}}
-    component, to support Ajax updates.
-
-  * The @Cached annotation has been added to allowing the caching of method results.
-
-  * Tapestry can now generate accessor methods for fields automatically via the @Property annotation.
-
-  * It is now possible to override the built-in display and edit blocks for data types.
-
-  * Tapestry now supports "Index" pages at the root or in sub-folders.
-
-  * Tapestry pages may now be {{{guide/secure.html}secured for access only via HTTPS}}.
-
-  * Added the {{{ref/org/apache/tapestry5/corelib/components/FormFragment.html}FormFragment}} component
-    to allow for forms that are mutable on the client-side. In addition, the
-    {{{ref/org/apache/tapestry5/corelib/components/Form.html}Form}} component may
-    now update a Zone.
-
-  * Form components now trigger a "validateForm" event, not a "validate" event (so as to avoid conflict
-    with the "validate" event triggered by TextFields).
-
-  * Tapestry now understands JDK 1.5 Generics, allowing for simple parameterized types for properties of data objects and components.
-
-  * Tapestry now differentiates between development mode and production mode, primarily in how
-    it reports runtime exceptions.  It defaults to production mode.   
-
-  * Components can now supply an event handler for type "exception" which will be invoked when
-    an exception occurs in a component event handler method. This is useful for handling errors
-    with the context for the "activate" event.
-
-  * Page instances are now cached more efficiently, with Tapestry attempting to control how many instances
-    are created, and culling unused instances periodically.
-
-  * Component templates are stripped of unnecessary whitespace.
-
-  * New Unless component (like an If component, but inverted).
-
-  * Support for "password" and "longtext" data types (for use with the BeanEditor), and a new
-    {{{ref/org/apache/tapestry5/corelib/components/TextOutput.html}TextOutput}} component.
-
-  * The new "var:" binding prefix allows for temporary, untyped storage
-    of render-time values without having to define a new component property.
- 
-Changes from Tapestry 4 to Tapestry 5
-
-  Tapestry 5 represents a significant advance over Tapestry 4.  The goal is to make Tapestry 5
-  <significantly> easier to use than Tapestry 4 (or any other Java web framework).
-  We're keeping the <essence> of Tapestry 4, but starting with a brand new code base designed
-  to provide a stable, powerful, extensible platform for many years to come.
-  
-  Here's a few of the planned and implemented features:
-
-  * Easy to get started using Maven.
-  
-  * Simplified, minimal API based on annotations.
-  
-  * <<No>> base class requirement; components are true, pure Pojos (Plain Old Java Objects).
-  
-  * Abstract classes ... gone!  Classes are normal, concrete classes.
-  
-  * <<No>> XML descriptors for pages and components ... just the annotations.
-  
-  * Less configuration all around.
-  
-  * Automatic reloading of templates and even <Java classes>.
-  
-  * Super-duper Ajax integration built in.
-  
-  * Easy & fast unit testing of individual pages or components.
-    
-Adaptive API
-
-  A key feature of Tapestry 5 is <adaptive API>.
-  
-  In traditional Java frameworks, including Tapestry 4, user code is expected to
-  conform to the framework.  You create classes that extend from framework-provided
-  base classes, or implement framework-provided interfaces.
-  
-  This works well until you upgrade to the next release of the framework: with
-  the new features of the upgrade, you will more often than not experience breaks
-  in backwards compatibility. Interfaces or base classes will have changed and your
-  existing code will need to be changed to match.
-  
-  In Tapestry 5, the framework <adapts to your code>.  You have control over the
-  names of the methods, the parameters they take, and the value that is returned. This
-  is driven by annotations, which tell Tapestry under what circumstances your
-  methods are to be invoked.
-  
-  For example, you may have a login form and have a method that gets invoked
-  when the form is submitted:
-  
-+----+
-public class Login
-{
-  @Persist
-  @Property
-  private String userId;
-  
-  @Property
-  private String password;
-  
-  @Component
-  private Form form;
-  
-  @Inject
-  private LoginAuthenticator authenticator;
-  
-  void onValidateForm()
-  {
-    if (! authenticator.isValidLogin(userId, password))
-    {
-      form.recordError("Invalid user name or password.");
-    }
-  }
-
-  Object onSuccess()
-  {
-    return PostLogin.class;
-  }
-
-}
-+----+
-
-  This short snippet demonstrates a bit about how Tapestry operates.  Pages and services
-  within the application are injected with the @Inject annotation. The method names, onValidateForm()
-  and onSuccess(),
-  inform Tapestry about when the method is to be invoked.  The two events <validateForm> and <success> occur
-  when a form is submitted; "validateForm" is triggered to perform cross-field validations, and "success" is
-  only triggered when there are no validation errors. The onSuccess() method's 
-  return value directs Tapestry on what to do next: jump to another page within the application
-  (here identified as the class for the page, but many other options exist).  When there are exceptions,
-  the page will be redisplayed to the user.
-
-  This also represents a distinct change from Tapestry 4. In earlier versions of Tapestry, 
-  the Form component's listener parameter would be bound to the method to invoke, by name.  Further,
-  the listener method had to be public.
-  This new approach not only support multiple listeners, but provides an improved separation of
-  view concerns (inside the page's HTML template) and logic concerns, inside the Java class.
-    
-  In many cases, additional information about the event is available, and can be passed
-  into the method by adding parameters to the method. Again, Tapestry will adapt
-  to your parameters, in whatever order you supply them.
-
-  Tapestry also saves you effort:  the @Property annotation marks a field as readable and writable;
-  Tapestry will provide the accessor methods automatically.
-
-  Finally, Tapestry 5 explicitly separates actions (requests that change things) and rendering (requests that
-  render pages) into two separate requests.  Performing an action, such as clicking a link or submitting a form,
-  results in a <client side redirect> to the new page. This is often called "redirect after post". This helps ensure
-  that URLs in the browser are book-markable ... but also requires that a bit more information be stored in the session
-  between requests (using the @Persist annotation).  
\ No newline at end of file

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/BeanEditorTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/BeanEditorTest.java?rev=682554&r1=682553&r2=682554&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/BeanEditorTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/corelib/components/BeanEditorTest.java Mon Aug  4 17:43:59 2008
@@ -15,9 +15,11 @@
 package org.apache.tapestry5.corelib.components;
 
 import org.apache.tapestry5.ComponentResources;
+import org.apache.tapestry5.PropertyOverrides;
 import org.apache.tapestry5.beaneditor.BeanModel;
 import org.apache.tapestry5.integration.app1.data.RegistrationData;
 import org.apache.tapestry5.ioc.Location;
+import org.apache.tapestry5.ioc.Messages;
 import org.apache.tapestry5.ioc.internal.util.TapestryException;
 import org.apache.tapestry5.services.BeanModelSource;
 import org.apache.tapestry5.test.TapestryTestCase;
@@ -29,17 +31,17 @@
     public void object_created_as_needed()
     {
         ComponentResources resources = mockComponentResources();
-        ComponentResources overrides = mockComponentResources();
-        ComponentResources containerResources = mockComponentResources();
         BeanModelSource source = mockBeanModelSource();
         BeanModel model = mockBeanModel();
         RegistrationData data = new RegistrationData();
+        Messages messages = mockMessages();
+        PropertyOverrides overrides = mockPropertyOverrides();
 
         train_getBoundType(resources, "object", RegistrationData.class);
 
-        train_getContainerResources(overrides, containerResources);
+        train_create(source, RegistrationData.class, true, messages, model);
 
-        train_create(source, RegistrationData.class, true, containerResources, model);
+        train_getOverrideMessages(overrides, messages);
 
         expect(model.newInstance()).andReturn(data);
 
@@ -61,18 +63,18 @@
     public void object_can_not_be_instantiated()
     {
         ComponentResources resources = mockComponentResources();
-        ComponentResources overrides = mockComponentResources();
-        ComponentResources containerResources = mockComponentResources();
         BeanModelSource source = mockBeanModelSource();
         BeanModel model = mockBeanModel();
         Location l = mockLocation();
         Throwable exception = new RuntimeException("Fall down go boom.");
+        PropertyOverrides overrides = mockPropertyOverrides();
+        Messages messages = mockMessages();
 
-        train_getBoundType(resources, "object", Runnable.class);
+        train_getOverrideMessages(overrides, messages);
 
-        train_getContainerResources(overrides, containerResources);
+        train_getBoundType(resources, "object", Runnable.class);
 
-        train_create(source, Runnable.class, true, containerResources, model);
+        train_create(source, Runnable.class, true, messages, model);
 
         expect(model.newInstance()).andThrow(exception);