You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by jk...@apache.org on 2006/03/11 21:55:35 UTC

svn commit: r385164 [14/32] - in /jakarta/tapestry/trunk: ./ .settings/ annotations/src/java/org/apache/tapestry/annotations/ annotations/src/test/org/apache/tapestry/annotations/ config/ contrib/src/documentation/content/xdocs/tapestry-contrib/Compone...

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IPageSource.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IPageSource.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IPageSource.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IPageSource.java Sat Mar 11 12:54:27 2006
@@ -48,19 +48,19 @@
      * @see org.apache.tapestry.resolver.PageSpecificationResolver#resolve(IRequestCycle, String)
      */
 
-    IPage getPage(IRequestCycle cycle, String pageName, IMonitor monitor);
+    public IPage getPage(IRequestCycle cycle, String pageName, IMonitor monitor);
 
     /**
      * Invoked after the engine is done with the page (typically, after the response to the client
      * has been sent). The page is returned to the pool for later reuse.
      */
 
-    void releasePage(IPage page);
+    public void releasePage(IPage page);
 
     /**
      * @since 3.0
      */
 
-    ClassResolver getClassResolver();
+    public ClassResolver getClassResolver();
 
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IPropertySource.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IPropertySource.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IPropertySource.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IPropertySource.java Sat Mar 11 12:54:27 2006
@@ -33,5 +33,5 @@
      * 
      **/
     
-    String getPropertyValue(String propertyName);
+    public String getPropertyValue(String propertyName);
 }

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IScriptSource.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IScriptSource.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IScriptSource.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/IScriptSource.java Sat Mar 11 12:54:27 2006
@@ -31,5 +31,5 @@
      * reading and parsing the script if necessary.
      */
 
-    IScript getScript(Resource resource);
-}
+    public IScript getScript(Resource resource);
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ISpecificationSource.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ISpecificationSource.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ISpecificationSource.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ISpecificationSource.java Sat Mar 11 12:54:27 2006
@@ -38,7 +38,7 @@
      * @since 2.2
      */
 
-    IComponentSpecification getComponentSpecification(Resource specificationLocation);
+    public IComponentSpecification getComponentSpecification(Resource specificationLocation);
 
     /**
      * Retrieves a page specification, parsing it as necessary.
@@ -50,7 +50,7 @@
      * @since 2.2
      */
 
-    IComponentSpecification getPageSpecification(Resource specificationLocation);
+    public IComponentSpecification getPageSpecification(Resource specificationLocation);
 
     /**
      * Returns a {@link org.apache.tapestry.spec.LibrarySpecification} with the given path.
@@ -62,7 +62,7 @@
      * @since 2.2
      */
 
-    ILibrarySpecification getLibrarySpecification(Resource specificationLocation);
+    public ILibrarySpecification getLibrarySpecification(Resource specificationLocation);
 
     /**
      * Returns the {@link INamespace} for the application.
@@ -70,7 +70,7 @@
      * @since 2.2
      */
 
-    INamespace getApplicationNamespace();
+    public INamespace getApplicationNamespace();
 
     /**
      * Returns the {@link INamespace} for the framework itself.
@@ -78,5 +78,5 @@
      * @since 2.2
      */
 
-    INamespace getFrameworkNamespace();
-}
+    public INamespace getFrameworkNamespace();
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ITemplateSourceDelegate.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ITemplateSourceDelegate.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ITemplateSourceDelegate.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ITemplateSourceDelegate.java Sat Mar 11 12:54:27 2006
@@ -47,5 +47,5 @@
      * 
      **/
 
-    ComponentTemplate findTemplate(IRequestCycle cycle, IComponent component, Locale locale);
+    public ComponentTemplate findTemplate(IRequestCycle cycle, IComponent component, Locale locale);
 }

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/Namespace.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/Namespace.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/Namespace.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/Namespace.java Sat Mar 11 12:54:27 2006
@@ -380,4 +380,4 @@
     {
         return _specification.getProperty(propertyName);
     }
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/NullMonitor.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/NullMonitor.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/NullMonitor.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/NullMonitor.java Sat Mar 11 12:54:27 2006
@@ -72,4 +72,4 @@
     {
     }
 
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/NullWriter.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/NullWriter.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/NullWriter.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/NullWriter.java Sat Mar 11 12:54:27 2006
@@ -159,4 +159,4 @@
     public void print(String value, boolean raw)
     {
     }
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/PageService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/PageService.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/PageService.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/PageService.java Sat Mar 11 12:54:27 2006
@@ -84,4 +84,4 @@
     {
         _linkFactory = linkFactory;
     }
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/RequestCycle.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/RequestCycle.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/RequestCycle.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/RequestCycle.java Sat Mar 11 12:54:27 2006
@@ -708,4 +708,4 @@
         throw new RedirectException(URL);
     }
 
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/RequestCycleEnvironment.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/RequestCycleEnvironment.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/RequestCycleEnvironment.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/RequestCycleEnvironment.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// 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.
@@ -15,9 +15,11 @@
 package org.apache.tapestry.engine;
 
 import org.apache.hivemind.ErrorHandler;
+import org.apache.tapestry.IEngine;
 import org.apache.tapestry.record.PropertyPersistenceStrategySource;
 import org.apache.tapestry.services.AbsoluteURLBuilder;
 import org.apache.tapestry.services.Infrastructure;
+import org.apache.tapestry.util.QueryParameterMap;
 
 /**
  * An object that contains all the invariant parameters to the
@@ -29,7 +31,6 @@
  */
 public class RequestCycleEnvironment
 {
-
     private final Infrastructure _infrastructure;
 
     private final PropertyPersistenceStrategySource _strategySource;
@@ -66,4 +67,4 @@
     {
         return _strategySource;
     }
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ResetService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ResetService.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ResetService.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ResetService.java Sat Mar 11 12:54:27 2006
@@ -117,4 +117,4 @@
     {
         _requestCycle = requestCycle;
     }
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/RestartService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/RestartService.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/RestartService.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/RestartService.java Sat Mar 11 12:54:27 2006
@@ -120,4 +120,4 @@
     {
         _servletPath = servletPath;
     }
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ServiceEncoder.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ServiceEncoder.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ServiceEncoder.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ServiceEncoder.java Sat Mar 11 12:54:27 2006
@@ -34,12 +34,12 @@
      * encoders, stopping once the ServiceRequestEncoding is modified in any way.
      */
 
-    void encode(ServiceEncoding encoding);
+    public void encode(ServiceEncoding encoding);
 
     /**
      * Invoked to decode a request. The encoder is responsible for recognizing a request it may have
      * encoded, and for restoring any query parameters is may have removed.
      */
 
-    void decode(ServiceEncoding encoding);
-}
+    public void decode(ServiceEncoding encoding);
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ServiceEncoding.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ServiceEncoding.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ServiceEncoding.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ServiceEncoding.java Sat Mar 11 12:54:27 2006
@@ -40,7 +40,7 @@
      * @return the value, or null if no such query parameter exists
      */
 
-    String getParameterValue(String name);
+    public String getParameterValue(String name);
 
     /**
      * Returns the value for the named parameter.
@@ -48,14 +48,14 @@
      * @parameter name the name of the query parameter to access
      * @return the values, or null if no such query parameter exists
      */
