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 [10/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/examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/fsmodel/FileSystemDataModel.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/fsmodel/FileSystemDataModel.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/fsmodel/FileSystemDataModel.java (original)
+++ jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/fsmodel/FileSystemDataModel.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,74 +23,70 @@
 /**
  * @author ceco
  */
-public class FileSystemDataModel extends SimpleTreeDataModel implements Serializable
+public class FileSystemDataModel extends SimpleTreeDataModel
+    implements Serializable
 {
-
     private static final long serialVersionUID = 2384273235598992452L;
 
-    /**
+	/**
      * Constructor for FileSystemDataModel.
-     * 
      * @param objRootNode
      */
-    public FileSystemDataModel(ITreeNode objRootNode)
-    {
+    public FileSystemDataModel(ITreeNode objRootNode) {
         super(objRootNode);
     }
 
     /**
      * @see org.apache.tapestry.contrib.tree.model.ITreeDataModel#getObject(Object)
      */
-    public Object getObject(Object objUniqueKey)
-    {
+    public Object getObject(Object objUniqueKey) {
         return findNode(objUniqueKey, (IFileSystemTreeNode)getRoot());
     }
 
-    private IFileSystemTreeNode findNode(Object objUniqueKey, IFileSystemTreeNode objParentNode)
-    {
-        String strUniqueKey = (String)objUniqueKey;
+    private IFileSystemTreeNode findNode(Object objUniqueKey,
+                                         IFileSystemTreeNode objParentNode) {
+        String strUniqueKey = (String) objUniqueKey;
         String strParentUniqueKey = objParentNode.getAbsolutePath();
 
-        if (strUniqueKey.equals(strParentUniqueKey)) { return objParentNode; }
+        if (strUniqueKey.equals(strParentUniqueKey)) {
+            return objParentNode;
+        }
 
         IFileSystemTreeNode obj = null;
 
-        if (strUniqueKey.startsWith(strParentUniqueKey))
-        {
-            for(Iterator iter = objParentNode.getChildren().iterator(); iter.hasNext();)
-            {
-                IFileSystemTreeNode element = (IFileSystemTreeNode)iter.next();
-                obj = findNode(objUniqueKey, element);
-                if (obj != null)
-                {
-                    break;
-                }
-            }
-        }
+		if(strUniqueKey.startsWith(strParentUniqueKey))
+		{
+	        for (Iterator iter = objParentNode.getChildren().iterator(); iter.hasNext();) {
+	            IFileSystemTreeNode element = (IFileSystemTreeNode) iter.next();
+	            obj = findNode(objUniqueKey, element);
+	            if (obj != null) {
+	                break;
+	            }
+	        }
+		}
 
         return obj;
     }
 
     /**
-     * @see org.apache.tapestry.contrib.tree.model.ITreeDataModel#getUniqueKey(Object,
-     *      Object)
+     * @see org.apache.tapestry.contrib.tree.model.ITreeDataModel#getUniqueKey(Object, Object)
      */
-    public Object getUniqueKey(Object objTarget, Object objParentUniqueKey)
-    {
-        IFileSystemTreeNode objNode = (IFileSystemTreeNode)objTarget;
+    public Object getUniqueKey(Object objTarget, Object objParentUniqueKey) {
+        IFileSystemTreeNode objNode = (IFileSystemTreeNode) objTarget;
         return objNode.getAbsolutePath();
     }
 
     /**
-     * @see org.apache.tapestry.contrib.tree.model.ITreeDataModel#isAncestorOf(Object,
-     *      Object)
+     * @see org.apache.tapestry.contrib.tree.model.ITreeDataModel#isAncestorOf(Object, Object)
      */
-    public boolean isAncestorOf(Object objChildUniqueKey, Object objParentUniqueKey)
-    {
+    public boolean isAncestorOf(Object objChildUniqueKey,
+                                Object objParentUniqueKey) {
         String strChildAbsolutePath = (String)objChildUniqueKey;
         String strParentAbsolutePath = (String)objParentUniqueKey;
 
-        if ("".equals(strParentAbsolutePath)) { return true; }
+        if("".equals(strParentAbsolutePath)) {
+            return true;
+        }
 
         return strChildAbsolutePath.lastIndexOf(strParentAbsolutePath) > -1;
     }
@@ -98,9 +94,9 @@
     /**
      * @see org.apache.tapestry.contrib.tree.model.ITreeDataModel#getParentUniqueKey(Object)
      */
-    public Object getParentUniqueKey(Object objChildUniqueKey)
-    {
-        IFileSystemTreeNode objNode = (IFileSystemTreeNode)getObject(objChildUniqueKey);
+    public Object getParentUniqueKey(Object objChildUniqueKey) {
+        IFileSystemTreeNode objNode =
+            (IFileSystemTreeNode) getObject(objChildUniqueKey);
         return objNode.getParent();
     }
 

Modified: jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/fsmodel/FolderObject.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/fsmodel/FolderObject.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/fsmodel/FolderObject.java (original)
+++ jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/fsmodel/FolderObject.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.
@@ -22,16 +22,9 @@
 import org.apache.tapestry.contrib.tree.model.ITreeNode;
 import org.apache.tapestry.engine.IEngineService;
 
-/** @author tsv? */
 public class FolderObject extends SFObject
 {
 
-    private static final long serialVersionUID = 1889745019885512018L;
-
-    private static final String OPEN_IMAGE = "/org/apache/tapestry/workbench/tree/examples/fsmodel/TreeOpen.gif";
-
-    private static final String CLOSED_IMAGE = "/org/apache/tapestry/workbench/tree/examples/fsmodel/TreeClosed.gif";
-    
     /**
      * @associates <{File}>
      * @supplierCardinality 0..*
@@ -50,13 +43,15 @@
 
     private final IEngineService _assetService;
 
-    public FolderObject(ITreeNode objParent, File objFile, boolean bInvokeInit, IEngineService assetService)
+    public FolderObject(ITreeNode objParent, File objFile, boolean bInvokeInit,
+            IEngineService assetService)
     {
         super(objParent, objFile);
 
         _assetService = assetService;
 
-        if (bInvokeInit) init();
+        if (bInvokeInit)
+            init();
     }
 
     public void reload()
@@ -66,9 +61,12 @@
 
         File[] arrFiles = getFile().listFiles();
 
-        if (arrFiles == null) { return; }
+        if (arrFiles == null)
+        {
+            return;
+        }
 
-        for(int i = 0; i < arrFiles.length; i++)
+        for (int i = 0; i < arrFiles.length; i++)
         {
             if (arrFiles[i].isDirectory())
             {
@@ -106,10 +104,13 @@
 
     public int getChildNumber(Object objChild)
     {
-        for(int i = 0; i < m_vFolders.size(); i++)
+        for (int i = 0; i < m_vFolders.size(); i++)
         {
             Object objChildFolder = m_vFolders.elementAt(i);
-            if (objChildFolder.equals(objChild)) { return i; }
+            if (objChildFolder.equals(objChild))
+            {
+                return i;
+            }
         }
         return -1;
     }
@@ -157,11 +158,15 @@
         return false;
     }
 
+    private final static String openImage = "/org/apache/tapestry/workbench/tree/examples/fsmodel/TreeOpen.gif";
+
+    private final static String closedImage = "/org/apache/tapestry/workbench/tree/examples/fsmodel/TreeClosed.gif";
+
     public AssetsHolder getAssets()
     {
         if (m_objAssetsHolder == null)
         {
-            m_objAssetsHolder = new AssetsHolder(_assetService, OPEN_IMAGE, CLOSED_IMAGE);
+            m_objAssetsHolder = new AssetsHolder(_assetService, openImage, closedImage);
         }
         return m_objAssetsHolder;
     }

Modified: jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/fsmodel/NodeRenderFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/fsmodel/NodeRenderFactory.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/fsmodel/NodeRenderFactory.java (original)
+++ jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/fsmodel/NodeRenderFactory.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.
@@ -26,61 +26,58 @@
 /**
  * @author ceco
  */
-public class NodeRenderFactory implements INodeRenderFactory
-{
+public class NodeRenderFactory implements INodeRenderFactory {
 
     /**
      * Constructor for NodeRenderFactory.
      */
-    public NodeRenderFactory()
-    {
+    public NodeRenderFactory() {
         super();
     }
 
-    public IRender getRenderByID(Object objUniqueKey, ITreeModelSource objTreeModelSource, IRequestCycle objCycle)
-    {
+    public IRender getRenderByID(Object objUniqueKey,
+								 ITreeModelSource objTreeModelSource,
+                                 IRequestCycle objCycle) {
         Object objValue = objTreeModelSource.getTreeModel().getTreeDataModel().getObject(objUniqueKey);
         return getRender(objValue, objTreeModelSource, objCycle);
     }
 
-    public IRender getRender(Object objValue, ITreeModelSource objTreeModelSource, IRequestCycle objCycle)
-    {
+    public IRender getRender(Object objValue,
+							 ITreeModelSource objTreeModelSource,
+                             IRequestCycle objCycle) {
         return new CFileSystemRender(objValue, objTreeModelSource);
     }
 
-    /** Renders a file system? */
-
-    public class CFileSystemRender implements IRender
-    {
 
+    public class CFileSystemRender implements IRender{
         private Object m_objNode;
         private ITreeModelSource m_objTreeModelSource;
 
-        public CFileSystemRender(Object objNode, ITreeModelSource objTreeModelSource)
-        {
+        public CFileSystemRender(Object objNode, ITreeModelSource objTreeModelSource) {
             super();
             m_objNode = objNode;
-            m_objTreeModelSource = objTreeModelSource;
+			m_objTreeModelSource = objTreeModelSource;
         }
 
-        public boolean isOpen()
-        {
-            ITreeDataModel objDataModel = m_objTreeModelSource.getTreeModel().getTreeDataModel();
-            ITreeStateModel objStateModel = m_objTreeModelSource.getTreeModel().getTreeStateModel();
+        public boolean isOpen() {
+            ITreeDataModel objDataModel =
+				m_objTreeModelSource.getTreeModel().getTreeDataModel();
+            ITreeStateModel objStateModel =
+				m_objTreeModelSource.getTreeModel().getTreeStateModel();
             Object objUniqueKey = objDataModel.getUniqueKey(m_objNode, null);
             return objStateModel.isUniqueKeyExpanded(objUniqueKey);
         }
 
-        public boolean isSelected()
-        {
-            ITreeDataModel objDataModel = m_objTreeModelSource.getTreeModel().getTreeDataModel();
-            ITreeStateModel objStateModel = m_objTreeModelSource.getTreeModel().getTreeStateModel();
+        public boolean isSelected(){
+            ITreeDataModel objDataModel =
+				m_objTreeModelSource.getTreeModel().getTreeDataModel();
+            ITreeStateModel objStateModel =
+				m_objTreeModelSource.getTreeModel().getTreeStateModel();
             Object objUniqueKey = objDataModel.getUniqueKey(m_objNode, null);
             return objUniqueKey.equals(objStateModel.getSelectedNode());
         }
 
-        public void render(IMarkupWriter objWriter, IRequestCycle objCycle)
-        {
+        public void render(IMarkupWriter objWriter, IRequestCycle objCycle) {
             PrivateAsset objAsset = getAsset();
             objWriter.begin("img");
             objWriter.attribute("border", "0");
@@ -96,21 +93,16 @@
             objWriter.end();
         }
 
-        public IFileSystemTreeNode getNode()
-        {
-            return (IFileSystemTreeNode)m_objNode;
+        public IFileSystemTreeNode getNode(){
+            return (IFileSystemTreeNode) m_objNode;
         }
 
-        private PrivateAsset getAsset()
-        {
+        private PrivateAsset getAsset(){
             PrivateAsset objAsset;
 
-            if (!isOpen())
-            {
+            if (!isOpen()) {
                 objAsset = getNode().getAssets().getAssetForCloseNode();
-            }
-            else
-            {
+            } else {
                 objAsset = getNode().getAssets().getAssetForOpenNode();
             }
 

Modified: jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/fsmodel/SFObject.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/fsmodel/SFObject.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/fsmodel/SFObject.java (original)
+++ jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/tree/examples/fsmodel/SFObject.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,130 +20,116 @@
 
 import org.apache.tapestry.contrib.tree.model.ITreeNode;
 
-/**
- * @author tsv?
- */
-public abstract class SFObject implements IFileSystemTreeNode
-{
-
+public abstract class SFObject implements IFileSystemTreeNode{
     protected File m_objFile;
     protected ITreeNode m_objParent;
-    protected transient AssetsHolder m_objAssetsHolder = null;
     private Date m_objDate;
-    
-    public SFObject(ITreeNode objParent, File objFile)
-    {
+    protected transient AssetsHolder m_objAssetsHolder = null;
+
+    public SFObject(ITreeNode objParent, File objFile) {
         m_objParent = objParent;
         m_objFile = objFile;
-        // init();
+//        init();
     }
 
-    protected void init()
-    {
-        if (m_objFile.isFile() || m_objFile.isDirectory()) m_objDate = new Date(m_objFile.lastModified());
+    protected void init() {
+		if(m_objFile.isFile() || m_objFile.isDirectory())
+        	m_objDate = new Date(m_objFile.lastModified());
     }
 
-    public String getName()
-    {
-        if (m_objFile.getName().equals("")) { return m_objFile.toString(); }
+    public String getName() {
+        if (m_objFile.getName().equals("")) {
+            return m_objFile.toString();
+        }
         return m_objFile.getName();
     }
 
-    public Date getDate()
-    {
+    public Date getDate() {
         return m_objDate;
     }
 
-    public Object getAttributes()
-    {
+    public Object getAttributes() {
         return null;
     }
 
-    protected File getFile()
-    {
+    protected File getFile() {
         return m_objFile;
     }
 
     /**
      * @see org.apache.tapestry.contrib.tree.model.ITreeNode#getParent()
      */
-    public ITreeNode getParent()
-    {
+    public ITreeNode getParent() {
         return m_objParent;
     }
 
     /**
      * @see org.apache.tapestry.contrib.tree.model.ITreeNode#containsChild(ITreeNode)
      */
-    public boolean containsChild(ITreeNode node)
-    {
+    public boolean containsChild(ITreeNode node) {
         return false;
     }
 
     /**
      * @see org.apache.tapestry.contrib.tree.model.ITreeNode#getAllowsChildren()
      */
-    public boolean getAllowsChildren()
-    {
+    public boolean getAllowsChildren() {
         return false;
     }
 
     /**
      * @see org.apache.tapestry.contrib.tree.model.ITreeNode#getChildCount()
      */
-    public int getChildCount()
-    {
+    public int getChildCount() {
         return 0;
     }
 
     /**
      * @see org.apache.tapestry.contrib.tree.model.ITreeNode#getChildren()
      */
-    public Collection getChildren()
-    {
+    public Collection getChildren() {
         return null;
     }
 
     /**
      * @see org.apache.tapestry.contrib.tree.model.ITreeNode#isLeaf()
      */
-    public boolean isLeaf()
-    {
+    public boolean isLeaf() {
         return false;
     }
 
     /**
      * @see java.lang.Object#equals(Object)
      */
-    public boolean equals(Object arg0)
-    {
-        if (!(arg0 instanceof SFObject)) { return false; }
+    public boolean equals(Object arg0) {
+        if (!(arg0 instanceof SFObject)) {
+            return false;
+        }
         SFObject objSF = (SFObject)arg0;
-        if (getFile().equals(objSF.getFile())) { return true; }
+        if (getFile().equals(objSF.getFile())) {
+            return true;
+        }
         return false;
     }
 
     /**
      * @see java.lang.Object#hashCode()
      */
-    public int hashCode()
-    {
+    public int hashCode() {
         return m_objFile.hashCode();
     }
 
     /**
      * @see java.lang.Object#toString()
      */
-    public String toString()
-    {
+    public String toString() {
         return getName();
     }
 
     /**
      * @see org.apache.tapestry.workbench.tree.examples.fsmodel.IFileSystemTreeNode#getAbsolutePath()
      */
-    public String getAbsolutePath()
-    {
+    public String getAbsolutePath() {
         return getFile().getAbsolutePath();
     }
 }

Modified: jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/upload/Upload.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/upload/Upload.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/upload/Upload.java (original)
+++ jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/upload/Upload.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.
@@ -29,11 +29,6 @@
 
 public abstract class Upload extends BasePage
 {
-
-    private static final String[] BPL_OPTIONS = new String[] { "8", "16", "24", "32", "40", "48" };
-
-    private IPropertySelectionModel bplModel;
-
     public abstract IUploadFile getFile();
 
     public abstract boolean isShowAscii();
@@ -42,6 +37,11 @@
 
     public abstract IValidationDelegate getDelegate();
 
+    private static final String[] bytesPerLineOptions = new String[]
+    { "8", "16", "24", "32", "40", "48" };
+
+    private IPropertySelectionModel bplModel;
+
     @InjectPage("UploadResults")
     public abstract UploadResults getUploadResults();
 
@@ -56,8 +56,9 @@
 
     public IPropertySelectionModel getBytesPerLineModel()
     {
-        if (bplModel == null) bplModel = new StringPropertySelectionModel(BPL_OPTIONS);
+        if (bplModel == null)
+            bplModel = new StringPropertySelectionModel(bytesPerLineOptions);
 
         return bplModel;
     }
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/upload/UploadResults.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/upload/UploadResults.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/upload/UploadResults.java (original)
+++ jakarta/tapestry/trunk/examples/Workbench/src/java/org/apache/tapestry/workbench/upload/UploadResults.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.
@@ -33,7 +33,6 @@
 
 public abstract class UploadResults extends BasePage
 {
-
     public abstract void setFile(IUploadFile file);
 
     public abstract void setFileDump(String fileDump);
@@ -58,11 +57,12 @@
 
             byte[] buffer = new byte[1000];
 
-            while(true)
+            while (true)
             {
                 int length = in.read(buffer);
 
-                if (length < 0) break;
+                if (length < 0)
+                    break;
 
                 out.write(buffer, 0, length);
             }
@@ -133,4 +133,4 @@
             }
         }
     }
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/build.xml?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/build.xml (original)
+++ jakarta/tapestry/trunk/framework/build.xml Sat Mar 11 12:54:27 2006
@@ -38,15 +38,16 @@
   <target name="compile-dependencies">
     <ibiblio-dependency artifact="commons-codec"      version="${codec.version}"    group="commons-codec"/>
     <ibiblio-dependency artifact="commons-fileupload" version="${fileupload.version}" group="commons-fileupload"/>    
-    <ibiblio-dependency artifact="commons-logging"    version="${logging.version}"    group="commons-logging"/>
-  	<ibiblio-dependency artifact="commons-beanutils"  version="${beanutils.version}"  group="commons-beanutils"/>
+    <ibiblio-dependency artifact="commons-logging"    version="${logging.version}"  group="commons-logging"/>
     <ibiblio-dependency artifact="hivemind"           version="${hivemind.version}" group="hivemind"/>
     <ibiblio-dependency artifact="hivemind-lib"       version="${hivemind.version}" group="hivemind"/>
     <ibiblio-dependency artifact="oro"                version="${oro.version}"      group="oro"/>
     <ibiblio-dependency artifact="javassist"          version="${javassist.version}" group="javassist"/>
     <ibiblio-dependency artifact="servletapi"         version="${servlet.version}"  group="servletapi"/>
     <ibiblio-dependency artifact="ognl"               version="${ognl.version}"     group="ognl"/>
-    
+    <ibiblio-dependency artifact="commons-io"         version="${io.version}"  group="commons-io"/>
+  	<ibiblio-dependency artifact="commons-beanutils"         version="${beanutils.version}"  group="commons-beanutils"/>
+  	
     <ibiblio-dependency artifact="log4j"              version="${log4j.version}"    group="log4j"    use="test"/>
     <ibiblio-dependency artifact="easymock"           version="1.1"                 group="easymock" use="test"/>
     <ibiblio-dependency artifact="easymockclassextension" version="1.1"             group="easymock" use="test"/>

Modified: jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.asset.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.asset.xml?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.asset.xml (original)
+++ jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.asset.xml Sat Mar 11 12:54:27 2006
@@ -65,6 +65,7 @@
         <set-object property="contextPath" value="infrastructure:contextPath"/>
         <set-service property="webContext" service-id="tapestry.globals.WebContext"/>
         <set-object property="localizer" value="infrastructure:resourceLocalizer"/>
+  		<set-object property="requestCycle" value="infrastructure:requestCycle" />
       </construct>
     </invoke-factory>
     
@@ -137,54 +138,4 @@
   <contribution configuration-id="tapestry.Infrastructure">
     <property name="assetFactory" object="service:LookupAssetFactory"/>
   </contribution>
-  
-  <configuration-point id="UnprotectedAssets">
-    
-    Maps asset path regexp patterns to assets that won't be required
-    to have md5sum digests, making them visible and accessible to unauthenticated
-    url requests. Care should be taken contributing here. Most things should remain
-    protected, like .class files, database configuration files, etc.
-    
-    This configuration is mainly intended to help some resources that require being
-    able to dynamically load content on the browser client-side. One such resource
-    is the http://dojotoolkit.org javascript library, which loads javascript/css/other 
-    resources dynamically via XmlHttpRequests for resources that haven't been previously
-    digested.
-    
-    <schema>
-      <element name="unprotected-resource">
-        <attribute name="contains" required="true" unique="true">
-          The regexp pattern to match against.
-        </attribute>
-      </element>
-    </schema>    
-  </configuration-point>
-  
-  <contribution configuration-id="UnprotectedAssets">
-   List of unprotected asset regexps for ResourceMatcher service.
-   
-   <unprotected-resource contains="org/apache/tapestry/html/dojo/**/*.js" />
-   <unprotected-resource contains="org/apache/tapestry/html/dojo/**/*.css" />
-   <unprotected-resource contains="org/apache/tapestry/html/dojo/**/*.html" />
-   <unprotected-resource contains="org/apache/tapestry/html/dojo/**/*.htm" />
-   <unprotected-resource contains="org/apache/tapestry/html/dojo/**/*.gif" />
-   <unprotected-resource contains="org/apache/tapestry/html/dojo/**/*.jpg" />
-   <unprotected-resource contains="org/apache/tapestry/html/dojo/**/*.svg" />
-   <unprotected-resource contains="org/apache/tapestry/html/dojo/**/*.png" />
-  </contribution>
-  
-  <service-point id="UnprotectedResourceMatcher" interface="ResourceMatcher" >
-    
-    Uses the UnprotectedAssets configuration point to dynamically determine
-    which assets managed by the AssetService should be protected. The default
-    is to protect all resources.
-    
-    <invoke-factory>
-      <construct class="ResourceMatcherImpl">
-        <event-listener service-id="tapestry.ResetEventHub"/>
-        <set-configuration configuration-id="UnprotectedAssets" property="contributions" />
-      </construct>
-    </invoke-factory>
-  </service-point>  
-  
 </module>

Modified: jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.multipart.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.multipart.xml?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.multipart.xml (original)
+++ jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.multipart.xml Sat Mar 11 12:54:27 2006
@@ -19,7 +19,7 @@
   
   Support for multipart/form-data encoded requests used for file uploads.
   
-  <service-point id="MultipartDecoder">
+  <service-point id="ServletMultipartDecoder">
     
     Service responsible for parsing and decoding multipart form submissions. 
     
@@ -27,23 +27,26 @@
     
   </service-point>
   
-  <service-point id="MultipartDecoderFilter" interface="org.apache.tapestry.services.ServletRequestServicerFilter">
+  <service-point id="ServletMultipartDecoderFilter" interface="org.apache.tapestry.services.ServletRequestServicerFilter">
     
     Identifies upload requests and passes them to the MultipartDecoder service
     for decoding.
     
     <invoke-factory>
       <construct class="MultipartDecoderFilter">
-        <set-service property="decoder" service-id="MultipartDecoder"/>
+        <set-service property="decoder" service-id="ServletMultipartDecoder"/>
       </construct>
     </invoke-factory>
     
   </service-point>
   
   <contribution configuration-id="tapestry.request.ServletRequestServicerPipeline">
-    <filter name="MultipartDecoderFilter" 
-      object="service:MultipartDecoderFilter" 
+    <filter name="ServletMultipartDecoderFilter" 
+      object="service:ServletMultipartDecoderFilter" 
       after="tapestry.request.SetupRequestEncoding"/>
   </contribution>
   
+  <contribution configuration-id="tapestry.Infrastructure">
+    <property name="multipartDecoder" object="service:ServletMultipartDecoder"/>
+  </contribution>
 </module>

Modified: jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.services.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.services.xml?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.services.xml (original)
+++ jakarta/tapestry/trunk/framework/src/descriptor/META-INF/tapestry.services.xml Sat Mar 11 12:54:27 2006
@@ -77,8 +77,6 @@
         <set-service property="context" service-id="tapestry.globals.WebContext"/>
         <set-object property="response" value="service:tapestry.globals.WebResponse"/>
         <set-service property="digestSource" service-id="tapestry.asset.ResourceDigestSource"/>
-        <set-service property="unprotectedMatcher" 
-                     service-id="tapestry.asset.UnprotectedResourceMatcher" />
       </construct>
     </invoke-factory>
   </service-point>  

Modified: jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/ImageSubmit.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/ImageSubmit.xml?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/ImageSubmit.xml (original)
+++ jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/ImageSubmit.xml Sat Mar 11 12:54:27 2006
@@ -135,32 +135,31 @@
     </td>
    </tr>    
    
-	<tr>
- 		<td>action</td>
- 		<td>&IActionListener;</td>
+ <tr>
+ 		<td>listener</td>
+ 		<td>
+    &IActionListener;
+    </td>
  		<td>in</td>
  		<td>no</td>
  		<td>&nbsp;</td>
  		<td>
-          A listener that is notified when this component is triggered.
-          The listener notification is delayed until all components enclosed by the Form 
-          have had a chance to update their properties.
+    An optional listener (typically specified as the name of a listener method), notified
+    when the Submit is triggered.
  		</td>
-	</tr>   
+   </tr>   
 	<tr>
- 		<td>listener</td>
+ 		<td>action</td>
  		<td>&IActionListener;</td>
  		<td>in</td>
  		<td>no</td>
  		<td>&nbsp;</td>
  		<td>
-          A listener that is notified when this component is triggered. 
-          The listener is notified immediately when the component is identified as clicked.
-          This behaviour is useful when the component is in a loop, but not all elements
-          enclosed by the Form would have had a chance to update their properties at the
-          time of the listener invocation. Please see the 'action' parameter as an alternative.
+          A listener that is notified if this component is triggered
+          just before the form's listener, after all components 
+          enclosed by the Form have had a chance to update their properties.
  		</td>
-   </tr>   
+	</tr>   
    <tr>
     <td>parameters</td>
     <td>Object</td>

Modified: jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/LinkSubmit.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/LinkSubmit.xml?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/LinkSubmit.xml (original)
+++ jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/LinkSubmit.xml Sat Mar 11 12:54:27 2006
@@ -71,23 +71,10 @@
       </td>
     </tr>
     <tr>
-      <td>action</td>
-      <td>&IActionListener;</td> <td>in</td> <td>no</td> <td>&nbsp;</td>
-      <td>
-          A listener that is notified when this component is triggered.
-          The listener notification is delayed until all components enclosed by the Form 
-          have had a chance to update their properties.
-      </td>
-    </tr>
-    <tr>
       <td>listener</td>
       <td>&IActionListener;</td> <td>in</td> <td>no</td> <td>&nbsp;</td>
       <td>
-          A listener that is notified when this component is triggered. 
-          The listener is notified immediately when the component is identified as clicked.
-          This behaviour is useful when the component is in a loop, but not all elements
-          enclosed by the Form would have had a chance to update their properties at the
-          time of the listener invocation. Please see the 'action' parameter as an alternative.
+          If specified, the listener is notified. This notification occurs as the component is rewinded, i.e., prior to the Form's listener. In addition, the selected property (if bound) will be updated before the listener is notified.
       </td>
     </tr>
 	</table>

Modified: jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Script.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Script.xml?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Script.xml (original)
+++ jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Script.xml Sat Mar 11 12:54:27 2006
@@ -52,14 +52,27 @@
     <th>Description</th>
   </tr>
     <tr>
-      <td>script</td>
+      <td>scriptPath</td>
       <td>String</td>
 
       <td>in</td>
-      <td>yes</td>
+      <td>no</td>
       <td>&nbsp;</td>
       <td>
-        The path of a resource (on the classpath) containing the script.
+        The path of a resource (on the classpath) containing the script. One of either
+        scriptPath or scriptAsset must be specified.
+      </td>
+    </tr>
+    <tr>
+      <td>scriptAsset</td>
+      <td>&IAsset;</td>
+
+      <td>in</td>
+      <td>no</td>
+      <td>&nbsp;</td>
+      <td>
+        A reference to a script as an &IAsset; parameter. One of either
+        scriptPath or scriptAsset must be specified.
       </td>
     </tr>
     <tr>

Modified: jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Submit.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Submit.xml?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Submit.xml (original)
+++ jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Submit.xml Sat Mar 11 12:54:27 2006
@@ -47,11 +47,11 @@
   
 <p>
 It is even possible to combine the two, in which case the property is set first,
-then the listener is notified. The listener may provided via the 'action' parameter and
-it will be notified when all components enclosed by the Form have had a chance 
-to update their properties. Alternatively, the listener can be provided via the 
-'listener' parameter and it will be notified immediately in the middle of processing 
-the form submission.
+then the listener is notified.  The listener may be notified immediately
+(i.e., in the middle of processing the form submission) if provided 
+via the 'listener' parameter, but if it is provided via the 'action' parameter,
+the listener will be notified later, just before the form's listener (if any)
+is invoked.
 </p>
   
 
@@ -120,29 +120,28 @@
    </tr>    
    
 	<tr>
- 		<td>action</td>
- 		<td>&IActionListener;</td>
+ 		<td>listener</td>
+ 		<td>
+    &IActionListener;
+    </td>
  		<td>in</td>
  		<td>no</td>
  		<td>&nbsp;</td>
  		<td>
-          A listener that is notified when this component is triggered.
-          The listener notification is delayed until all components enclosed by the Form 
-          have had a chance to update their properties.
+		An optional listener (typically specified as the name of a listener method), notified
+		when the Submit is triggered.
  		</td>
 	</tr>   
 	<tr>
- 		<td>listener</td>
+ 		<td>action</td>
  		<td>&IActionListener;</td>
  		<td>in</td>
  		<td>no</td>
  		<td>&nbsp;</td>
  		<td>
-          A listener that is notified when this component is triggered. 
-          The listener is notified immediately when the component is identified as clicked.
-          This behaviour is useful when the component is in a loop, but not all elements
-          enclosed by the Form would have had a chance to update their properties at the
-          time of the listener invocation. Please see the 'action' parameter as an alternative.
+          A listener that is notified if this component is triggered
+          just before the form's listener, after all components 
+          enclosed by the Form have had a chance to update their properties.
  		</td>
 	</tr>   
    <tr>

Modified: jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/TextField.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/TextField.xml?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/TextField.xml (original)
+++ jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/TextField.xml Sat Mar 11 12:54:27 2006
@@ -99,9 +99,8 @@
   Reserved parameters: name, type, value
 </p>
 
-<p>
-The TextField component supports all of the validation logic covered in the <link href="../../UsersGuide/validation.html">Users Guide</link>.
-</p>
+<p>A TextField may be decorated by the Form's validation delegate, but does not have a validator, so is limited in editting properties types
+  beyond string.  In most cases, the &ValidField; component is preferred. </p>
 
 </section>
 

Modified: jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Upload.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Upload.xml?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Upload.xml (original)
+++ jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Upload.xml Sat Mar 11 12:54:27 2006
@@ -35,10 +35,9 @@
 </p>
 
 <warning>
-  This component may  only be used in Tapestry Servlet Applications; Upload currently
-  does not work with Portlet Applications.  See
-  <link href="http://issues.apache.org/jira/browse/TAPESTRY-635">TAPESTRY-635</link> for more details.
-
+	There is a bug in the current fileupload 1.1 version which resolves all filenames to lowercase, this may
+	break certain conditions for people if they are doing file name comparisons. This issue has already
+	been fixed in commons-fileupload version 1.2, which should hopefully be released soon.
 </warning>
 
 <section>

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/AbstractComponent.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/AbstractComponent.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/AbstractComponent.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/AbstractComponent.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.
@@ -40,30 +40,17 @@
  * @author Howard Lewis Ship
  */
 
-public abstract class AbstractComponent extends BaseLocatable implements
-        IComponent {
-
-    private static final int MAP_SIZE = 5;
-    private static final int BODY_INIT_SIZE = 5;
-
+public abstract class AbstractComponent extends BaseLocatable implements IComponent
+{
     /**
-     * Used in place of JDK 1.3's Collections.EMPTY_MAP (which is not available
-     * in JDK 1.2).
-     */
-
-    private static final Map EMPTY_MAP = Collections
-            .unmodifiableMap(new HashMap(1));
-
-    /**
-     * The page that contains the component, possibly itself (if the component
-     * is in fact, a page).
+     * The page that contains the component, possibly itself (if the component is in fact, a page).
      */
 
     private IPage _page;
 
     /**
-     * The component which contains the component. This will only be null if the
-     * component is actually a page.
+     * The component which contains the component. This will only be null if the component is
+     * actually a page.
      */
 
     private IComponent _container;
@@ -75,25 +62,34 @@
     private String _id;
 
     /**
-     * The fully qualified id of this component. This is calculated the first
-     * time it is needed, then cached for later.
+     * The fully qualified id of this component. This is calculated the first time it is needed,
+     * then cached for later.
      */
 
     private String _idPath;
 
+    private static final int MAP_SIZE = 5;
+
     /**
-     * A {@link Map}of all bindings (for which there isn't a corresponding
-     * JavaBeans property); the keys are the names of formal and informal
-     * parameters.
+     * A {@link Map}of all bindings (for which there isn't a corresponding JavaBeans property); the
+     * keys are the names of formal and informal parameters.
      */
 
     private Map _bindings;
 
     private Map _components;
 
+    private static final int BODY_INIT_SIZE = 5;
+
     private INamespace _namespace;
 
     /**
+     * Used in place of JDK 1.3's Collections.EMPTY_MAP (which is not available in JDK 1.2).
+     */
+
+    private static final Map EMPTY_MAP = Collections.unmodifiableMap(new HashMap(1));
+
+    /**
      * The number of {@link IRender}objects in the body of this component.
      */
 
@@ -112,8 +108,8 @@
     private Map _assets;
 
     /**
-     * A mapping that allows public instance methods to be dressed up as
-     * {@link IActionListener} listener objects.
+     * A mapping that allows public instance methods to be dressed up as {@link IActionListener}
+     * listener objects.
      * 
      * @since 1.0.2
      */
@@ -155,7 +151,8 @@
 
         checkActiveLock();
 
-        if (_assets == null) _assets = new HashMap(MAP_SIZE);
+        if (_assets == null)
+            _assets = new HashMap(MAP_SIZE);
 
         _assets.put(name, asset);
     }
@@ -166,15 +163,15 @@
 
         checkActiveLock();
 
-        if (_components == null) _components = new HashMap(MAP_SIZE);
+        if (_components == null)
+            _components = new HashMap(MAP_SIZE);
 
         _components.put(component.getId(), component);
     }
 
     /**
-     * Adds an element (which may be static text or a component) as a body
-     * element of this component. Such elements are rendered by
-     * {@link #renderBody(IMarkupWriter, IRequestCycle)}.
+     * Adds an element (which may be static text or a component) as a body element of this
+     * component. Such elements are rendered by {@link #renderBody(IMarkupWriter, IRequestCycle)}.
      * 
      * @since 2.2
      */
@@ -183,8 +180,7 @@
     {
         Defense.notNull(element, "element");
 
-        // TODO: Tweak the ordering of operations inside the PageLoader so that
-        // this
+        // TODO: Tweak the ordering of operations inside the PageLoader so that this
         // check is allowable. Currently, the component is entering active state
         // before it loads its template.
 
@@ -194,7 +190,8 @@
         // allows body. Curently, this is checked by the component
         // in render(), which is silly.
 
-        if (_body == null) {
+        if (_body == null)
+        {
             _body = new IRender[BODY_INIT_SIZE];
             _body[0] = element;
 
@@ -204,7 +201,8 @@
 
         // No more room? Make the array bigger.
 
-        if (_bodyCount == _body.length) {
+        if (_bodyCount == _body.length)
+        {
             IRender[] newWrapped;
 
             newWrapped = new IRender[_body.length * 2];
@@ -218,9 +216,8 @@
     }
 
     /**
-     * Invokes {@link #finishLoad()}. Subclasses may overide as needed, but
-     * must invoke this implementation. {@link BaseComponent} loads its HTML
-     * template.
+     * Invokes {@link #finishLoad()}. Subclasses may overide as needed, but must invoke this
+     * implementation. {@link BaseComponent} loads its HTML template.
      */
 
     public void finishLoad(IRequestCycle cycle, IPageLoader loader,
@@ -230,61 +227,63 @@
     }
 
     /**
-     * Converts informal parameters into additional attributes on the curently
-     * open tag.
+     * Converts informal parameters into additional attributes on the curently open tag.
      * <p>
-     * Invoked from subclasses to allow additional attributes to be specified
-     * within a tag (this works best when there is a one-to-one corespondence
-     * between an {@link IComponent}and a HTML element.
+     * Invoked from subclasses to allow additional attributes to be specified within a tag (this
+     * works best when there is a one-to-one corespondence between an {@link IComponent}and a HTML
+     * element.
      * <p>
-     * Iterates through the bindings for this component. Filters out bindings
-     * for formal parameters.
+     * Iterates through the bindings for this component. Filters out bindings for formal parameters.
      * <p>
-     * For each acceptible key, the value is extracted using
-     * {@link IBinding#getObject()}. If the value is null, no attribute is
-     * written.
+     * For each acceptible key, the value is extracted using {@link IBinding#getObject()}. If the
+     * value is null, no attribute is written.
      * <p>
-     * If the value is an instance of {@link IAsset}, then
-     * {@link IAsset#buildURL()} is invoked to convert the asset to a URL.
+     * If the value is an instance of {@link IAsset}, then {@link IAsset#buildURL()}
+     * is invoked to convert the asset to a URL.
      * <p>
-     * Finally, {@link IMarkupWriter#attribute(String,String)}is invoked with
-     * the value (or the URL).
+     * Finally, {@link IMarkupWriter#attribute(String,String)}is invoked with the value (or the
+     * URL).
      * <p>
-     * The most common use for informal parameters is to support the HTML class
-     * attribute (for use with cascading style sheets) and to specify JavaScript
-     * event handlers.
+     * The most common use for informal parameters is to support the HTML class attribute (for use
+     * with cascading style sheets) and to specify JavaScript event handlers.
      * <p>
-     * Components are only required to generate attributes on the result phase;
-     * this can be skipped during the rewind phase.
+     * Components are only required to generate attributes on the result phase; this can be skipped
+     * during the rewind phase.
      */
 
-    protected void renderInformalParameters(IMarkupWriter writer,
-            IRequestCycle cycle)
+    protected void renderInformalParameters(IMarkupWriter writer, IRequestCycle cycle)
     {
         String attribute;
 
-        if (_bindings == null) return;
+        if (_bindings == null)
+            return;
 
         Iterator i = _bindings.entrySet().iterator();
 
-        while(i.hasNext()) {
-            Map.Entry entry = (Map.Entry)i.next();
-            String name = (String)entry.getKey();
+        while (i.hasNext())
+        {
+            Map.Entry entry = (Map.Entry) i.next();
+            String name = (String) entry.getKey();
 
-            if (isFormalParameter(name)) continue;
+            if (isFormalParameter(name))
+                continue;
 
-            IBinding binding = (IBinding)entry.getValue();
+            IBinding binding = (IBinding) entry.getValue();
 
             Object value = binding.getObject();
-            if (value == null) continue;
+            if (value == null)
+                continue;
 
-            if (value instanceof IAsset) {
-                IAsset asset = (IAsset)value;
+            if (value instanceof IAsset)
+            {
+                IAsset asset = (IAsset) value;
 
                 // Get the URL of the asset and insert that.
 
                 attribute = asset.buildURL();
-            } else attribute = value.toString();
+            }
+            else
+                attribute = value.toString();
 
             writer.attribute(name, attribute);
         }
@@ -302,10 +301,9 @@
     /**
      * Returns the named binding, or null if it doesn't exist.
      * <p>
-     * In Tapestry 3.0, it was possible to force a binding to be stored in a
-     * component property by defining a concrete or abstract property named
-     * "nameBinding" of type {@link IBinding}. This has been removed in release
-     * 4.0 and bindings are always stored inside a Map of the component.
+     * In Tapestry 3.0, it was possible to force a binding to be stored in a component property by
+     * defining a concrete or abstract property named "nameBinding" of type {@link IBinding}. This
+     * has been removed in release 4.0 and bindings are always stored inside a Map of the component.
      * 
      * @see #setBinding(String,IBinding)
      */
@@ -314,9 +312,10 @@
     {
         Defense.notNull(name, "name");
 
-        if (_bindings == null) return null;
+        if (_bindings == null)
+            return null;
 
-        return (IBinding)_bindings.get(name);
+        return (IBinding) _bindings.get(name);
     }
 
     /**
@@ -338,11 +337,12 @@
 
         IComponent result = null;
 
-        if (_components != null) result = (IComponent)_components.get(id);
+        if (_components != null)
+            result = (IComponent) _components.get(id);
 
         if (result == null)
-            throw new ApplicationRuntimeException(Tapestry.format(
-                    "no-such-component", this, id), this, null, null);
+            throw new ApplicationRuntimeException(Tapestry.format("no-such-component", this, id),
+                    this, null, null);
 
         return result;
     }
@@ -357,24 +357,23 @@
         checkActiveLock();
 
         if (_container != null)
-            throw new ApplicationRuntimeException(
-                    Tapestry
-                            .getMessage("AbstractComponent.attempt-to-change-container"));
+            throw new ApplicationRuntimeException(Tapestry
+                    .getMessage("AbstractComponent.attempt-to-change-container"));
 
         _container = value;
     }
 
     /**
-     * Returns the name of the page, a slash, and this component's id path.
-     * Pages are different, they override this method to simply return their
-     * page name.
+     * Returns the name of the page, a slash, and this component's id path. Pages are different,
+     * they override this method to simply return their page name.
      * 
      * @see #getIdPath()
      */
 
     public String getExtendedId()
     {
-        if (_page == null) return null;
+        if (_page == null)
+            return null;
 
         return _page.getPageName() + "/" + getIdPath();
     }
@@ -387,9 +386,8 @@
     public void setId(String value)
     {
         if (_id != null)
-            throw new ApplicationRuntimeException(
-                    Tapestry
-                            .getMessage("AbstractComponent.attempt-to-change-component-id"));
+            throw new ApplicationRuntimeException(Tapestry
+                    .getMessage("AbstractComponent.attempt-to-change-component-id"));
 
         _id = value;
     }
@@ -399,13 +397,15 @@
         String containerIdPath;
 
         if (_container == null)
-            throw new NullPointerException(Tapestry.format(
-                    "AbstractComponent.null-container", this));
+            throw new NullPointerException(Tapestry
+                    .format("AbstractComponent.null-container", this));
 
         containerIdPath = _container.getIdPath();
 
-        if (containerIdPath == null) _idPath = _id;
-        else _idPath = containerIdPath + "." + _id;
+        if (containerIdPath == null)
+            _idPath = _id;
+        else
+            _idPath = containerIdPath + "." + _id;
 
         return _idPath;
     }
@@ -430,13 +430,12 @@
 
     public void renderBody(IMarkupWriter writer, IRequestCycle cycle)
     {
-        for(int i = 0; i < _bodyCount; i++)
+        for (int i = 0; i < _bodyCount; i++)
             _body[i].render(writer, cycle);
     }
 
     /**
-     * Adds the binding with the given name, replacing any existing binding with
-     * that name.
+     * Adds the binding with the given name, replacing any existing binding with that name.
      * <p>
      * 
      * @see #getBinding(String)
@@ -447,7 +446,8 @@
         Defense.notNull(name, "name");
         Defense.notNull(binding, "binding");
 
-        if (_bindings == null) _bindings = new HashMap(MAP_SIZE);
+        if (_bindings == null)
+            _bindings = new HashMap(MAP_SIZE);
 
         _bindings.put(name, binding);
     }
@@ -468,14 +468,14 @@
     }
 
     /**
-     * Returns an unmodifiable {@link Map}of components, keyed on component id.
-     * Never returns null, but may return an empty map. The returned map is
-     * immutable.
+     * Returns an unmodifiable {@link Map}of components, keyed on component id. Never returns null,
+     * but may return an empty map. The returned map is immutable.
      */
 
     public Map getComponents()
     {
-        if (_components == null) return EMPTY_MAP;
+        if (_components == null)
+            return EMPTY_MAP;
 
         return Collections.unmodifiableMap(_components);
 
@@ -483,29 +483,33 @@
 
     public Map getAssets()
     {
-        if (_assets == null) return EMPTY_MAP;
+        if (_assets == null)
+            return EMPTY_MAP;
 
         return Collections.unmodifiableMap(_assets);
     }
 
     public IAsset getAsset(String name)
     {
-        if (_assets == null) return null;
+        if (_assets == null)
+            return null;
 
-        return (IAsset)_assets.get(name);
+        return (IAsset) _assets.get(name);
     }
 
     public Collection getBindingNames()
     {
         // If no conainer, i.e. a page, then no bindings.
 
-        if (_container == null) return null;
+        if (_container == null)
+            return null;
 
         HashSet result = new HashSet();
 
         // All the informal bindings go into the bindings Map.
 
-        if (_bindings != null) result.addAll(_bindings.keySet());
+        if (_bindings != null)
+            result.addAll(_bindings.keySet());
 
         // Now, iterate over the formal parameters and add the formal parameters
         // that have a binding.
@@ -514,12 +518,15 @@
 
         int count = names.size();
 
-        for(int i = 0; i < count; i++) {
-            String name = (String)names.get(i);
+        for (int i = 0; i < count; i++)
+        {
+            String name = (String) names.get(i);
 
-            if (result.contains(name)) continue;
+            if (result.contains(name))
+                continue;
 
-            if (getBinding(name) != null) result.add(name);
+            if (getBinding(name) != null)
+                result.add(name);
         }
 
         return result;
@@ -533,16 +540,16 @@
 
     public Map getBindings()
     {
-        if (_bindings == null) return Collections.EMPTY_MAP;
+        if (_bindings == null)
+            return Collections.EMPTY_MAP;
 
         return Collections.unmodifiableMap(_bindings);
     }
 
     /**
-     * Returns a {@link ListenerMap}&nbsp;for the component. A ListenerMap
-     * contains a number of synthetic read-only properties that implement the
-     * {@link IActionListener}interface, but in fact, cause public instance
-     * methods to be invoked.
+     * Returns a {@link ListenerMap}&nbsp;for the component. A ListenerMap contains a number of
+     * synthetic read-only properties that implement the {@link IActionListener}interface, but in
+     * fact, cause public instance methods to be invoked.
      * 
      * @since 1.0.2
      */
@@ -550,36 +557,35 @@
     public ListenerMap getListeners()
     {
         // This is what's called a violation of the Law of Demeter!
-        // This should probably be converted over to some kind of injection, as
-        // with
+        // This should probably be converted over to some kind of injection, as with
         // getMessages(), etc.
 
         if (_listeners == null)
-            _listeners = getPage().getEngine().getInfrastructure()
-                    .getListenerMapSource().getListenerMapForObject(this);
+            _listeners = getPage().getEngine().getInfrastructure().getListenerMapSource()
+                    .getListenerMapForObject(this);
 
         return _listeners;
     }
 
     /**
-     * Returns the {@link IBeanProvider}for this component. This is lazily
-     * created the first time it is needed.
+     * Returns the {@link IBeanProvider}for this component. This is lazily created the first time
+     * it is needed.
      * 
      * @since 1.0.4
      */
 
     public IBeanProvider getBeans()
     {
-        if (_beans == null) _beans = new BeanProvider(this);
+        if (_beans == null)
+            _beans = new BeanProvider(this);
 
         return _beans;
     }
 
     /**
      * Invoked, as a convienience, from
-     * {@link #finishLoad(IRequestCycle, IPageLoader, IComponentSpecification)}.
-     * This implemenation does nothing. Subclasses may override without invoking
-     * this implementation.
+     * {@link #finishLoad(IRequestCycle, IPageLoader, IComponentSpecification)}. This implemenation
+     * does nothing. Subclasses may override without invoking this implementation.
      * 
      * @since 1.0.5
      */
@@ -592,8 +598,7 @@
      * The main method used to render the component. Invokes
      * {@link #prepareForRender(IRequestCycle)}, then
      * {@link #renderComponent(IMarkupWriter, IRequestCycle)}.
-     * {@link #cleanupAfterRender(IRequestCycle)}is invoked in a
-     * <code>finally</code> block.
+     * {@link #cleanupAfterRender(IRequestCycle)}is invoked in a <code>finally</code> block.
      * <p>
      * Subclasses should not override this method; instead they will implement
      * {@link #renderComponent(IMarkupWriter, IRequestCycle)}.
@@ -603,13 +608,16 @@
 
     public final void render(IMarkupWriter writer, IRequestCycle cycle)
     {
-        try {
+        try
+        {
             _rendering = true;
 
             prepareForRender(cycle);
 
             renderComponent(writer, cycle);
-        } finally {
+        }
+        finally
+        {
             _rendering = false;
 
             cleanupAfterRender(cycle);
@@ -617,9 +625,9 @@
     }
 
     /**
-     * Invoked by {@link #render(IMarkupWriter, IRequestCycle)}to prepare the
-     * component to render. This implementation sets JavaBeans properties from
-     * matching bound parameters. This implementation does nothing.
+     * Invoked by {@link #render(IMarkupWriter, IRequestCycle)}to prepare the component to render.
+     * This implementation sets JavaBeans properties from matching bound parameters. This
+     * implementation does nothing.
      * 
      * @since 2.0.3
      */
@@ -629,19 +637,17 @@
     }
 
     /**
-     * Invoked by {@link #render(IMarkupWriter, IRequestCycle)}to actually
-     * render the component (with any parameter values already set). This is the
-     * method that subclasses must implement.
+     * Invoked by {@link #render(IMarkupWriter, IRequestCycle)}to actually render the component
+     * (with any parameter values already set). This is the method that subclasses must implement.
      * 
      * @since 2.0.3
      */
 
-    protected abstract void renderComponent(IMarkupWriter writer,
-            IRequestCycle cycle);
+    protected abstract void renderComponent(IMarkupWriter writer, IRequestCycle cycle);
 
     /**
-     * Invoked by {@link #render(IMarkupWriter, IRequestCycle)}after the
-     * component renders. This implementation does nothing.
+     * Invoked by {@link #render(IMarkupWriter, IRequestCycle)}after the component renders. This
+     * implementation does nothing.
      * 
      * @since 2.0.3
      */
@@ -661,9 +667,9 @@
     }
 
     /**
-     * Returns the body of the component, the element (which may be static HTML
-     * or components) that the component immediately wraps. May return null. Do
-     * not modify the returned array. The array may be padded with nulls.
+     * Returns the body of the component, the element (which may be static HTML or components) that
+     * the component immediately wraps. May return null. Do not modify the returned array. The array
+     * may be padded with nulls.
      * 
      * @since 2.3
      * @see #getBodyCount()
@@ -688,11 +694,9 @@
 
     /**
      * Empty implementation of
-     * {@link org.apache.tapestry.event.PageRenderListener#pageEndRender(PageEvent)}.
-     * This allows classes to implement
-     * {@link org.apache.tapestry.event.PageRenderListener}and only implement
-     * the
-     * {@link org.apache.tapestry.event.PageRenderListener#pageBeginRender(PageEvent)}method.
+     * {@link org.apache.tapestry.event.PageRenderListener#pageEndRender(PageEvent)}. This allows
+     * classes to implement {@link org.apache.tapestry.event.PageRenderListener}and only implement
+     * the {@link org.apache.tapestry.event.PageRenderListener#pageBeginRender(PageEvent)}method.
      * 
      * @since 3.0
      */
@@ -735,8 +739,8 @@
     }
 
     /**
-     * Returns true if the component has been transitioned into its active state
-     * by invoking {@link #enterActiveState()}.
+     * Returns true if the component has been transitioned into its active state by invoking
+     * {@link #enterActiveState()}
      * 
      * @since 4.0
      */
@@ -757,20 +761,17 @@
     protected final void checkActiveLock()
     {
         if (_active)
-            throw new UnsupportedOperationException(TapestryMessages
-                    .componentIsLocked(this));
+            throw new UnsupportedOperationException(TapestryMessages.componentIsLocked(this));
     }
 
     public Messages getMessages()
     {
-        throw new IllegalStateException(TapestryMessages
-                .providedByEnhancement("getMessages"));
+        throw new IllegalStateException(TapestryMessages.providedByEnhancement("getMessages"));
     }
 
     public IComponentSpecification getSpecification()
     {
-        throw new IllegalStateException(TapestryMessages
-                .providedByEnhancement("getSpecification"));
+        throw new IllegalStateException(TapestryMessages.providedByEnhancement("getSpecification"));
     }
 
     /**
@@ -803,8 +804,7 @@
     }
 
     /**
-     * Convienience method for invoking
-     * {@link IMessages#format(String, Locale, Object)}.
+     * Convienience method for invoking {@link IMessages#format(String, Locale, Object)}
      * 
      * @since 3.0
      * @deprecated To be removed in 4.1. Use {@link #getMessages()} instead.
@@ -816,8 +816,7 @@
     }
 
     /**
-     * Convienience method for invoking
-     * {@link Messages#format(String, Object, Object)}.
+     * Convienience method for invoking {@link Messages#format(String, Object, Object)}.
      * 
      * @since 3.0
      * @deprecated To be removed in 4.1. Use {@link #getMessages()} instead.
@@ -829,15 +828,13 @@
     }
 
     /**
-     * Convienience method for
-     * {@link Messages#format(String, Object, Object, Object)}.
+     * Convienience method for {@link Messages#format(String, Object, Object, Object)}.
      * 
      * @since 3.0
      * @deprecated To be removed in 4.1. Use {@link #getMessages()} instead.
      */
 
-    public String format(String key, Object argument1, Object argument2,
-            Object argument3)
+    public String format(String key, Object argument1, Object argument2, Object argument3)
     {
         return getMessages().format(key, argument1, argument2, argument3);
     }
@@ -849,8 +846,7 @@
     }
 
     /** @since 4.0 */
-    public final void setContainedComponent(
-            IContainedComponent containedComponent)
+    public final void setContainedComponent(IContainedComponent containedComponent)
     {
         Defense.notNull(containedComponent, "containedComponent");
 
@@ -861,4 +857,4 @@
         _containedComponent = containedComponent;
     }
 
-}
+}
\ No newline at end of file

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/AbstractPage.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/AbstractPage.java?rev=385164&r1=385163&r2=385164&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/AbstractPage.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/AbstractPage.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,11 +23,11 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.hivemind.ApplicationRuntimeException;
 import org.apache.tapestry.event.ChangeObserver;
-import org.apache.tapestry.event.PageAttachListener;
 import org.apache.tapestry.event.PageBeginRenderListener;
 import org.apache.tapestry.event.PageDetachListener;
 import org.apache.tapestry.event.PageEndRenderListener;
 import org.apache.tapestry.event.PageEvent;
+import org.apache.tapestry.event.PageAttachListener;
 import org.apache.tapestry.event.PageRenderListener;
 import org.apache.tapestry.event.PageValidateListener;
 import org.apache.tapestry.util.StringSplitter;
@@ -39,14 +39,13 @@
  * @since 0.2.9
  */
 
-public abstract class AbstractPage extends BaseComponent implements IPage {
-
+public abstract class AbstractPage extends BaseComponent implements IPage
+{
     private static final Log LOG = LogFactory.getLog(AbstractPage.class);
 
     /**
-     * Object to be notified when a observered property changes. Observered
-     * properties are the ones that will be persisted between request cycles.
-     * Unobserved properties are reconstructed.
+     * Object to be notified when a observered property changes. Observered properties are the ones
+     * that will be persisted between request cycles. Unobserved properties are reconstructed.
      */
 
     private ChangeObserver _changeObserver;
@@ -58,8 +57,8 @@
     private IEngine _engine;
 
     /**
-     * The visit object, if any, for the application. Set inside
-     * {@link #attach(IEngine)}and cleared by {@link #detach()}.
+     * The visit object, if any, for the application. Set inside {@link #attach(IEngine)}and
+     * cleared by {@link #detach()}.
      */
 
     private Object _visit;
@@ -79,8 +78,7 @@
     private IRequestCycle _requestCycle;
 
     /**
-     * The locale of the page, initially determined from the
-     * {@link IEngine engine}.
+     * The locale of the page, initially determined from the {@link IEngine engine}.
      */
 
     private Locale _locale;
@@ -97,16 +95,16 @@
     private EventListenerList _listenerList;
 
     /**
-     * The output encoding to be used when rendering this page. This value is
-     * cached from the engine.
+     * The output encoding to be used when rendering this page. This value is cached from the
+     * engine.
      * 
      * @since 3.0
      */
     private String _outputEncoding;
 
     /**
-     * Standard constructor; invokes {@link #initialize()}to configure initial
-     * values for properties of the page.
+     * Standard constructor; invokes {@link #initialize()}to configure initial values for
+     * properties of the page.
      * 
      * @since 2.2
      */
@@ -120,14 +118,12 @@
      * Prepares the page to be returned to the pool.
      * <ul>
      * <li>Clears the changeObserved property
-     * <li>Invokes {@link PageDetachListener#pageDetached(PageEvent)}on all
-     * listeners
+     * <li>Invokes {@link PageDetachListener#pageDetached(PageEvent)}on all listeners
      * <li>Invokes {@link #initialize()}to clear/reset any properties
      * <li>Clears the engine, visit and requestCycle properties
      * </ul>
      * <p>
-     * Subclasses may override this method, but must invoke this implementation
-     * (usually, last).
+     * Subclasses may override this method, but must invoke this implementation (usually, last).
      * 
      * @see PageDetachListener
      */
@@ -151,9 +147,8 @@
     }
 
     /**
-     * Method invoked from the constructor, and from {@link #detach()}to
-     * (re-)initialize properties of the page. This is most useful when
-     * properties have non-null initial values.
+     * Method invoked from the constructor, and from {@link #detach()}to (re-)initialize properties
+     * of the page. This is most useful when properties have non-null initial values.
      * <p>
      * Subclasses may override this implementation (which is empty).
      * 
@@ -197,8 +192,8 @@
     }
 
     /**
-     * Returns the locale for the page, which may be null if the locale is not
-     * known (null corresponds to the "default locale").
+     * Returns the locale for the page, which may be null if the locale is not known (null
+     * corresponds to the "default locale").
      */
 
     public Locale getLocale()
@@ -222,13 +217,15 @@
         String[] elements;
         int i;
 
-        if (path == null) return this;
+        if (path == null)
+            return this;
 
         splitter = new StringSplitter('.');
         current = this;
 
         elements = splitter.splitToArray(path);
-        for(i = 0; i < elements.length; i++) {
+        for (i = 0; i < elements.length; i++)
+        {
             current = current.getComponent(elements[i]);
         }
 
@@ -237,18 +234,16 @@
     }
 
     /**
-     * Called by the {@link IEngine engine}to attach the page to itself. Does
-     * <em>not</em> change the locale, but since a page is selected from the
-     * {@link org.apache.tapestry.engine.IPageSource}pool based on its locale
-     * matching the engine's locale, they should match anyway.
+     * Called by the {@link IEngine engine}to attach the page to itself. Does <em>not</em> change
+     * the locale, but since a page is selected from the
+     * {@link org.apache.tapestry.engine.IPageSource}pool based on its locale matching the engine's
+     * locale, they should match anyway.
      */
 
     public void attach(IEngine engine, IRequestCycle cycle)
     {
         if (_engine != null)
-            LOG
-                    .error(this + " attach(" + engine + "), but engine = "
-                            + _engine);
+            LOG.error(this + " attach(" + engine + "), but engine = " + _engine);
 
         _engine = engine;
         _requestCycle = cycle;
@@ -257,28 +252,30 @@
     }
 
     /**
-     * Renders the page, following a series of steps.
      * <ul>
      * <li>Invokes {@link PageBeginRenderListener#pageBeginRender(PageEvent)}
      * <li>Invokes {@link #beginResponse(IMarkupWriter, IRequestCycle)}
      * <li>Invokes {@link IRequestCycle#commitPageChanges()}(if not rewinding)
      * <li>Invokes {@link #render(IMarkupWriter, IRequestCycle)}
-     * <li>Invokes {@link PageEndRenderListener#pageEndRender(PageEvent)}(this
-     * occurs even if a previous step throws an exception)
-     * </ul>
+     * <li>Invokes {@link PageEndRenderListener#pageEndRender(PageEvent)}(this occurs even if a
+     * previous step throws an exception)
      */
 
     public void renderPage(IMarkupWriter writer, IRequestCycle cycle)
     {
-        try {
+        try
+        {
             firePageBeginRender();
 
             beginResponse(writer, cycle);
 
-            if (!cycle.isRewinding()) cycle.commitPageChanges();
+            if (!cycle.isRewinding())
+                cycle.commitPageChanges();
 
             render(writer, cycle);
-        } finally {
+        }
+        finally
+        {
             firePageEndRender();
         }
     }
@@ -326,15 +323,15 @@
     }
 
     /**
-     * Returns the visit object obtained from the engine via
-     * {@link IEngine#getVisit(IRequestCycle)}.
+     * Returns the visit object obtained from the engine via {@link IEngine#getVisit(IRequestCycle)}.
      * 
      * @deprecated
      */
 
     public Object getVisit()
     {
-        if (_visit == null) _visit = _engine.getVisit(_requestCycle);
+        if (_visit == null)
+            _visit = _engine.getVisit(_requestCycle);
 
         return _visit;
     }
@@ -358,7 +355,8 @@
 
     private void addListener(Class listenerClass, EventListener listener)
     {
-        if (_listenerList == null) _listenerList = new EventListenerList();
+        if (_listenerList == null)
+            _listenerList = new EventListenerList();
 
         _listenerList.add(listenerClass, listener);
     }
@@ -408,18 +406,22 @@
      * @since 4.0
      */
 
-    protected void firePageAttached()
+    public void firePageAttached()
     {
-        if (_listenerList == null) return;
+        if (_listenerList == null)
+            return;
 
         PageEvent event = null;
         Object[] listeners = _listenerList.getListenerList();
 
-        for(int i = 0; i < listeners.length; i += 2) {
-            if (listeners[i] == PageAttachListener.class) {
-                PageAttachListener l = (PageAttachListener)listeners[i + 1];
+        for (int i = 0; i < listeners.length; i += 2)
+        {
+            if (listeners[i] == PageAttachListener.class)
+            {
+                PageAttachListener l = (PageAttachListener) listeners[i + 1];
 
-                if (event == null) event = new PageEvent(this, _requestCycle);
+                if (event == null)
+                    event = new PageEvent(this, _requestCycle);
 
                 l.pageAttached(event);
             }
@@ -432,16 +434,20 @@
 
     protected void firePageDetached()
     {
-        if (_listenerList == null) return;
+        if (_listenerList == null)
+            return;
 
         PageEvent event = null;
         Object[] listeners = _listenerList.getListenerList();
 
-        for(int i = 0; i < listeners.length; i += 2) {
-            if (listeners[i] == PageDetachListener.class) {
-                PageDetachListener l = (PageDetachListener)listeners[i + 1];
+        for (int i = 0; i < listeners.length; i += 2)
+        {
+            if (listeners[i] == PageDetachListener.class)
+            {
+                PageDetachListener l = (PageDetachListener) listeners[i + 1];
 
-                if (event == null) event = new PageEvent(this, _requestCycle);
+                if (event == null)
+                    event = new PageEvent(this, _requestCycle);
 
                 l.pageDetached(event);
             }
@@ -454,16 +460,20 @@
 
     protected void firePageBeginRender()
     {
-        if (_listenerList == null) return;
+        if (_listenerList == null)
+            return;
 
         PageEvent event = null;
         Object[] listeners = _listenerList.getListenerList();
 
-        for(int i = 0; i < listeners.length; i += 2) {
-            if (listeners[i] == PageBeginRenderListener.class) {
-                PageBeginRenderListener l = (PageBeginRenderListener)listeners[i + 1];
+        for (int i = 0; i < listeners.length; i += 2)
+        {
+            if (listeners[i] == PageBeginRenderListener.class)
+            {
+                PageBeginRenderListener l = (PageBeginRenderListener) listeners[i + 1];
 
-                if (event == null) event = new PageEvent(this, _requestCycle);
+                if (event == null)
+                    event = new PageEvent(this, _requestCycle);
 
                 l.pageBeginRender(event);
             }
@@ -476,16 +486,20 @@
 
     protected void firePageEndRender()
     {
-        if (_listenerList == null) return;
+        if (_listenerList == null)
+            return;
 
         PageEvent event = null;
         Object[] listeners = _listenerList.getListenerList();
 
-        for(int i = 0; i < listeners.length; i += 2) {
-            if (listeners[i] == PageEndRenderListener.class) {
-                PageEndRenderListener l = (PageEndRenderListener)listeners[i + 1];
+        for (int i = 0; i < listeners.length; i += 2)
+        {
+            if (listeners[i] == PageEndRenderListener.class)
+            {
+                PageEndRenderListener l = (PageEndRenderListener) listeners[i + 1];
 
-                if (event == null) event = new PageEvent(this, _requestCycle);
+                if (event == null)
+                    event = new PageEvent(this, _requestCycle);
 
                 l.pageEndRender(event);
             }
@@ -553,16 +567,20 @@
 
     protected void firePageValidate()
     {
-        if (_listenerList == null) return;
+        if (_listenerList == null)
+            return;
 
         PageEvent event = null;
         Object[] listeners = _listenerList.getListenerList();
 
-        for(int i = 0; i < listeners.length; i += 2) {
-            if (listeners[i] == PageValidateListener.class) {
-                PageValidateListener l = (PageValidateListener)listeners[i + 1];
+        for (int i = 0; i < listeners.length; i += 2)
+        {
+            if (listeners[i] == PageValidateListener.class)
+            {
+                PageValidateListener l = (PageValidateListener) listeners[i + 1];
 
-                if (event == null) event = new PageEvent(this, _requestCycle);
+                if (event == null)
+                    event = new PageEvent(this, _requestCycle);
 
                 l.pageValidate(event);
             }
@@ -570,8 +588,8 @@
     }
 
     /**
-     * Returns the output encoding to be used when rendering this page. This
-     * value is usually cached from the Engine.
+     * Returns the output encoding to be used when rendering this page. This value is usually cached
+     * from the Engine.
      * 
      * @since 3.0
      */
@@ -582,4 +600,4 @@
 
         return _outputEncoding;
     }
-}
+}
\ No newline at end of file



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