-    String[] getParameterValues(String name);
+    public String[] getParameterValues(String name);
 
     /**
      * Updates the servlet path for the encoding. In some cases, this is a combination of the
      * servlet and additional path info.
      */
 
-    void setServletPath(String servletPath);
+    public void setServletPath(String servletPath);
 
     /**
      * Sets the value for the named query parameter to the provided string.
@@ -65,13 +65,13 @@
      * @param value
      *            the new value, which may be null.
      */
-    void setParameterValue(String name, String value);
+    public void setParameterValue(String name, String value);
 
     /**
      * Sets the values for a named query parameter.
      */
 
-    void setParameterValues(String name, String[] values);
+    public void setParameterValues(String name, String[] values);
 
     /**
      * Returns the servlet path for the request. This is the portion of the URL recognized as the
@@ -80,19 +80,19 @@
      * rest of the URL.
      */
 
-    String getServletPath();
+    public String getServletPath();
 
     /**
      * Returns the portion of the URL after the servlet itself.
      * 
      * @return pathInfo if path info was supplied in the request, or null otherwise.
      */
-    String getPathInfo();
+    public String getPathInfo();
 
     /**
      * Returns an array of parameter names. The names are returned in alphabetically sorted order.
      * This list includes all parameter names, even those for which the stored value is null.
      */
 
-    String[] getParameterNames();
-}
+    public String[] getParameterNames();
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ServiceEncodingImpl.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ServiceEncodingImpl.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ServiceEncodingImpl.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/ServiceEncodingImpl.java Sat Mar 11 12:54:27 2006
@@ -41,6 +41,16 @@
 
     private boolean _modified;
 
+    public boolean isModified()
+    {
+        return _modified;
+    }
+
+    public void resetModified()
+    {
+        _modified = false;
+    }
+
     /**
      * Creates a new instance with a new map of parameters.
      */
@@ -65,16 +75,6 @@
 
         _parameters = parameters;
     }
-    
-    public boolean isModified()
-    {
-        return _modified;
-    }
-
-    public void resetModified()
-    {
-        _modified = false;
-    }
 
     public String getParameterValue(String name)
     {
@@ -122,4 +122,4 @@
     {
         return _pathInfo;
     }
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/encoders/AssetEncoder.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/encoders/AssetEncoder.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/encoders/AssetEncoder.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/encoders/AssetEncoder.java Sat Mar 11 12:54:27 2006
@@ -43,11 +43,11 @@
 
         String path = encoding.getParameterValue(AssetService.PATH);
         String digest = encoding.getParameterValue(AssetService.DIGEST);
-        
+
         // _path ends with a slash, path starts with one.
-        
+
         String fullPath = _path + "/" + digest + path;
-        
+
         encoding.setServletPath(fullPath);
         encoding.setParameterValue(AssetService.PATH, null);
         encoding.setParameterValue(AssetService.DIGEST, null);
@@ -58,13 +58,13 @@
     {
         if (!encoding.getServletPath().equals(_path))
             return;
-        
+
         String pathInfo = encoding.getPathInfo();
-        
+
         // The lead character is a slash, so find the next slash (the divider between the
         // digest and the path).
         int slashx = pathInfo.indexOf('/', 1);
-        
+
         encoding.setParameterValue(ServiceConstants.SERVICE, Tapestry.ASSET_SERVICE);
         encoding.setParameterValue(AssetService.DIGEST, pathInfo.substring(1, slashx));
         encoding.setParameterValue(AssetService.PATH, pathInfo.substring(slashx));

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/ApplicationStateManager.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/ApplicationStateManager.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/ApplicationStateManager.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/ApplicationStateManager.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// 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.
@@ -20,7 +20,6 @@
  */
 public interface ApplicationStateManager
 {
-
     /**
      * Checks to see if the named object exists.
      * 
@@ -29,7 +28,7 @@
      * @throws org.apache.hivemind.ApplicationRuntimeException
      *             if no such object is declared
      */
-    boolean exists(String objectName);
+    public boolean exists(String objectName);
 
     /**
      * Gets the named application state object, creating it if necessary.
@@ -40,25 +39,23 @@
      * @throws org.apache.hivemind.ApplicationRuntimeException
      *             if no such object is declared
      */
-    Object get(String objectName);
-
+    public Object get(String objectName);
+    
     /**
-     * Stores a new state object, replacing the old one. The new object may be
-     * null.
+     * Stores a new state object, replacing the old one. The
+     * new object may be null.
      * 
-     * @param objectName
-     *            the name of the object to store
-     * @param stateObject
-     *            the new object, possibly null
+     * @param objectName the name of the object to store
+     * @param stateObject the new object, possibly null
      * @throws org.apache.hivemind.ApplicationRuntimeException
      *             if no such object is declared
      */
-
-    void store(String objectName, Object stateObject);
+    
+    public void store(String objectName, Object stateObject);
 
     /**
      * Asks each {@link StateObjectManager} to store each object obtained.
      */
 
-    void flush();
-}
+    public void flush();
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/ApplicationStateManagerImpl.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/ApplicationStateManagerImpl.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/ApplicationStateManagerImpl.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/ApplicationStateManagerImpl.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// 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.
@@ -30,8 +30,7 @@
 {
 
     /**
-     * Keyed on application static object name, value is the current state
-     * object.
+     * Keyed on application static object name, value is the current state object.
      */
 
     private Map _stateObjects = new HashMap();
@@ -76,11 +75,11 @@
     public void flush()
     {
         Iterator i = _stateObjects.entrySet().iterator();
-        while(i.hasNext())
+        while (i.hasNext())
         {
-            Map.Entry e = (Map.Entry)i.next();
+            Map.Entry e = (Map.Entry) i.next();
 
-            String objectName = (String)e.getKey();
+            String objectName = (String) e.getKey();
             Object stateObject = e.getValue();
 
             // Slight bending of law-of-demeter
@@ -93,4 +92,4 @@
     {
         _registry = registry;
     }
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateMessages.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateMessages.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateMessages.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateMessages.java Sat Mar 11 12:54:27 2006
@@ -14,41 +14,34 @@
 
 package org.apache.tapestry.engine.state;
 
-import org.apache.hivemind.Messages;
 import org.apache.hivemind.impl.MessageFormatter;
 
 /**
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
-final class StateMessages
+class StateMessages
 {
-
-    private static final Messages MESSAGES = new MessageFormatter(StateMessages.class);
-
-    /** @since 4.1 */
-    private StateMessages()
-    {
-    }
+    private final static MessageFormatter _formatter = new MessageFormatter(StateMessages.class);
 
     static String unknownStateObjectName(String objectName)
     {
-        return MESSAGES.format("unknown-state-object-name", objectName);
+        return _formatter.format("unknown-state-object-name", objectName);
     }
 
     static String unableToInstantiateObject(Class objectClass, Throwable cause)
     {
-        return MESSAGES.format("unable-to-instantiate-object", objectClass, cause);
+        return _formatter.format("unable-to-instantiate-object", objectClass, cause);
     }
 
     static String unableToInstantiateObject(String className, Throwable cause)
     {
-        return MESSAGES.format("unable-to-instantiate-object", className, cause);
+        return _formatter.format("unable-to-instantiate-object", className, cause);
     }
 
     static String unknownScope(String objectName, String scope)
     {
-        return MESSAGES.format("unknown-scope", objectName, scope);
+        return _formatter.format("unknown-scope", objectName, scope);
     }
 
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateObjectFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateObjectFactory.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateObjectFactory.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateObjectFactory.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// 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.
@@ -22,7 +22,5 @@
  */
 public interface StateObjectFactory
 {
-
-    /** Create an initialize the object for use. */
-    Object createStateObject();
-}
+    public Object createStateObject();
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateObjectManager.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateObjectManager.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateObjectManager.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateObjectManager.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// 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.
@@ -15,39 +15,35 @@
 package org.apache.tapestry.engine.state;
 
 /**
- * Interface for an object that manages a single application state object.
- * Represents the named intersection of a
- * {@link org.apache.tapestry.engine.state.StateObjectPersistenceManager}for
+ * Interface for an object that manages a single application state object. Represents the named
+ * intersection of a {@link org.apache.tapestry.engine.state.StateObjectPersistenceManager}for
  * storing the state object between request cycles, and a
- * {@link org.apache.tapestry.engine.state.StateObjectFactory}to create the
- * object in the first place.
+ * {@link org.apache.tapestry.engine.state.StateObjectFactory}to create the object in the first
+ * place.
  * 
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
 public interface StateObjectManager
 {
-
     /**
-     * Returns true if the application state object exists (i.e., a value has
-     * been stored).
+     * Returns true if the application state object exists (i.e., a value has been stored).
      */
-    boolean exists();
+    public boolean exists();
 
     /**
      * Gets or creates the application state object.
      */
 
-    Object get();
+    public Object get();
 
     /**
-     * Stores (if necessary) the object back into persistent storage. This is
-     * not application to all storage scopes.
+     * Stores (if necessary) the object back into persistent storage. This is not application to all
+     * storage scopes.
      * 
      * @param stateObject
-     *            the application state object previously obtained from
-     *            {@link #get()}.
+     *            the application state object previously obtained from {@link #get()}.
      */
 
-    void store(Object stateObject);
-}
+    public void store(Object stateObject);
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateObjectManagerRegistry.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateObjectManagerRegistry.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateObjectManagerRegistry.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateObjectManagerRegistry.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// 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.
@@ -15,21 +15,16 @@
 package org.apache.tapestry.engine.state;
 
 /**
- * Used to access the
- * {@link org.apache.tapestry.engine.state.StateObjectManager} for a particular
- * Application State Object (by name).
- * 
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
 public interface StateObjectManagerRegistry
 {
-
     /**
      * Returns the named {@link StateObjectManager}.
      * 
      * @throws org.apache.hivemind.ApplicationRuntimeException
      *             if no such SOPM is defined.
      */
-    StateObjectManager get(String objectName);
-}
+    public StateObjectManager get(String objectName);
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateObjectPersistenceManager.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateObjectPersistenceManager.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateObjectPersistenceManager.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/engine/state/StateObjectPersistenceManager.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// 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.
@@ -15,19 +15,18 @@
 package org.apache.tapestry.engine.state;
 
 /**
- * Interface for the nuts and bolts of getting and storing application state
- * objects. These are intended to be stateless, and manage a number of state
- * objects, mapping objectNames to internal storage in some way.
+ * Interface for the nuts and bolts of getting and storing application state objects. These are
+ * intended to be stateless, and manage a number of state objects, mapping objectNames to internal
+ * storage in some way.
  * 
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
 public interface StateObjectPersistenceManager
 {
+    public boolean exists(String objectName);
 
-    boolean exists(String objectName);
+    public Object get(String objectName, StateObjectFactory factory);
 
-    Object get(String objectName, StateObjectFactory factory);
-
-    void store(String objectName, Object stateObject);
-}
+    public void store(String objectName, Object stateObject);
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/AbstractPropertyWorker.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/AbstractPropertyWorker.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/AbstractPropertyWorker.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/AbstractPropertyWorker.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2004, 2005, 2006 The Apache Software Foundation
+// Copyright 2004, 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.
@@ -23,16 +23,14 @@
 import org.apache.tapestry.spec.IComponentSpecification;
 
 /**
- * No, this class isn't abstract ... this worker locates abstract properties in
- * the base component class and provides a concrete implementation for them in
- * the enhanced class.
+ * No, this class isn't abstract ... this worker locates abstract properties in the base component
+ * class and provides a concrete implementation for them in the enhanced class.
  * 
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
 public class AbstractPropertyWorker implements EnhancementWorker
 {
-
     private ErrorLog _errorLog;
 
     public void performEnhancement(EnhancementOperation op, IComponentSpecification spec)
@@ -41,9 +39,9 @@
 
         Iterator i = op.findUnclaimedAbstractProperties().iterator();
 
-        while(i.hasNext())
+        while (i.hasNext())
         {
-            String name = (String)i.next();
+            String name = (String) i.next();
 
             try
             {
@@ -51,7 +49,10 @@
             }
             catch (Exception ex)
             {
-                _errorLog.error(EnhanceMessages.errorAddingProperty(name, op.getBaseClass(), ex), location, ex);
+                _errorLog.error(
+                        EnhanceMessages.errorAddingProperty(name, op.getBaseClass(), ex),
+                        location,
+                        ex);
             }
         }
     }
@@ -74,13 +75,17 @@
         // Copy the real attribute into the default attribute inside finish load
         // (allowing a default value to be set inside finishLoad()).
 
-        op.extendMethodImplementation(IComponent.class, EnhanceUtils.FINISH_LOAD_SIGNATURE, defaultFieldName + " = "
-                + fieldName + ";");
+        op.extendMethodImplementation(
+                IComponent.class,
+                EnhanceUtils.FINISH_LOAD_SIGNATURE,
+                defaultFieldName + " = " + fieldName + ";");
 
         // On page detach, restore the attribute to its default value.
 
-        op.extendMethodImplementation(PageDetachListener.class, EnhanceUtils.PAGE_DETACHED_SIGNATURE, fieldName + " = "
-                + defaultFieldName + ";");
+        op.extendMethodImplementation(
+                PageDetachListener.class,
+                EnhanceUtils.PAGE_DETACHED_SIGNATURE,
+                fieldName + " = " + defaultFieldName + ";");
 
         // This is not all that necessary, but is proper.
 
@@ -91,4 +96,4 @@
     {
         _errorLog = errorLog;
     }
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/EnhanceMessages.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/EnhanceMessages.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/EnhanceMessages.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/EnhanceMessages.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2004, 2005, 2006 The Apache Software Foundation
+// Copyright 2004, 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.
@@ -18,7 +18,6 @@
 import java.lang.reflect.Method;
 
 import org.apache.hivemind.Location;
-import org.apache.hivemind.Messages;
 import org.apache.hivemind.impl.MessageFormatter;
 import org.apache.hivemind.service.ClassFabUtils;
 import org.apache.hivemind.service.MethodSignature;
@@ -30,22 +29,20 @@
  * @author Howard Lewis Ship
  * @since 4.0
  */
-final class EnhanceMessages
+class EnhanceMessages
 {
-    private final static Messages MESSAGES = new MessageFormatter(EnhanceMessages.class);
+    private final static MessageFormatter _formatter = new MessageFormatter(EnhanceMessages.class);
 
-    /** @since 4.1 */
-    private EnhanceMessages(){}
     static String noImplForAbstractMethod(Method method, Class declareClass, Class baseClass,
             Class enhancedClass)
     {
-        return MESSAGES.format("no-impl-for-abstract-method", new Object[]
+        return _formatter.format("no-impl-for-abstract-method", new Object[]
         { method, declareClass.getName(), baseClass.getName(), enhancedClass.getName() });
     }
 
     static String unimplementedInterfaceMethod(Method method, Class baseClass, Class enhancedClass)
     {
-        return MESSAGES.format(
+        return _formatter.format(
                 "unimplemented-interface-method",
                 method,
                 baseClass.getName(),
@@ -54,13 +51,13 @@
 
     static String unabelToIntrospectClass(Class targetClass, Throwable cause)
     {
-        return MESSAGES.format("unable-to-introspect-class", targetClass.getName(), cause);
+        return _formatter.format("unable-to-introspect-class", targetClass.getName(), cause);
     }
 
     static String propertyTypeMismatch(Class componentClass, String propertyName,
             Class actualPropertyType, Class expectedPropertyType)
     {
-        return MESSAGES.format("property-type-mismatch", new Object[]
+        return _formatter.format("property-type-mismatch", new Object[]
         { componentClass.getName(), propertyName,
                 ClassFabUtils.getJavaClassName(actualPropertyType),
                 ClassFabUtils.getJavaClassName(expectedPropertyType) });
@@ -68,7 +65,7 @@
 
     static String errorAddingProperty(String propertyName, Class componentClass, Throwable cause)
     {
-        return MESSAGES.format(
+        return _formatter.format(
                 "error-adding-property",
                 propertyName,
                 componentClass.getName(),
@@ -77,7 +74,7 @@
 
     static String claimedProperty(String propertyName)
     {
-        return MESSAGES.format("claimed-property", propertyName);
+        return _formatter.format("claimed-property", propertyName);
     }
 
     static String instantiationFailure(Constructor c, Object[] parameters, String classFab,
@@ -94,68 +91,68 @@
 
         buffer.append("]");
 
-        return MESSAGES.format("instantiation-failure", new Object[]
+        return _formatter.format("instantiation-failure", new Object[]
         { c.getDeclaringClass().getName(), c, buffer.toString(), classFab, cause });
     }
 
     static String locatedValueIsNull(String objectReference)
     {
-        return MESSAGES.format("located-value-is-null", objectReference);
+        return _formatter.format("located-value-is-null", objectReference);
     }
 
     static String incompatibleInjectType(String locator, Object value, Class propertyType)
     {
-        return MESSAGES.format("incompatible-inject-type", locator, value, ClassFabUtils
+        return _formatter.format("incompatible-inject-type", locator, value, ClassFabUtils
                 .getJavaClassName(propertyType));
     }
 
     static String initialValueForProperty(String propertyName)
     {
-        return MESSAGES.format("initial-value-for-property", propertyName);
+        return _formatter.format("initial-value-for-property", propertyName);
     }
 
     static String unknownInjectType(String propertyName, String injectType)
     {
-        return MESSAGES.format("unknown-inject-type", propertyName, injectType);
+        return _formatter.format("unknown-inject-type", propertyName, injectType);
     }
 
     static String wrongTypeForProperty(String propertyName, Class propertyType, Class requiredType)
     {
-        return MESSAGES.format("wrong-type-for-property", propertyName, ClassFabUtils
+        return _formatter.format("wrong-type-for-property", propertyName, ClassFabUtils
                 .getJavaClassName(propertyType), ClassFabUtils.getJavaClassName(requiredType));
     }
 
     static String wrongTypeForPageInjection(String propertyName, Class propertyType)
     {
-        return MESSAGES.format("wrong-type-for-page-injection", propertyName, ClassFabUtils
+        return _formatter.format("wrong-type-for-page-injection", propertyName, ClassFabUtils
                 .getJavaClassName(propertyType));
     }
 
     static String incompatiblePropertyType(String propertyName, Class propertyType,
             Class expectedType)
     {
-        return MESSAGES.format("incompatible-property-type", propertyName, ClassFabUtils
+        return _formatter.format("incompatible-property-type", propertyName, ClassFabUtils
                 .getJavaClassName(propertyType), ClassFabUtils.getJavaClassName(expectedType));
     }
 
     static String classEnhancementFailure(Class baseClass, Throwable cause)
     {
-        return MESSAGES.format("class-enhancement-failure", ClassFabUtils
+        return _formatter.format("class-enhancement-failure", ClassFabUtils
                 .getJavaClassName(baseClass), cause);
     }
 
     static String methodConflict(MethodSignature sig, Location existing)
     {
-        return MESSAGES.format("method-conflict", sig, existing);
+        return _formatter.format("method-conflict", sig, existing);
     }
 
     static String readonlyProperty(String propertyName, Method writeMethod)
     {
-        return MESSAGES.format("readonly-property", propertyName, writeMethod);
+        return _formatter.format("readonly-property", propertyName, writeMethod);
     }
 
     static String mustBeBoolean(String propertyName)
     {
-        return MESSAGES.format("must-be-boolean", propertyName);
+        return _formatter.format("must-be-boolean", propertyName);
     }
 }

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/EnhanceUtils.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/EnhanceUtils.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/EnhanceUtils.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/EnhanceUtils.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2004, 2005, 2006 The Apache Software Foundation
+// Copyright 2004, 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.
@@ -35,22 +35,19 @@
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
-public final class EnhanceUtils
+public class EnhanceUtils
 {
-
-    public static final MethodSignature FINISH_LOAD_SIGNATURE = new MethodSignature(void.class, "finishLoad",
-            new Class[] { IRequestCycle.class, IPageLoader.class, IComponentSpecification.class }, null);
-
-    public static final MethodSignature PAGE_DETACHED_SIGNATURE = new MethodSignature(void.class, "pageDetached",
-            new Class[] { PageEvent.class }, null);
-
-    public static final MethodSignature CLEANUP_AFTER_RENDER_SIGNATURE = new MethodSignature(void.class,
-            "cleanupAfterRender", new Class[] { IRequestCycle.class }, null);
-
-    /** @since 4.1 */
-    private EnhanceUtils()
-    {
-    }
+    public static final MethodSignature FINISH_LOAD_SIGNATURE = new MethodSignature(void.class,
+            "finishLoad", new Class[]
+            { IRequestCycle.class, IPageLoader.class, IComponentSpecification.class }, null);
+
+    public static final MethodSignature PAGE_DETACHED_SIGNATURE = new MethodSignature(void.class,
+            "pageDetached", new Class[]
+            { PageEvent.class }, null);
+
+    public static final MethodSignature CLEANUP_AFTER_RENDER_SIGNATURE = new MethodSignature(
+            void.class, "cleanupAfterRender", new Class[]
+            { IRequestCycle.class }, null);
 
     public static String createMutatorMethodName(String propertyName)
     {
@@ -67,43 +64,46 @@
         return name.substring(0, 1).toUpperCase() + name.substring(1);
     }
 
-    public static void createSimpleAccessor(EnhancementOperation op, String fieldName, String propertyName,
-            Class propertyType, Location location)
+    public static void createSimpleAccessor(EnhancementOperation op, String fieldName,
+            String propertyName, Class propertyType, Location location)
     {
         String methodName = op.getAccessorMethodName(propertyName);
 
-        op.addMethod(Modifier.PUBLIC, new MethodSignature(propertyType, methodName, null, null), "return " + fieldName
-                + ";", location);
+        op.addMethod(
+                Modifier.PUBLIC,
+                new MethodSignature(propertyType, methodName, null, null),
+                "return " + fieldName + ";",
+                location);
     }
 
-    public static void createSimpleMutator(EnhancementOperation op, String fieldName, String propertyName,
-            Class propertyType, Location location)
+    public static void createSimpleMutator(EnhancementOperation op, String fieldName,
+            String propertyName, Class propertyType, Location location)
     {
         String methodName = createMutatorMethodName(propertyName);
 
-        op.addMethod(Modifier.PUBLIC, new MethodSignature(void.class, methodName, new Class[] { propertyType }, null),
-                fieldName + " = $1;", location);
+        op.addMethod(Modifier.PUBLIC, new MethodSignature(void.class, methodName, new Class[]
+        { propertyType }, null), fieldName + " = $1;", location);
     }
 
     /**
-     * Returns the correct class for a property to be enhanced into a class. If
-     * a type name is non-null, then it is converted to a Class. If the class
-     * being enhanced defines a property, then the type must be an exact match
-     * (this is largely a holdover from Tapestry 3.0, where the type had to be
-     * provided in the specification). If the type name is null, then the value
-     * returned is the type of the existing property (if such a property
-     * exists), or java.lang.Object is no property exists.
+     * Returns the correct class for a property to be enhanced into a class. If a type name is
+     * non-null, then it is converted to a Class. If the class being enhanced defines a property,
+     * then the type must be an exact match (this is largely a holdover from Tapestry 3.0, where the
+     * type had to be provided in the specification). If the type name is null, then the value
+     * returned is the type of the existing property (if such a property exists), or
+     * java.lang.Object is no property exists.
      * 
      * @param op
      *            the enhancement operation, which provides most of this logic
      * @param propertyName
      *            the name of the property (the property may or may not exist)
      * @param definedTypeName
-     *            the type indicated for the property, may be null to make the
-     *            return value match the type of an existing property.
+     *            the type indicated for the property, may be null to make the return value match
+     *            the type of an existing property.
      */
 
-    public static Class extractPropertyType(EnhancementOperation op, String propertyName, String definedTypeName)
+    public static Class extractPropertyType(EnhancementOperation op, String propertyName,
+            String definedTypeName)
     {
         Defense.notNull(op, "op");
         Defense.notNull(propertyName, "propertyName");
@@ -127,64 +127,64 @@
 
     public static boolean toBoolean(IBinding binding)
     {
-        Boolean wrapped = (Boolean)binding.getObject(Boolean.class);
+        Boolean wrapped = (Boolean) binding.getObject(Boolean.class);
 
         return wrapped == null ? false : wrapped.booleanValue();
     }
 
     public static byte toByte(IBinding binding)
     {
-        Byte wrapped = (Byte)binding.getObject(Byte.class);
+        Byte wrapped = (Byte) binding.getObject(Byte.class);
 
         return wrapped == null ? 0 : wrapped.byteValue();
     }
 
     public static char toChar(IBinding binding)
     {
-        Character wrapped = (Character)binding.getObject(Character.class);
+        Character wrapped = (Character) binding.getObject(Character.class);
 
         return wrapped == null ? 0 : wrapped.charValue();
     }
 
     public static short toShort(IBinding binding)
     {
-        Short wrapped = (Short)binding.getObject(Short.class);
+        Short wrapped = (Short) binding.getObject(Short.class);
 
         return wrapped == null ? 0 : wrapped.shortValue();
     }
 
     public static int toInt(IBinding binding)
     {
-        Integer wrapped = (Integer)binding.getObject(Integer.class);
+        Integer wrapped = (Integer) binding.getObject(Integer.class);
 
         return wrapped == null ? 0 : wrapped.intValue();
     }
 
     public static long toLong(IBinding binding)
     {
-        Long wrapped = (Long)binding.getObject(Long.class);
+        Long wrapped = (Long) binding.getObject(Long.class);
 
         return wrapped == null ? 0 : wrapped.longValue();
     }
 
     public static float toFloat(IBinding binding)
     {
-        Float wrapped = (Float)binding.getObject(Float.class);
+        Float wrapped = (Float) binding.getObject(Float.class);
 
         return wrapped == null ? 0.0f : wrapped.floatValue();
     }
 
     public static double toDouble(IBinding binding)
     {
-        Double wrapped = (Double)binding.getObject(Double.class);
+        Double wrapped = (Double) binding.getObject(Double.class);
 
         return wrapped == null ? 0.0d : wrapped.doubleValue();
     }
 
     /**
-     * Used to unwrap primitive types inside the accessor method. In each case,
-     * the binding is in a variable named "binding", and {0} will be the actual
-     * type of the property. The Map is keyed on the primtive type.
+     * Used to unwrap primitive types inside the accessor method. In each case, the binding is in a
+     * variable named "binding", and {0} will be the actual type of the property. The Map is keyed
+     * on the primtive type.
      */
 
     private static Map _unwrappers = new HashMap();
@@ -202,32 +202,32 @@
     }
 
     /**
-     * Returns the name of the static method, within EnhanceUtils, used to
-     * unwrap a binding to a primitive type. Returns null if the type is not a
-     * primitve.
+     * Returns the name of the static method, within EnhanceUtils, used to unwrap a binding to a
+     * primitive type. Returns null if the type is not a primitve.
      */
 
     public static String getUnwrapperMethodName(Class type)
     {
         Defense.notNull(type, "type");
 
-        return (String)_unwrappers.get(type);
+        return (String) _unwrappers.get(type);
     }
 
     /**
-     * Builds a Javassist expression for unwrapping a binding's value to a type
-     * (either primitive or a class type).
+     * Builds a Javassist expression for unwrapping a binding's value to a type (either primitive or
+     * a class type).
      * 
      * @param op
      *            the enhancement operation
      * @param bindingName
-     *            the name of the field (or an expression) that will evaluate to
-     *            the binding from which a value will be extracted.
+     *            the name of the field (or an expression) that will evaluate to the binding from
+     *            which a value will be extracted.
      * @param valueType
      *            the type of value to be extracted from the binding.
      */
 
-    public static String createUnwrapExpression(EnhancementOperation op, String bindingName, Class valueType)
+    public static String createUnwrapExpression(EnhancementOperation op, String bindingName,
+            Class valueType)
     {
         Defense.notNull(op, "op");
         Defense.notNull(bindingName, "bindingName");
@@ -271,10 +271,10 @@
      *            the name of the property to check
      * @param requiredType
      *            the type of value that will be assigned to the property
-     * @return the property type, or java.lang.Object if the class does not
-     *         define the property
+     * @return the property type, or java.lang.Object if the class does not define the property
      */
-    public static Class verifyPropertyType(EnhancementOperation op, String propertyName, Class requiredType)
+    public static Class verifyPropertyType(EnhancementOperation op, String propertyName,
+            Class requiredType)
     {
         Defense.notNull(op, "op");
         Defense.notNull(propertyName, "propertyName");
@@ -283,15 +283,18 @@
         Class propertyType = op.getPropertyType(propertyName);
 
         // When the property type is not defined, it will end up being
-        if (propertyType == null) return Object.class;
+        if (propertyType == null)
+            return Object.class;
 
         // Make sure that an object of the required type is assignable
         // to the property type.
 
         if (!propertyType.isAssignableFrom(requiredType))
-            throw new ApplicationRuntimeException(EnhanceMessages.wrongTypeForProperty(propertyName, propertyType,
+            throw new ApplicationRuntimeException(EnhanceMessages.wrongTypeForProperty(
+                    propertyName,
+                    propertyType,
                     requiredType));
 
         return propertyType;
     }
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/EnhancementOperationImpl.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/EnhancementOperationImpl.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/EnhancementOperationImpl.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/EnhancementOperationImpl.java Sat Mar 11 12:54:27 2006
@@ -55,8 +55,6 @@
  */
 public class EnhancementOperationImpl implements EnhancementOperation
 {
-    static int _uid = 0;
-    
     private ClassResolver _resolver;
 
     private IComponentSpecification _specification;
@@ -137,16 +135,6 @@
         _log = log;
     }
 
-    /**
-     * Alternate package private constructor used by the test suite, to bypass the defense checks
-     * above.
-     */
-
-    EnhancementOperationImpl()
-    {
-        _log = null;
-    }
-    
     public String toString()
     {
         ToStringBuilder builder = new ToStringBuilder(this);
@@ -235,6 +223,16 @@
         }
     }
 
+    /**
+     * Alternate package private constructor used by the test suite, to bypass the defense checks
+     * above.
+     */
+
+    EnhancementOperationImpl()
+    {
+        _log = null;
+    }
+
     public void claimProperty(String propertyName)
     {
         Defense.notNull(propertyName, "propertyName");
@@ -508,6 +506,8 @@
         return componentClass.getConstructors()[0];
     }
 
+    static int _uid = 0;
+
     private String newClassName()
     {
         String baseName = _baseClass.getName();
@@ -658,4 +658,4 @@
     {
         return m != null && Modifier.isAbstract(m.getModifiers());
     }
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/InjectMessagesWorker.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/InjectMessagesWorker.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/InjectMessagesWorker.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/enhance/InjectMessagesWorker.java Sat Mar 11 12:54:27 2006
@@ -34,15 +34,15 @@
  */
 public class InjectMessagesWorker implements EnhancementWorker
 {
-    final String _messagesProperty = "messages";
+    final String MESSAGES_PROPERTY = "messages";
 
-    final MethodSignature _methodSignature = new MethodSignature(Messages.class, "getMessages",
-            null, null);
-    
     private ErrorLog _errorLog;
 
     private ComponentMessagesSource _componentMessagesSource;
 
+    final MethodSignature METHOD_SIGNATURE = new MethodSignature(Messages.class, "getMessages",
+            null, null);
+
     public void performEnhancement(EnhancementOperation op, IComponentSpecification spec)
     {
         Location location = spec.getLocation();
@@ -53,7 +53,7 @@
         }
         catch (Exception ex)
         {
-            _errorLog.error(EnhanceMessages.errorAddingProperty(_messagesProperty, op
+            _errorLog.error(EnhanceMessages.errorAddingProperty(MESSAGES_PROPERTY, op
                     .getBaseClass(), ex), location, ex);
         }
     }
@@ -62,7 +62,7 @@
     {
         Defense.notNull(op, "op");
 
-        op.claimReadonlyProperty(_messagesProperty);
+        op.claimReadonlyProperty(MESSAGES_PROPERTY);
 
         String sourceField = op.addInjectedField(
                 "_$componentMessagesSource",
@@ -78,7 +78,7 @@
         builder.addln("return _$messages;");
         builder.end();
 
-        op.addMethod(Modifier.PUBLIC, _methodSignature, builder.toString(), location);
+        op.addMethod(Modifier.PUBLIC, METHOD_SIGNATURE, builder.toString(), location);
     }
 
     public void setComponentMessagesSource(ComponentMessagesSource componentMessagesSource)
@@ -90,4 +90,4 @@
     {
         _errorLog = errorLog;
     }
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/error/ErrorMessages.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/error/ErrorMessages.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/error/ErrorMessages.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/error/ErrorMessages.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// 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.
@@ -14,30 +14,23 @@
 
 package org.apache.tapestry.error;
 
-import org.apache.hivemind.Messages;
 import org.apache.hivemind.impl.MessageFormatter;
 
 /**
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
-public final class ErrorMessages
+public class ErrorMessages
 {
-
-    private final static Messages MESSAGES = new MessageFormatter(ErrorMessages.class);
-
-    /** @since 4.1 */
-    private ErrorMessages()
-    {
-    }
+    private final static MessageFormatter _formatter = new MessageFormatter(ErrorMessages.class);
 
     public static String unableToProcessClientRequest(Throwable cause)
     {
-        return MESSAGES.format("unable-to-process-client-request", cause);
+        return _formatter.format("unable-to-process-client-request", cause);
     }
 
     static String unableToPresentExceptionPage(Throwable cause)
     {
-        return MESSAGES.format("unable-to-present-exception-page", cause);
+        return _formatter.format("unable-to-present-exception-page", cause);
     }
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/error/StaleLinkExceptionPresenter.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/error/StaleLinkExceptionPresenter.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/error/StaleLinkExceptionPresenter.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/error/StaleLinkExceptionPresenter.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// 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.
@@ -20,15 +20,13 @@
 import org.apache.tapestry.StaleLinkException;
 
 /**
- * Service interface for informing the user about a
- * {@link org.apache.tapestry.StaleLinkException}.
+ * Service interface for informing the user about a {@link org.apache.tapestry.StaleLinkException}.
  * 
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
 public interface StaleLinkExceptionPresenter
 {
-
     /**
      * Reports the stale link exception.
      * 
@@ -37,6 +35,6 @@
      * @param cause
      *            the exception that was caught
      */
-    void presentStaleLinkException(IRequestCycle cycle, StaleLinkException cause)
-        throws IOException;
+    public void presentStaleLinkException(IRequestCycle cycle, StaleLinkException cause)
+            throws IOException;
 }

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/error/StaleSessionExceptionPresenter.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/error/StaleSessionExceptionPresenter.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/error/StaleSessionExceptionPresenter.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/error/StaleSessionExceptionPresenter.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// 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.
@@ -27,7 +27,6 @@
  */
 public interface StaleSessionExceptionPresenter
 {
-
     /**
      * Reports the stale session exception.
      * 
@@ -36,6 +35,6 @@
      * @param cause
      *            the exception that was caught
      */
-    void presentStaleSessionException(IRequestCycle cycle, StaleSessionException cause)
-        throws IOException;
+    public void presentStaleSessionException(IRequestCycle cycle, StaleSessionException cause)
+            throws IOException;
 }

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/event/ObservedChangeEvent.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/event/ObservedChangeEvent.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/event/ObservedChangeEvent.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/event/ObservedChangeEvent.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2004, 2005, 2006 The Apache Software Foundation
+// Copyright 2004, 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.
@@ -27,20 +27,18 @@
 
 public class ObservedChangeEvent extends EventObject
 {
-
     private static final long serialVersionUID = -7693394232554811975L;
 
-    private IComponent _component;
+	private IComponent _component;
 
     private String _propertyName;
 
     private Object _newValue;
 
     /**
-     * Creates the event. The new value must be null, or be a serializable
-     * object. (It is declared as Object as a concession to the Java 2
-     * collections framework, where the implementations are serializable but the
-     * interfaces (Map, List, etc.) don't extend Serializable ... so we wait
+     * Creates the event. The new value must be null, or be a serializable object. (It is declared
+     * as Object as a concession to the Java 2 collections framework, where the implementations are
+     * serializable but the interfaces (Map, List, etc.) don't extend Serializable ... so we wait
      * until runtime to check).
      * 
      * @param component
@@ -50,8 +48,7 @@
      * @param newValue
      *            The new value of the property.
      * @throws IllegalArgumentException
-     *             if propertyName is null, or if the new value is not
-     *             serializable
+     *             if propertyName is null, or if the new value is not serializable
      */
 
     public ObservedChangeEvent(IComponent component, String propertyName, Object newValue)
@@ -80,4 +77,4 @@
         return _propertyName;
     }
 
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/event/PageEvent.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/event/PageEvent.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/event/PageEvent.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/event/PageEvent.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2004, 2005, 2006 The Apache Software Foundation
+// Copyright 2004, 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.
@@ -20,24 +20,27 @@
 import org.apache.tapestry.IRequestCycle;
 
 /**
- * Encapsulates information related to the page listener interfaces.
+ *  Encapsulates information related to the page listener
+ *  interfaces.
+ *
+ *  @author Howard Lewis Ship
+ *  @since 1.0.5
  * 
- * @author Howard Lewis Ship
- * @since 1.0.5
- */
+ **/
 
 public class PageEvent extends EventObject
 {
-
     private static final long serialVersionUID = -6167989946862112436L;
-
-    private final transient IPage page;
-    private final transient IRequestCycle requestCycle;
+    
+	private transient IPage page;
+    private transient IRequestCycle requestCycle;
 
     /**
-     * Constructs a new instance of the event. The
-     * {@link EventObject#getSource()} of the event will be the {@link IPage}.
-     */
+     *  Constructs a new instance of the event.  The
+     *  {@link EventObject#getSource()} of the event will
+     *  be the {@link IPage}.
+     *
+     **/
 
     public PageEvent(IPage page, IRequestCycle cycle)
     {
@@ -56,4 +59,4 @@
     {
         return requestCycle;
     }
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/event/ReportStatusEvent.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/event/ReportStatusEvent.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/event/ReportStatusEvent.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/event/ReportStatusEvent.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// 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.
@@ -21,18 +21,16 @@
 import org.apache.tapestry.describe.DescriptionReceiver;
 
 /**
- * Event object used by {@link org.apache.tapestry.event.ReportStatusListener};
- * the event implements {@link org.apache.tapestry.describe.DescriptionReceiver};
- * classes (typically, HiveMind service implementations) that implement the
- * listener interface will "describe" themselves to the event.
+ * Event object used by {@link org.apache.tapestry.event.ReportStatusListener}; the event
+ * implements {@link org.apache.tapestry.describe.DescriptionReceiver}; classes (typically,
+ * HiveMind service implementations) that implement the listener interface will "describe"
+ * themselves to the event.
  * 
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
 public class ReportStatusEvent extends EventObject implements DescriptionReceiver
 {
-
-    private static final long serialVersionUID = 7546818328708861783L;
     private final DescriptionReceiver _receiver;
 
     public ReportStatusEvent(Object source, DescriptionReceiver receiver)

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/form/AbstractFormComponent.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/form/AbstractFormComponent.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/form/AbstractFormComponent.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/form/AbstractFormComponent.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2004, 2005, 2006 The Apache Software Foundation
+// Copyright 2004, 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.
@@ -23,17 +23,15 @@
 import org.apache.tapestry.valid.ValidationConstants;
 
 /**
- * A base class for building components that correspond to HTML form elements.
- * All such components must be wrapped (directly or indirectly) by a
- * {@link Form} component.
+ * A base class for building components that correspond to HTML form elements. All such components
+ * must be wrapped (directly or indirectly) by a {@link Form} component.
  * 
  * @author Howard Lewis Ship
  * @author Paul Ferraro
  * @since 1.0.3
  */
-public abstract class AbstractFormComponent extends AbstractComponent implements
-        IFormComponent {
-
+public abstract class AbstractFormComponent extends AbstractComponent implements IFormComponent
+{
     public abstract IForm getForm();
 
     public abstract void setForm(IForm form);
@@ -43,10 +41,9 @@
     public abstract void setName(String name);
 
     /**
-     * Returns true if the corresponding field, on the client side, can accept
-     * user focus (i.e., implements the focus() method). Most components can
-     * take focus (if not disabled), but a few ({@link Hidden}) override this
-     * method to always return false.
+     * Returns true if the corresponding field, on the client side, can accept user focus (i.e.,
+     * implements the focus() method). Most components can take focus (if not disabled), but a few ({@link Hidden})
+     * override this method to always return false.
      */
 
     protected boolean getCanTakeFocus()
@@ -55,24 +52,22 @@
     }
 
     /**
-     * Should be connected to a parameter named "id" (annotations would be
-     * helpful here!). For components w/o such a parameter, this will simply
-     * return null.
+     * Should be connected to a parameter named "id" (annotations would be helpful here!). For
+     * components w/o such a parameter, this will simply return null.
      */
 
     public abstract String getIdParameter();
 
     /**
-     * Stores the actual id allocated (or null if the component doesn't support
-     * this).
+     * Stores the actual id allocated (or null if the component doesn't support this).
      */
 
     public abstract void setClientId(String id);
 
     /**
-     * Invoked from {@link #renderFormComponent(IMarkupWriter, IRequestCycle)}
-     * (that is, an implementation in a subclass), to obtain an id and render an
-     * id attribute. Reads {@link #getIdParameter()}.
+     * Invoked from {@link #renderFormComponent(IMarkupWriter, IRequestCycle)} (that is, an
+     * implementation in a subclass), to obtain an id and render an id attribute. Reads
+     * {@link #getIdParameter()}.
      */
 
     protected void renderIdAttribute(IMarkupWriter writer, IRequestCycle cycle)
@@ -82,10 +77,10 @@
 
         String rawId = getIdParameter();
 
-        if (rawId == null) return;
+        if (rawId == null)
+            return;
 
-        String id = cycle.getUniqueId(TapestryUtils
-                .convertTapestryIdToNMToken(rawId));
+        String id = cycle.getUniqueId(TapestryUtils.convertTapestryIdToNMToken(rawId));
 
         // Store for later access by the FieldLabel (or JavaScript).
 
@@ -104,7 +99,8 @@
 
         setForm(form);
 
-        if (form.wasPrerendered(writer, this)) return;
+        if (form.wasPrerendered(writer, this))
+            return;
 
         IValidationDelegate delegate = form.getDelegate();
 
@@ -112,21 +108,27 @@
 
         setName(form);
 
-        if (form.isRewinding()) {
-            if (!isDisabled()) {
+        if (form.isRewinding())
+        {
+            if (!isDisabled())
+            {
                 rewindFormComponent(writer, cycle);
             }
 
-            // This is for the benefit of the couple of components (LinkSubmit)
-            // that allow a body.
+            // This is for the benefit of the couple of components (LinkSubmit) that allow a body.
             // The body should render when the component rewinds.
 
-            if (getRenderBodyOnRewind()) renderBody(writer, cycle);
-        } else if (!cycle.isRewinding()) {
+            if (getRenderBodyOnRewind())
+                renderBody(writer, cycle);
+        }
+        else if (!cycle.isRewinding())
+        {
             renderFormComponent(writer, cycle);
 
-            if (getCanTakeFocus() && !isDisabled()) {
-                delegate.registerForFocus(this,
+            if (getCanTakeFocus() && !isDisabled())
+            {
+                delegate.registerForFocus(
+                        this,
                         delegate.isInError() ? ValidationConstants.ERROR_FIELD
                                 : ValidationConstants.NORMAL_FIELD);
             }
@@ -135,14 +137,12 @@
     }
 
     /**
-     * A small number of components should always render their body on rewind
-     * (even if the component is itself disabled) and should override this
-     * method to return true. Components that explicitly render their body
-     * inside {@link #rewindFormComponent(IMarkupWriter, IRequestCycle)} should
-     * leave this method returning false. Remember that if the component is
-     * {@link IFormComponent#isDisabled() disabled} then
-     * {@link #rewindFormComponent(IMarkupWriter, IRequestCycle)} won't be
-     * invoked.
+     * A small number of components should always render their body on rewind (even if the component
+     * is itself disabled) and should override this method to return true. Components that
+     * explicitly render their body inside
+     * {@link #rewindFormComponent(IMarkupWriter, IRequestCycle)} should leave this method returning
+     * false. Remember that if the component is {@link IFormComponent#isDisabled() disabled} then
+     * {@link #rewindFormComponent(IMarkupWriter, IRequestCycle)} won't be invoked.
      * 
      * @return false; override this method to change.
      */
@@ -151,20 +151,17 @@
         return false;
     }
 
-    protected void renderDelegatePrefix(IMarkupWriter writer,
-            IRequestCycle cycle)
+    protected void renderDelegatePrefix(IMarkupWriter writer, IRequestCycle cycle)
     {
         getForm().getDelegate().writePrefix(writer, cycle, this, null);
     }
 
-    protected void renderDelegateAttributes(IMarkupWriter writer,
-            IRequestCycle cycle)
+    protected void renderDelegateAttributes(IMarkupWriter writer, IRequestCycle cycle)
     {
         getForm().getDelegate().writeAttributes(writer, cycle, this, null);
     }
 
-    protected void renderDelegateSuffix(IMarkupWriter writer,
-            IRequestCycle cycle)
+    protected void renderDelegateSuffix(IMarkupWriter writer, IRequestCycle cycle)
     {
         getForm().getDelegate().writeSuffix(writer, cycle, this, null);
     }
@@ -175,9 +172,8 @@
     }
 
     /**
-     * Returns false. Subclasses that might be required must override this
-     * method. Typically, this involves checking against the component's
-     * validators.
+     * Returns false. Subclasses that might be required must override this method. Typically, this
+     * involves checking against the component's validators.
      * 
      * @since 4.0
      */
@@ -186,9 +182,7 @@
         return false;
     }
 
-    protected abstract void renderFormComponent(IMarkupWriter writer,
-            IRequestCycle cycle);
+    protected abstract void renderFormComponent(IMarkupWriter writer, IRequestCycle cycle);
 
-    protected abstract void rewindFormComponent(IMarkupWriter writer,
-            IRequestCycle cycle);
-}
+    protected abstract void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle);
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/form/AbstractSubmit.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/form/AbstractSubmit.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/form/AbstractSubmit.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/form/AbstractSubmit.java Sat Mar 11 12:54:27 2006
@@ -1,4 +1,4 @@
-// Copyright 2005, 2006 The Apache Software Foundation
+// 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.
@@ -29,8 +29,8 @@
  * @since 4.0
  */
 
-abstract class AbstractSubmit extends AbstractFormComponent {
-
+abstract class AbstractSubmit extends AbstractFormComponent
+{
     /**
      * Determine if this submit component was clicked.
      * 
@@ -41,71 +41,76 @@
     protected abstract boolean isClicked(IRequestCycle cycle, String name);
 
     /**
-     * @see org.apache.tapestry.form.AbstractFormComponent#rewindFormComponent(org.apache.tapestry.IMarkupWriter,
-     *      org.apache.tapestry.IRequestCycle)
+     * @see org.apache.tapestry.form.AbstractFormComponent#rewindFormComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)
      */
     protected void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle)
     {
-        if (isClicked(cycle, getName())) handleClick(cycle, getForm());
+        if (isClicked(cycle, getName()))
+            handleClick(cycle, getForm());
     }
 
     void handleClick(final IRequestCycle cycle, IForm form)
     {
-        if (isParameterBound("selected")) setSelected(getTag());
+        if (isParameterBound("selected"))
+            setSelected(getTag());
 
         final IActionListener listener = getListener();
         final IActionListener action = getAction();
 
-        if (listener == null && action == null) return;
+        if (listener == null && action == null)
+            return;
 
         final ListenerInvoker listenerInvoker = getListenerInvoker();
 
         Object parameters = getParameters();
-        if (parameters != null) {
-            if (parameters instanceof Collection) {
-                cycle.setListenerParameters(((Collection)parameters).toArray());
-            } else {
-                cycle.setListenerParameters(new Object[] { parameters });
+        if (parameters != null)
+        {
+            if (parameters instanceof Collection)
+            {
+                cycle.setListenerParameters(((Collection) parameters).toArray());
+            }
+            else
+            {
+                cycle.setListenerParameters(new Object[]
+                { parameters });
             }
         }
 
         // Invoke 'listener' now, but defer 'action' for later
         if (listener != null)
-            listenerInvoker
-                    .invokeListener(listener, AbstractSubmit.this, cycle);
-
+        	listenerInvoker.invokeListener(listener, AbstractSubmit.this, cycle);
+        
         if (action != null) {
-            Runnable notify = new Runnable() {
-
-                public void run()
-                {
-                    listenerInvoker.invokeListener(action, AbstractSubmit.this,
-                            cycle);
-                }
-            };
-
+	        Runnable notify = new Runnable()
+	        {
+	            public void run()
+	            {
+	                listenerInvoker.invokeListener(action, AbstractSubmit.this, cycle);
+	            }
+	        };
+	
             form.addDeferredRunnable(notify);
         }
     }
 
-    /** Parameter. */
+    /** parameter */
     public abstract IActionListener getListener();
 
-    /** Parameter. */
+    /** parameter */
     public abstract IActionListener getAction();
 
-    /** Parameter. */
+    /** parameter */
     public abstract Object getTag();
 
-    /** Parameter. */
+    /** parameter */
     public abstract void setSelected(Object tag);
 
-    /** Parameter. */
+    /** parameter */
     public abstract boolean getDefer();
 
-    /** Parameter. */
+    /** parameter */
     public abstract Object getParameters();
 
-    /** Injected. */
+    /** Injected */
     public abstract ListenerInvoker getListenerInvoker();
 }



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