tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r265748 [1/2] - in /jakarta/tapestry/trunk: ./ contrib/ contrib/src/java/org/apache/tapestry/contrib/ contrib/src/java/org/apache/tapestry/contrib/ajax/ contrib/src/java/org/apache/tapestry/contrib/components/ contrib/src/java/org/apache/ta...
Date Thu, 01 Sep 2005 16:05:02 GMT
Author: hlship
Date: Thu Sep  1 09:04:32 2005
New Revision: 265748

URL: http://svn.apache.org/viewcvs?rev=265748&view=rev
Log:
TAPESTRY-386: Big overhaul of the Tapestry Inspector

Added:
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/components/DumpObject.java
    jakarta/tapestry/trunk/contrib/src/test/org/
    jakarta/tapestry/trunk/contrib/src/test/org/apache/
    jakarta/tapestry/trunk/contrib/src/test/org/apache/tapestry/
    jakarta/tapestry/trunk/contrib/src/test/org/apache/tapestry/contrib/
    jakarta/tapestry/trunk/contrib/src/test/org/apache/tapestry/contrib/components/
    jakarta/tapestry/trunk/contrib/src/test/org/apache/tapestry/contrib/components/Normal.txt
    jakarta/tapestry/trunk/contrib/src/test/org/apache/tapestry/contrib/components/TestDumpObject.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/BaseComponentTestCase.java
      - copied, changed from r265533, jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/BaseComponentTestCase.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/util/io/
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/util/io/Basic.txt
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/util/io/NoAscii.txt
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/util/io/NoOffset.txt
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/util/io/Options.txt
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/util/io/TestBinaryDumpOutputStream.java
Removed:
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Reset_Np1_disabled.gif
    jakarta/tapestry/trunk/contrib/src/test/README
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/BaseComponentTestCase.java
Modified:
    jakarta/tapestry/trunk/contrib/build.xml
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/Contrib.library
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/IXTile.java
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.java
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.properties
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/XTile.java
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/XTileService.java
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/CheckboxGroup.java
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/ControlCheckbox.java
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/ControlledCheckbox.java
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Inspector.css
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Inspector.library
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Selector.jwc
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowDescription.html
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowDescription.jwc
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.html
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.java
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.jwc
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowProperties.java
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowProperties.jwc
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.html
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.java
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.jwc
    jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/valid/ValidatingTextField.jwc
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/AbstractComponent.java
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/IComponent.java
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/TapestryMessages.java
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/TapestryStrings2.properties
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/pageload/PageLoader.java
    jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/util/io/BinaryDumpOutputStream.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/TestAbstractComponent.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/callback/TestDirectCallback.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/callback/TestExternalCallback.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/callback/TestPageCallback.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestAny.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestBlock.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestConditional.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestIfElse.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestInsert.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestInvokeListener.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestRenderBlock.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/BaseFormComponentTest.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/MockForm.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/TestButton.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/TestForm.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/TestFormComponentContributorContext.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/TestLinkSubmit.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/TestTranslatedFieldSupportImpl.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/TestValidatableFieldSupportImpl.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/form/validator/BaseValidatorTestCase.java
    jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/html/TestInsertText.java
    jakarta/tapestry/trunk/status.xml

Modified: jakarta/tapestry/trunk/contrib/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/build.xml?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/build.xml (original)
+++ jakarta/tapestry/trunk/contrib/build.xml Thu Sep  1 09:04:32 2005
@@ -42,6 +42,12 @@
     <ibiblio-dependency artifact="oro"                version="${oro.version}"      group="oro"/>
 	<ibiblio-dependency artifact="servletapi"         version="${servlet.version}"  group="servletapi"/>
     
+    <ibiblio-dependency artifact="easymock"           version="1.1"                 group="easymock" use="test"/>
+    <ibiblio-dependency artifact="easymockclassextension" version="1.1"             group="easymock" use="test"/>
+    <ibiblio-dependency artifact="cglib-full"         version="2.0.2"               group="cglib"    use="test"/>
+	<ibiblio-dependency artifact="log4j"              version="${log4j.version}"    group="log4j"    use="test"/>
+    <ibiblio-dependency artifact="javassist"          version="${javassist.version}" group="javassist" use="test"/>
+		
     <!--
     <ibiblio-dependency artifact="bsf"                version="2.3.0"               group="bsf"/>
 		<ibiblio-dependency artifact="commons-fileupload" version="1.0"                 group="commons-fileupload"/>    

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/Contrib.library
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/Contrib.library?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/Contrib.library (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/Contrib.library Thu Sep  1 09:04:32 2005
@@ -16,10 +16,13 @@
 -->
 
 <!DOCTYPE library-specification PUBLIC 
-  "-//Apache Software Foundation//Tapestry Specification 3.0//EN" 
-  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
+  "-//Apache Software Foundation//Tapestry Specification 4.0//EN" 
+  "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
 	
 <library-specification>
+
+  <meta key="org.apache.tapestry.component-class-packages" value="org.apache.tapestry.contrib.components"/>
+
   <component-type type="InspectorButton" specification-path="inspector/InspectorButton.jwc"/>
   <page name="Inspector" specification-path="inspector/Inspector.page"/>
   <library id="inspector" specification-path="inspector/Inspector.library"/>

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/IXTile.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/IXTile.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/IXTile.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/IXTile.java Thu Sep  1 09:04:32 2005
@@ -1,4 +1,4 @@
-//Copyright 2004 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.

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.java Thu Sep  1 09:04:32 2005
@@ -1,4 +1,4 @@
-//Copyright 2004 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.

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.properties
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.properties?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.properties (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/Timeout.properties Thu Sep  1 09:04:32 2005
@@ -1,2 +1,16 @@
+# Copyright 2005 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 warning=The connection was inactive for more than {0} minutes. Your session will expire at {1}.\\n Please click OK to continue your work or CANCEL to close the session.
 expiration=Your session has expired. Please log in again.

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/XTile.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/XTile.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/XTile.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/XTile.java Thu Sep  1 09:04:32 2005
@@ -1,4 +1,4 @@
-//Copyright 2004 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.

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/XTileService.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/XTileService.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/XTileService.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/ajax/XTileService.java Thu Sep  1 09:04:32 2005
@@ -1,4 +1,4 @@
-//Copyright 2004 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.

Added: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/components/DumpObject.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/components/DumpObject.java?rev=265748&view=auto
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/components/DumpObject.java (added)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/components/DumpObject.java Thu Sep  1 09:04:32 2005
@@ -0,0 +1,70 @@
+// Copyright 2005 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.apache.tapestry.contrib.components;
+
+import java.io.BufferedOutputStream;
+import java.io.CharArrayWriter;
+import java.io.ObjectOutputStream;
+
+import org.apache.tapestry.AbstractComponent;
+import org.apache.tapestry.IMarkupWriter;
+import org.apache.tapestry.IRequestCycle;
+import org.apache.tapestry.util.io.BinaryDumpOutputStream;
+
+/**
+ * Used to dump out an object's serialized representation in a mix of hex and ascii. The output is
+ * formatted for a fixed width font, typically should be enclosed in &lt;pre&gt; tags.
+ * 
+ * @see org.apache.tapestry.util.io.BinaryDumpOutputStream
+ * @author Howard M. Lewis Ship
+ * @since 4.0
+ */
+
+public abstract class DumpObject extends AbstractComponent
+{
+    // Parameters:
+
+    public abstract Object getObject();
+
+    protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
+    {
+        if (cycle.isRewinding())
+            return;
+
+        String asText = convert(getObject());
+
+        writer.print(asText);
+    }
+
+    String convert(Object object)
+    {
+        try
+        {
+            CharArrayWriter writer = new CharArrayWriter();
+            BinaryDumpOutputStream bdos = new BinaryDumpOutputStream(writer);
+            ObjectOutputStream oos = new ObjectOutputStream(new BufferedOutputStream(bdos));
+
+            oos.writeObject(object);
+
+            oos.close();
+
+            return writer.toString();
+        }
+        catch (Exception ex)
+        {
+            return ex.toString();
+        }
+    }
+}

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/CheckboxGroup.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/CheckboxGroup.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/CheckboxGroup.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/CheckboxGroup.java Thu Sep  1 09:04:32 2005
@@ -1,4 +1,4 @@
-//Copyright 2004 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.

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/ControlCheckbox.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/ControlCheckbox.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/ControlCheckbox.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/ControlCheckbox.java Thu Sep  1 09:04:32 2005
@@ -1,4 +1,4 @@
-//Copyright 2004 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.

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/ControlledCheckbox.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/ControlledCheckbox.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/ControlledCheckbox.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/form/checkboxes/ControlledCheckbox.java Thu Sep  1 09:04:32 2005
@@ -1,4 +1,4 @@
-//Copyright 2004 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.

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Inspector.css
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Inspector.css?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Inspector.css (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Inspector.css Thu Sep  1 09:04:32 2005
@@ -8,9 +8,6 @@
 
 H3  {}
 
-A  {
-	color:#ffffff;
-}
 
 A:Visited  {}
 
@@ -21,22 +18,29 @@
 SPAN.error
 {
 		color: Red;
-		font-weight: bold;
-	background-color : "#330066"		
+		font-weight: bold;	
 }
 
 BODY  {
 	font-family: "Trebuchet MS", sans-serif;
-	 background-color: #839cd1;
 }
 
 
+TABLE.inspector-data
+{
+  border: 1px solid black;
+}
+
 TABLE.inspector-data TR.odd TD  {
 	text-align : left;
 	color : Black;
 	background-color : Silver;
 }
 
+TABLE.inspector-data TR.heading TH
+{
+  border-bottom: 2px solid black;
+}
 
 TABLE.inspector-data TR.even TH
 {
@@ -76,7 +80,6 @@
 TABLE.template TH
 {
 	text-align: center;
-	color : White;
 	background-color : "#330066";
 	font-weight: bold;
 }
@@ -119,14 +122,12 @@
 
 TR.request-context-section TH  {
 	text-align : center;
-	color : White;
-	background-color : Blue;
+    background-color: silver;
 }
 
 TR.request-context-header TH  {
 	text-align : center;
-	color : White;
-	background-color : Blue;
+    background-color: silver;
 }
 
 TABLE.request-context-object TR.odd TD  {
@@ -198,4 +199,71 @@
 	margin-top: 0px;
 	margin-bottom: 0px;
 	margin-left: 20px;
+}
+
+
+TABLE.requestDebug
+{
+	width: 700;
+  	border-color : Black;
+	border-style : solid;
+	border-width : thin;
+	border-top-width : 0px;
+	border-bottom-width : 2px;
+	border-right-width : 2px;
+	border-left-width : 0px;
+	background-color: #839cd1;
+	padding: 0;
+
+}
+
+TABLE.requestDebug TR.control
+{
+    font-weight: bold;
+    font-size: 9pt;
+	color : White;
+	background-color : black;
+}
+
+TABLE.requestDebug FORM
+{
+  margin: 0;
+}
+
+DIV.described-object-title
+{
+  font-size: large;
+  font-weight: bold;
+  color: white;
+  background-color: black;
+}
+
+TABLE.described-object  
+{
+  border: 1px solid black;
+  width: 100%;
+}
+
+
+TABLE.described-object TR.section TH
+{
+  color: white;
+  background-color: black;
+  text-align: center;
+}
+
+TABLE.described-object TR.odd
+{
+  background-color: silver;
+}
+
+TABLE.described-object TR.even
+{
+  background-color: white;
+}
+
+TABLE.described-object TH
+{
+  text-align: right;
+  width: 1px; // Will stretch to fit.
 }

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Inspector.library
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Inspector.library?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Inspector.library (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Inspector.library Thu Sep  1 09:04:32 2005
@@ -16,7 +16,16 @@
 -->
 
 <!DOCTYPE library-specification PUBLIC 
-  "-//Apache Software Foundation//Tapestry Specification 3.0//EN" 
-  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
-	
-<library-specification/>
\ No newline at end of file
+  "-//Apache Software Foundation//Tapestry Specification 4.0//EN" 
+  "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
+<library-specification>	
+  
+  <!-- Turns out that libraries have to form a tree; since this library is included by Contrib, it can't include Contrib.  Instead,
+       we shadow a component from it. Sloppy and probably a bug. -->
+       
+  <component-type type="DumpObject" specification-path="/org/apache/tapestry/contrib/DumpObject.jwc"/>
+  
+  <meta key="org.apache.tapestry.component-class-packages" value="org.apache.tapestry.contrib.components"/>
+  
+
+</library-specification>
\ No newline at end of file

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Selector.jwc
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Selector.jwc?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Selector.jwc (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/Selector.jwc Thu Sep  1 09:04:32 2005
@@ -16,36 +16,38 @@
 -->
 
 <!DOCTYPE component-specification PUBLIC 
-  "-//Apache Software Foundation//Tapestry Specification 3.0//EN" 
-  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
+  "-//Apache Software Foundation//Tapestry Specification 4.0//EN" 
+  "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
 	
 <component-specification class="org.apache.tapestry.contrib.inspector.Selector">
 
   <component id="form" type="Form">
-    <binding name="listener" expression="listeners.formSubmit"/>
+    <binding name="listener" value="listener:formSubmit"/>
   </component>
 
   <component id="selectPage" type="PropertySelection">
-    <binding name="value" expression="page.inspectedPageName"/>
-    <binding name="model" expression="pageModel"/>
-    <binding name="submitOnChange" expression="true"/>
+    <binding name="value" value="page.inspectedPageName"/>
+    <binding name="model" value="pageModel"/>
+    <binding name="onchange">
+      javascript:this.form.events.submit();
+    </binding>
   </component>
 
   <component id="page" type="DirectLink">
-    <binding name="listener" expression="page.listeners.selectComponent"/>
+    <binding name="listener" value="page.listeners.selectComponent"/>
   </component>
 
-  <component id="e" type="Foreach">
-    <binding name="source" expression="crumbTrail"/>
+  <component id="e" type="For">
+    <binding name="source" value="crumbTrail"/>
   </component>
 
   <component id="component" type="DirectLink">
-    <binding name="parameters" expression="components.e.value.idPath"/>
-    <binding name="listener" expression="page.listeners.selectComponent"/>
+    <binding name="parameters" value="components.e.value.idPath"/>
+    <binding name="listener" value="page.listeners.selectComponent"/>
   </component>
 
   <component id="insertId" type="Insert">
-    <binding name="value" expression="components.e.value.id"/>
+    <binding name="value" value="components.e.value.id"/>
   </component>
 
   <component id="renderBody" type="RenderBody"/>

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowDescription.html
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowDescription.html?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowDescription.html (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowDescription.html Thu Sep  1 09:04:32 2005
@@ -15,5 +15,5 @@
 -->
 
 <span jwcid="$content$">
-<span jwcid="ifDescription"><img jwcid="descriptionImage"/></span>
+<span jwcid="ifDescription"><img jwcid="descriptionImage" alt="?"/></span>
 </span>

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowDescription.jwc
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowDescription.jwc?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowDescription.jwc (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowDescription.jwc Thu Sep  1 09:04:32 2005
@@ -16,24 +16,22 @@
 -->
 
 <!DOCTYPE component-specification PUBLIC 
-  "-//Apache Software Foundation//Tapestry Specification 3.0//EN" 
-  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
+  "-//Apache Software Foundation//Tapestry Specification 4.0//EN" 
+  "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
 
-<component-specification class="org.apache.tapestry.BaseComponent" 
-	allow-body="no" 
-	allow-informal-parameters="no">
+<component-specification allow-body="no" allow-informal-parameters="no">
 	
 	<parameter name="description" required="yes"/>
 	
 	<component id="ifDescription" type="If">
-	  <inherited-binding name="condition" parameter-name="description"/>
+	  <binding name="condition" value="description"/>
 	</component>
 	
 	<component id="descriptionImage" type="Image">
-	  <binding name="image" expression="assets.info"/>
-	  <inherited-binding name="alt" parameter-name="description"/>
+	  <binding name="image" value="asset:info"/>
+	  <binding name="title" value="description"/>
 	</component>
 	
-	<private-asset name="info" resource-path="info.gif"/>
+	<asset name="info" path="info.gif"/>
 	
 </component-specification>

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.html
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.html?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.html (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.html Thu Sep  1 09:04:32 2005
@@ -34,42 +34,37 @@
 		<th>Application Name</th>
 		<td><span jwcid="insertApplicationName"/></td>
 	</tr>
-
-	<tr class="even">
-		<th>Context Path</th>
-		<td><span jwcid="insertContextPath"/></td>
-	</tr>
-
-	<tr class="odd">
-		<th>Servlet Path</th>
-		<td><span jwcid="insertServletPath"/></td>
-	</tr>
-
-	<tr class="even">
-		<th>Engine Class</th>
-		<td><span jwcid="insertEngineClass"/></td>
-	</tr>
 	
-	<tr class="odd">
+	<tr class="even">
 		<th>Locale</th>
 		<td><span jwcid="insertLocale"/></td>
 	</tr>
 
-	<tr class="even">
-		<th>Visit</th>
-		<td>
-<span jwcid="ifNoVisit">
-<em>none</em>
-</span>
-
-<span jwcid="ifVisit">
-<span jwcid="insertVisit"/>
-</span>
-		</td>
-	</tr>
-
 </table>
 
+<div jwcid="@If" condition="ognl:! sessionAttributeNames.empty">
+  
+<h1>Session Data</h1>
+  
+<table class="inspector-data">
+  
+  <tr class="heading">
+    <th>Name</th> <th>Object</th>
+  </tr>
+  <tr jwcid="loop">
+    <td>
+      <span jwcid="@Insert" value="ognl:attributeName"/>
+    </td>
+    <td>
+      <pre><span jwcid="@DumpObject" object="ognl:session.getAttribute(attributeName)"/></pre>
+    </td>
+    
+  </tr>
+  
+</table>  
+  
+</div>
+
 <h1>Operations</h1>
 
 <table class="inspector-data">
@@ -91,15 +86,9 @@
 	</tr>
 </table>
 
-<h1>Serialized Engine</h1>
-
-<p>The serialized state of the application engine (the size of this is relevant
-for application servers which support clustering).
 
-<p><span jwcid="insertByteCount"/> bytes:
-<pre><span jwcid="insertSerializedEngine"/></pre>
+<h1>Request Data</h1>
 
-<h1>Request Context</h1>
+<span jwcid="@RequestDisplay"/>
 
-<span jwcid="insertRequest"/>
 </span>

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.java Thu Sep  1 09:04:32 2005
@@ -14,172 +14,42 @@
 
 package org.apache.tapestry.contrib.inspector;
 
-import java.io.ByteArrayOutputStream;
-import java.io.CharArrayWriter;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
+import java.util.Collections;
+import java.util.List;
 
-import org.apache.hivemind.ApplicationRuntimeException;
 import org.apache.tapestry.BaseComponent;
-import org.apache.tapestry.IMarkupWriter;
-import org.apache.tapestry.IRender;
-import org.apache.tapestry.IRequestCycle;
-import org.apache.tapestry.Tapestry;
-import org.apache.tapestry.event.PageDetachListener;
+import org.apache.tapestry.event.PageBeginRenderListener;
 import org.apache.tapestry.event.PageEvent;
-import org.apache.tapestry.util.io.BinaryDumpOutputStream;
+import org.apache.tapestry.web.WebRequest;
+import org.apache.tapestry.web.WebSession;
 
 /**
- *  Component of the {@link Inspector} page used to display
- *  the properties of the {@link org.apache.tapestry.IEngine} as well as a serialized view of it.
- *  Also, the {@link org.apache.tapestry.request.RequestContext} is dumped out.
- *
- *
- *  @author Howard Lewis Ship
- *
- **/
+ * Component of the {@link Inspector} page used to display the properties of the
+ * {@link org.apache.tapestry.IEngine} as well as a serialized view of it. Also, the
+ * {@link org.apache.tapestry.request.RequestContext} is dumped out.
+ * 
+ * @author Howard Lewis Ship
+ */
 
-public abstract class ShowEngine extends BaseComponent implements PageDetachListener
+public abstract class ShowEngine extends BaseComponent implements PageBeginRenderListener
 {
-    private byte[] serializedEngine;
+    // Injected
+    public abstract WebRequest getRequest();
 
-    public void pageDetached(PageEvent event)
-    {
-        serializedEngine = null;
-    }
-
-    /**
-     *  Workaround for OGNL limitation --- OGNL can't dereference
-     *  past class instances.
-     * 
-     *  @since 2.2
-     * 
-     **/
-
-    public String getEngineClassName()
-    {
-        return getPage().getEngine().getClass().getName();
-    }
+    // Transient
+    public abstract void setSessionAttributeNames(List names);
 
-    private byte[] getSerializedEngine()
-    {
-        if (serializedEngine == null)
-            buildSerializedEngine();
-
-        return serializedEngine;
-    }
+    // Transient
+    public abstract void setSession(WebSession session);
 
-    private void buildSerializedEngine()
+    public void pageBeginRender(PageEvent event)
     {
-        ByteArrayOutputStream bos = null;
-        ObjectOutputStream oos = null;
+        WebSession session = getRequest().getSession(false);
 
-        try
-        {
-            bos = new ByteArrayOutputStream();
-            oos = new ObjectOutputStream(bos);
-
-            // Write the application object to the stream.
-
-            oos.writeObject(getPage().getEngine());
-
-            // Extract the application as an array of bytes.
-
-            serializedEngine = bos.toByteArray();
-        }
-        catch (IOException ex)
-        {
-            throw new ApplicationRuntimeException(
-                Tapestry.getMessage("ShowEngine.could-not-serialize"),
-                ex);
-        }
-        finally
-        {
-            close(oos);
-            close(bos);
-        }
-
-        // It would be nice to deserialize the application object now, but in
-        // practice, that fails due to class loader problems.
-    }
-
-    private void close(OutputStream stream)
-    {
-        if (stream == null)
-            return;
-
-        try
-        {
-            stream.close();
-        }
-        catch (IOException ex)
-        {
-            // Ignore.
-        }
-    }
-
-    public int getEngineByteCount()
-    {
-        return getSerializedEngine().length;
-    }
-
-    public IRender getEngineDumpDelegate()
-    {
-        return new IRender()
-        {
-            public void render(IMarkupWriter writer, IRequestCycle cycle)
-            {
-                dumpSerializedEngine(writer);
-            }
-        };
-    }
-
-    private void dumpSerializedEngine(IMarkupWriter responseWriter)
-    {
-        CharArrayWriter writer = null;
-        BinaryDumpOutputStream bos = null;
+        setSession(session);
 
-        try
-        {
-            // Because IReponseWriter doesn't implement the
-            // java.io.Writer interface, we have to buffer this
-            // stuff then pack it in all at once.  Kind of a waste!
-
-            writer = new CharArrayWriter();
-
-            bos = new BinaryDumpOutputStream(writer);
-            bos.setBytesPerLine(32);
-
-            bos.write(getSerializedEngine());
-            bos.close();
-
-            responseWriter.print(writer.toString());
-        }
-        catch (IOException ex)
-        {
-            // Ignore.
-        }
-        finally
-        {
-            if (bos != null)
-            {
-                try
-                {
-                    bos.close();
-                }
-                catch (IOException ex)
-                {
-                    // Ignore.
-                }
-            }
-
-            if (writer != null)
-            {
-                writer.reset();
-                writer.close();
-            }
-        }
+        setSessionAttributeNames(session == null ? Collections.EMPTY_LIST : session
+                .getAttributeNames());
     }
 
 }

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.jwc
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.jwc?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.jwc (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowEngine.jwc Thu Sep  1 09:04:32 2005
@@ -16,82 +16,55 @@
 -->
 
 <!DOCTYPE component-specification PUBLIC 
-  "-//Apache Software Foundation//Tapestry Specification 3.0//EN" 
-  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
+  "-//Apache Software Foundation//Tapestry Specification 4.0//EN" 
+  "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
 	
 <component-specification class="org.apache.tapestry.contrib.inspector.ShowEngine" allow-body="no" allow-informal-parameters="no">
 
+  <inject property="request" object="infrastructure:request"/>
+  <bean name="evenOdd" class="org.apache.tapestry.bean.EvenOdd"/>
+  <property name="attributeName"/>
+  
   <component id="insertFrameworkVersion" type="Insert">
-  	<binding name="value" expression="@org.apache.tapestry.Tapestry@VERSION"/>
+  	<binding name="value" value="@org.apache.tapestry.Tapestry@VERSION"/>
   </component>
   
   <component id="insertApplicationName" type="Insert">
-    <binding name="value" expression="page.engine.specification.name"/>
-  </component>
-  
-  <component id="insertContextPath" type="Insert">
-    <binding name="value" expression="page.engine.contextPath"/>
-  </component>
-  
-  <component id="insertServletPath" type="Insert">
-    <binding name="value" expression="page.engine.servletPath"/>
-  </component>
-  
-  <component id="insertEngineClass" type="Insert">
-    <binding name="value" expression="engineClassName"/>
+    <binding name="value" value="page.engine.specification.name"/>
   </component>
   
   <component id="insertLocale" type="Insert">
-    <binding name="value" expression="page.engine.locale.displayName"/>
-  </component>
-  
-  <component id="ifNoVisit" type="If">
-    <binding name="condition" expression="! page.engine.hasVisit"/>
-  </component>
-  
-  <component id="insertVisit" type="Insert">
-    <binding name="value" expression="page.engine.visit"/>
-  </component>
-  
-  <component id="ifVisit" type="If">
-    <binding name="condition" expression="page.engine.hasVisit"/>
+    <binding name="value" value="page.engine.locale.displayName"/>
   </component>
   
   <component id="restart" type="ServiceLink">
-    <binding name="service" expression="@org.apache.tapestry.Tapestry@RESTART_SERVICE"/>
+    <binding name="service" value="@org.apache.tapestry.Tapestry@RESTART_SERVICE"/>
   </component>
   
   <component id="restartButton" type="Rollover">
-    <binding name="image" expression="assets.restart"/>
-    <binding name="focus" expression="assets.restartFocus"/>
+    <binding name="image" value="asset:restart"/>
+    <binding name="focus" value="asset:restartFocus"/>
   </component>
   
   <component id="reset" type="ServiceLink">
-    <binding name="service" expression="@org.apache.tapestry.Tapestry@RESET_SERVICE"/>
-    <binding name="disabled" expression="! page.engine.resetServiceEnabled"/>
+    <binding name="service" value="@org.apache.tapestry.Tapestry@RESET_SERVICE"/>
   </component>
   
   <component id="resetButton" type="Rollover">
-    <binding name="image" expression="assets.reset"/>
-    <binding name="focus" expression="assets.resetFocus"/>
-    <binding name="disabled" expression="assets.resetDisabled"/>
-  </component>
-  
-  <component id="insertByteCount" type="Insert">
-    <binding name="value" expression="engineByteCount"/>
-  </component>
-  
-  <component id="insertSerializedEngine" type="Delegator">
-    <binding name="delegate" expression="engineDumpDelegate"/>
+    <binding name="image" value="asset:reset"/>
+    <binding name="focus" value="asset:resetFocus"/>
   </component>
   
-  <component id="insertRequest" type="Delegator">
-    <binding name="delegate" expression="page.requestCycle.requestContext"/>
+  <asset name="reset" path="Reset_Np1.gif"/>
+  <asset name="resetFocus" path="Reset_NRp2.gif"/>
+  <asset name="restart" path="Restart_Np1.gif"/>
+  <asset name="restartFocus" path="Restart_NRp2.gif"/>
+  
+  <component id="loop" type="For">
+    <binding name="source" value="sessionAttributeNames"/>
+    <binding name="value" value="attributeName"/>
+    <binding name="element" value="literal:tr"/>
+    <binding name="class" value="beans.evenOdd.next"/>
   </component>
   
-  <private-asset name="reset" resource-path="Reset_Np1.gif"/>
-  <private-asset name="resetFocus" resource-path="Reset_NRp2.gif"/>
-  <private-asset name="resetDisabled" resource-path="Reset_Np1_disabled.gif"/>
-  <private-asset name="restart" resource-path="Restart_Np1.gif"/>
-  <private-asset name="restartFocus" resource-path="Restart_NRp2.gif"/>
 </component-specification>

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowProperties.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowProperties.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowProperties.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowProperties.java Thu Sep  1 09:04:32 2005
@@ -14,15 +14,18 @@
 
 package org.apache.tapestry.contrib.inspector;
 
-import java.util.Collections;
+import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 
 import org.apache.hivemind.service.ClassFabUtils;
 import org.apache.tapestry.BaseComponent;
-import org.apache.tapestry.engine.IPageRecorder;
+import org.apache.tapestry.IPage;
+import org.apache.tapestry.IRequestCycle;
+import org.apache.tapestry.event.PageBeginRenderListener;
 import org.apache.tapestry.event.PageEvent;
-import org.apache.tapestry.event.PageRenderListener;
 import org.apache.tapestry.record.PropertyChange;
+import org.apache.tapestry.record.PropertyPersistenceStrategySource;
 
 /**
  * Component of the {@link Inspector}page used to display the persisent properties of the page.
@@ -30,83 +33,34 @@
  * @author Howard Lewis Ship
  */
 
-public abstract class ShowProperties extends BaseComponent implements PageRenderListener
+public abstract class ShowProperties extends BaseComponent implements PageBeginRenderListener
 {
-    private List _properties;
 
-    private PropertyChange _change;
+    public abstract void setProperties(List properties);
 
-    // private IPage _inspectedPage;
+    public abstract PropertyChange getChange();
 
-    /**
-     * Does nothing.
-     * 
-     * @since 1.0.5
-     */
+    /** Injected */
 
-    public void pageBeginRender(PageEvent event)
-    {
-    }
+    public abstract PropertyPersistenceStrategySource getPropertySource();
 
-    /**
-     * @since 1.0.5
-     */
-
-    public void pageEndRender(PageEvent event)
-    {
-        _properties = null;
-        _change = null;
-        // _inspectedPage = null;
-    }
-
-    private void buildProperties()
+    public void pageBeginRender(PageEvent event)
     {
-        // Inspector inspector = (Inspector) getPage();
-
-        // _inspectedPage = inspector.getInspectedPage();
+        IRequestCycle cycle = event.getRequestCycle();
 
-        IPageRecorder recorder = null;
+        Inspector inspector = (Inspector) getPage();
 
-        // TODO: This is going to blow up with UnsupportedOperationException
-        // engine.getPageRecorder(_inspectedPage.getPageName(), inspector.getRequestCycle());
+        IPage inspectedPage = inspector.getInspectedPage();
 
-        // No page recorder? No properties.
+        String pageName = inspectedPage.getPageName();
 
-        if (recorder == null)
-        {
-            _properties = Collections.EMPTY_LIST;
-            return;
-        }
+        PropertyPersistenceStrategySource source = getPropertySource();
 
-        _properties = Collections.EMPTY_LIST;
+        Collection properties = source.getAllStoredChanges(pageName, cycle);
 
-        // The getChanges() method was removed
-        // from IPageRecorder in release 4.0
-        // new ArrayList(recorder.getChanges());
-    }
-
-    /**
-     * Returns a {@link List}of {@link PropertyChange}objects.
-     * <p>
-     * Sort order is not defined.
-     */
+        // TODO: sorting
 
-    public List getProperties()
-    {
-        if (_properties == null)
-            buildProperties();
-
-        return _properties;
-    }
-
-    public void setChange(PropertyChange value)
-    {
-        _change = value;
-    }
-
-    public PropertyChange getChange()
-    {
-        return _change;
+        setProperties(new ArrayList(properties));
     }
 
     /**
@@ -115,9 +69,7 @@
 
     public String getValueClassName()
     {
-        Object value;
-
-        value = _change.getNewValue();
+        Object value = getChange().getNewValue();
 
         if (value == null)
             return "<null>";

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowProperties.jwc
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowProperties.jwc?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowProperties.jwc (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowProperties.jwc Thu Sep  1 09:04:32 2005
@@ -16,49 +16,51 @@
 -->
 
 <!DOCTYPE component-specification PUBLIC 
-  "-//Apache Software Foundation//Tapestry Specification 3.0//EN" 
-  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
+  "-//Apache Software Foundation//Tapestry Specification 4.0//EN" 
+  "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
 	
 <component-specification class="org.apache.tapestry.contrib.inspector.ShowProperties">
 
+  <inject property="propertySource" object="service:tapestry.persist.PropertyPersistenceStrategySource"/>
+  
   <bean name="persistPropertyClass" class="org.apache.tapestry.bean.EvenOdd"/>
   <bean name="propertyClass" class="org.apache.tapestry.bean.EvenOdd"/>
   
   <component id="ifNoProperties" type="If">
-    <binding name="condition" expression="!properties"/>
+    <binding name="condition" value="properties.empty"/>
   </component>
   
   <component id="ifHasProperties" type="If">
-    <binding name="condition" expression="properties"/>
+    <binding name="condition" value="! properties.empty"/>
   </component>
   
-  <component id="e" type="Foreach">
-    <binding name="source" expression="properties"/>
-    <binding name="value" expression="change"/>
-    <static-binding name="element">tr</static-binding>
-    <binding name="class" expression="beans.persistPropertyClass.next"/>
+  <component id="e" type="For">
+    <binding name="source" value="properties"/>
+    <binding name="value" value="change"/>
+    <binding name="element" value="literal:tr"/>
+    <binding name="class" value="beans.persistPropertyClass.next"/>
   </component>
   
   <component id="selectComponent" type="DirectLink">
-    <binding name="listener" expression="page.listeners.selectComponent"/>
-    <binding name="parameters" expression="change.componentPath"/>
-    <binding name="disabled" expression="change.componentPath == null"/>
+    <binding name="listener" value="page.listeners.selectComponent"/>
+    <binding name="parameters" value="change.componentPath"/>
+    <binding name="disabled" value="change.componentPath == null"/>
   </component>
   
   <component id="insertPath" type="Insert">
-    <binding name="value" expression="change.componentPath"/>
+    <binding name="value" value="change.componentPath"/>
   </component>
   
   <component id="insertPersistPropertyName" type="Insert">
-    <binding name="value" expression="change.propertyName"/>
+    <binding name="value" value="change.propertyName"/>
   </component>
   
   <component id="insertPersistValueClass" type="Insert">
-    <binding name="value" expression="valueClassName"/>
+    <binding name="value" value="valueClassName"/>
   </component>
   
-  <component id="insertPersistValue" type="Insert">
-    <binding name="value" expression="change.newValue"/>
+  <component id="insertPersistValue" type="Describe">
+    <binding name="object" value="change.newValue"/>
   </component>
   
 </component-specification>

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.html
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.html?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.html (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.html Thu Sep  1 09:04:32 2005
@@ -64,7 +64,7 @@
 		</td>
 		<td><span jwcid="@Insert" value="ognl:parameterSpecification.required"/></td>
 		<td><span jwcid="@Insert" value="ognl:parameterSpecification.type"/></td>
-		<td><span jwcid="@Insert" value="ognl:binding"/></td>
+		<td><span jwcid="@Describe" object="ognl:binding"/></td>
 	</tr>
 
 </table>
@@ -82,7 +82,7 @@
 
 	<tr jwcid="e_informal">
 		<td><span jwcid="@Insert" value="ognl:parameterName"/></td>
-		<td><span jwcid="@Insert" value="ognl:binding"/></td>
+		<td><span jwcid="@Describe" object="ognl:binding"/></td>
 	</tr>
 
 </table>
@@ -100,7 +100,7 @@
 
 	<tr jwcid="e_asset">
 		<td><span jwcid="@Insert" value="ognl:assetName"/></td>
-		<td><span jwcid="@Insert" value="ognl:asset"/></td>
+		<td><span jwcid="@Describe" object="ognl:asset"/></td>
 	</tr>
 
 
@@ -164,7 +164,7 @@
 			<a jwcid="selectComponent"><span jwcid="@Insert" value="ognl:currentComponent.id"/></a>
 		</td>
 		<td>
-			<span jwcid="@Insert" value="ognl:componentType"/>
+			<span jwcid="@Insert" value="ognl:currentComponent.containedComponent.type"/>
 		</td>
 	</tr>
 

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.java (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.java Thu Sep  1 09:04:32 2005
@@ -30,7 +30,6 @@
 import org.apache.tapestry.event.PageEvent;
 import org.apache.tapestry.spec.IBeanSpecification;
 import org.apache.tapestry.spec.IComponentSpecification;
-import org.apache.tapestry.spec.IContainedComponent;
 import org.apache.tapestry.spec.IParameterSpecification;
 
 /**
@@ -264,29 +263,6 @@
     public abstract void setCurrentComponent(IComponent value);
 
     public abstract IComponent getCurrentComponent();
-
-    /**
-     * Returns the type of the component, as specified in the container's specification (i.e., the
-     * component alias if known).
-     */
-
-    public String getComponentType()
-    {
-        IComponent container = getCurrentComponent().getContainer();
-
-        IComponentSpecification containerSpecification = container.getSpecification();
-
-        String id = getCurrentComponent().getId();
-        IContainedComponent contained = containerSpecification.getComponent(id);
-
-        // Temporary: An implicit component will not be in the containing
-        // component's specification as a ContainedComponent.
-
-        if (contained == null)
-            return null;
-
-        return contained.getType();
-    }
 
     /**
      * Returns a list of the properties for the component (from its specification), or null if the

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.jwc
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.jwc?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.jwc (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/inspector/ShowSpecification.jwc Thu Sep  1 09:04:32 2005
@@ -29,51 +29,51 @@
   <bean name="beanClass" class="org.apache.tapestry.bean.EvenOdd"/>
         
   <component id="e_formal" type="For">
-    <binding name="source" value="ognl:formalParameterNames"/>
-    <binding name="value" value="ognl:parameterName"/>
-  	<binding name="element" value="tr"/>
-    <binding name="class" value="ognl:beans.formalClass.next"/>
+    <binding name="source" value="formalParameterNames"/>
+    <binding name="value" value="parameterName"/>
+  	<binding name="element" value="literal:tr"/>
+    <binding name="class" value="beans.formalClass.next"/>
   </component>
      
   
-  <component id="e_informal" type="Foreach"> 
-    <binding name="source" value="ognl:informalParameterNames"/>
-    <binding name="value" value="ognl:parameterName"/>
-  	<binding name="element" value="tr"/>
-    <binding name="class" value="ognl:beans.informalClass.next"/>
+  <component id="e_informal" type="For"> 
+    <binding name="source" value="informalParameterNames"/>
+    <binding name="value" value="parameterName"/>
+  	<binding name="element" value="literal:tr"/>
+    <binding name="class" value="beans.informalClass.next"/>
   </component>
 
-  <component id="e_asset" type="Foreach">
-    <binding name="source" value="ognl:assetNames"/>
-    <binding name="value" value="ognl:assetName"/>
-  	<binding name="element" value="tr"/>
-    <binding name="class" value="ognl:beans.assetClass.next"/>
+  <component id="e_asset" type="For">
+    <binding name="source" value="assetNames"/>
+    <binding name="value" value="assetName"/>
+  	<binding name="element" value="literal:tr"/>
+    <binding name="class" value="beans.assetClass.next"/>
   </component>
   
-  <component id="e_components" type="Foreach">
-    <binding name="source" value="ognl:sortedComponents"/>
-    <binding name="value" value="ognl:currentComponent"/>
-    <binding name="element" value="tr"/>
-    <binding name="class" value="ognl:beans.componentClass.next"/>
+  <component id="e_components" type="For">
+    <binding name="source" value="sortedComponents"/>
+    <binding name="value" value="currentComponent"/>
+    <binding name="element" value="literal:tr"/>
+    <binding name="class" value="beans.componentClass.next"/>
   </component>
 
   <component id="selectComponent" type="DirectLink">
-    <binding name="listener" value="ognl:page.listeners.selectComponent"/>
-    <binding name="parameters" value="ognl:currentComponent.idPath"/>
+    <binding name="listener" value="page.listeners.selectComponent"/>
+    <binding name="parameters" value="currentComponent.idPath"/>
   </component>
 
-  <component id="e_property" type="Foreach">
-    <binding name="source" value="ognl:sortedPropertyNames"/>
-    <binding name="value" value="ognl:propertyName"/>
-  	<binding name="element" value="tr"/>
-    <binding name="class" value="ognl:beans.propertyClass.next"/>
+  <component id="e_property" type="For">
+    <binding name="source" value="sortedPropertyNames"/>
+    <binding name="value" value="propertyName"/>
+  	<binding name="element" value="literal:tr"/>
+    <binding name="class" value="beans.propertyClass.next"/>
   </component>
       
-  <component id="e_bean" type="Foreach">
-  	<binding name="source" value="ognl:beanNames"/>
-  	<binding name="value" value="ognl:beanName"/>
-  	<binding name="element" value="tr"/>
-  	<binding name="class" value="ognl:beans.beanClass.next"/>
+  <component id="e_bean" type="For">
+  	<binding name="source" value="beanNames"/>
+  	<binding name="value" value="beanName"/>
+  	<binding name="element" value="literal:tr"/>
+  	<binding name="class" value="beans.beanClass.next"/>
   </component>
   	
 </component-specification>

Modified: jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/valid/ValidatingTextField.jwc
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/valid/ValidatingTextField.jwc?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/valid/ValidatingTextField.jwc (original)
+++ jakarta/tapestry/trunk/contrib/src/java/org/apache/tapestry/contrib/valid/ValidatingTextField.jwc Thu Sep  1 09:04:32 2005
@@ -14,6 +14,7 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 -->
+
 <!DOCTYPE component-specification PUBLIC 
   "-//Apache Software Foundation//Tapestry Specification 4.0//EN" 
   "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">

Added: jakarta/tapestry/trunk/contrib/src/test/org/apache/tapestry/contrib/components/Normal.txt
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/test/org/apache/tapestry/contrib/components/Normal.txt?rev=265748&view=auto
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/test/org/apache/tapestry/contrib/components/Normal.txt (added)
+++ jakarta/tapestry/trunk/contrib/src/test/org/apache/tapestry/contrib/components/Normal.txt Thu Sep  1 09:04:32 2005
@@ -0,0 +1,2 @@
+0000: aced0005 74001361 20736572 69616c69  |....t..a seriali|
+0010: 7a656420 73747269 6e67               |zed string      |

Added: jakarta/tapestry/trunk/contrib/src/test/org/apache/tapestry/contrib/components/TestDumpObject.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/contrib/src/test/org/apache/tapestry/contrib/components/TestDumpObject.java?rev=265748&view=auto
==============================================================================
--- jakarta/tapestry/trunk/contrib/src/test/org/apache/tapestry/contrib/components/TestDumpObject.java (added)
+++ jakarta/tapestry/trunk/contrib/src/test/org/apache/tapestry/contrib/components/TestDumpObject.java Thu Sep  1 09:04:32 2005
@@ -0,0 +1,136 @@
+// Copyright 2005 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.apache.tapestry.contrib.components;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
+import java.io.Reader;
+
+import org.apache.hivemind.test.HiveMindTestCase;
+import org.apache.tapestry.IMarkupWriter;
+import org.apache.tapestry.IRequestCycle;
+import org.apache.tapestry.test.Creator;
+import org.easymock.MockControl;
+
+/**
+ * Tests for {@link org.apache.tapestry.contrib.components.DumpObject}
+ * 
+ * @author Howard Lewis Ship
+ * @since 4.0
+ */
+public class TestDumpObject extends HiveMindTestCase
+{
+    /**
+     * Reads the content of a file, and forms a string. Converts line-number endings in the file
+     * into the correct platform value (this should help the test run properly on both Windows and
+     * *nix).
+     */
+    private String contentsOf(String path) throws Exception
+    {
+        String sep = System.getProperty("line.separator");
+
+        InputStream is = getClass().getResourceAsStream(path);
+
+        is = new BufferedInputStream(is);
+
+        Reader ir = new InputStreamReader(is);
+
+        ir = new BufferedReader(ir);
+
+        LineNumberReader lnr = new LineNumberReader(ir);
+
+        StringBuffer buffer = new StringBuffer();
+
+        while (true)
+        {
+            String line = lnr.readLine();
+
+            if (line == null)
+                break;
+
+            buffer.append(line);
+            buffer.append(sep);
+        }
+
+        ir.close();
+
+        return buffer.toString();
+    }
+
+    public void testNotSerializable()
+    {
+        Creator creator = new Creator();
+        Object object = new Object();
+
+        DumpObject dumpObject = (DumpObject) creator.newInstance(DumpObject.class);
+
+        assertEquals("java.io.NotSerializableException: java.lang.Object", dumpObject
+                .convert(object));
+    }
+
+    public void testRewinding()
+    {
+        IMarkupWriter writer = newWriter();
+        IRequestCycle cycle = newCycle(true);
+
+        Creator creator = new Creator();
+        DumpObject dumpObject = (DumpObject) creator.newInstance(DumpObject.class);
+
+        replayControls();
+
+        dumpObject.renderComponent(writer, cycle);
+
+        verifyControls();
+    }
+
+    public void testNormal() throws Exception
+    {
+        IMarkupWriter writer = newWriter();
+        IRequestCycle cycle = newCycle(false);
+
+        Creator creator = new Creator();
+        DumpObject dumpObject = (DumpObject) creator.newInstance(DumpObject.class, new Object[]
+        { "object", "a serialized string" });
+
+        String expected = contentsOf("Normal.txt");
+
+        writer.print(expected);
+
+        replayControls();
+
+        dumpObject.renderComponent(writer, cycle);
+
+        verifyControls();
+    }
+
+    private IRequestCycle newCycle(boolean isRewinding)
+    {
+        MockControl control = newControl(IRequestCycle.class);
+        IRequestCycle cycle = (IRequestCycle) control.getMock();
+
+        cycle.isRewinding();
+        control.setReturnValue(isRewinding);
+
+        return cycle;
+    }
+
+    private IMarkupWriter newWriter()
+    {
+        return (IMarkupWriter) newMock(IMarkupWriter.class);
+    }
+}

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=265748&r1=265747&r2=265748&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 Thu Sep  1 09:04:32 2005
@@ -32,6 +32,7 @@
 import org.apache.tapestry.event.PageEvent;
 import org.apache.tapestry.listener.ListenerMap;
 import org.apache.tapestry.spec.IComponentSpecification;
+import org.apache.tapestry.spec.IContainedComponent;
 
 /**
  * Abstract base class implementing the {@link IComponent}interface.
@@ -139,6 +140,10 @@
 
     private boolean _active;
 
+    /** @since 4.0 */
+
+    private IContainedComponent _containedComponent;
+
     public void addAsset(String name, IAsset asset)
     {
         Defense.notNull(name, "name");
@@ -840,6 +845,24 @@
     public final IComponent getComponent()
     {
         return this;
+    }
+
+    /** @since 4.0 */
+    public IContainedComponent getContainedComponent()
+    {
+        return _containedComponent;
+    }
+
+    /** @since 4.0 */
+    public void setContainedComponent(IContainedComponent containedComponent)
+    {
+        Defense.notNull(containedComponent, "containedComponent");
+
+        if (_containedComponent != null)
+            throw new ApplicationRuntimeException(TapestryMessages
+                    .attemptToChangeContainedComponent(this));
+
+        _containedComponent = containedComponent;
     }
 
 }

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/IComponent.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/IComponent.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/IComponent.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/IComponent.java Thu Sep  1 09:04:32 2005
@@ -22,6 +22,7 @@
 import org.apache.tapestry.engine.IPageLoader;
 import org.apache.tapestry.listener.ListenerMap;
 import org.apache.tapestry.spec.IComponentSpecification;
+import org.apache.tapestry.spec.IContainedComponent;
 
 /**
  * Defines an object which may be used to provide dynamic content on a Tapestry web page.
@@ -363,4 +364,24 @@
      */
 
     public IComponent getComponent();
+
+    /**
+     * Returns the {@link org.apache.tapestry.spec.IContainedComponent}. This will be null for
+     * pages. This property is set when a component is constructed, and links the component instance
+     * to the reference in the containing page or component's template or specification. This is
+     * useful to allow a component to know its type or the meta-data associated with the component.
+     * 
+     * @return the contained component, or null for a page.
+     * @since 4.0
+     */
+
+    public IContainedComponent getContainedComponent();
+
+    /**
+     * Sets the {@link #getContainedComponent()} property; this may only be done once.
+     * 
+     * @param containedComponent
+     *            may not be null
+     */
+    public void setContainedComponent(IContainedComponent containedComponent);
 }

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/TapestryMessages.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/TapestryMessages.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/TapestryMessages.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/TapestryMessages.java Thu Sep  1 09:04:32 2005
@@ -60,4 +60,9 @@
     {
         return _formatter.format("provided-by-enhancement", methodName);
     }
+
+    public static String attemptToChangeContainedComponent(IComponent component)
+    {
+        return _formatter.format("attempt-to-change-contained-component", component.getExtendedId());
+    }
 }

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/TapestryStrings2.properties
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/TapestryStrings2.properties?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/TapestryStrings2.properties (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/TapestryStrings2.properties Thu Sep  1 09:04:32 2005
@@ -20,3 +20,4 @@
 no-page-render-support=Component {0} requires rendering support, but no PageRenderSupport object has been stored into the request cycle. This object is typically provided by a Body component. You should add a Body component to your template.
 provided-by-enhancement=Method {0}() is not implemented. An implementation of this method should be provided via runtime class enhancement.
 no-form=Component {0} must be enclosed by a form, but no Form component has been stored into the request cycle.
+attempt-to-change-contained-component=Attempt to change containedComponent property of component {0}, which is not allowed.

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/pageload/PageLoader.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/pageload/PageLoader.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/pageload/PageLoader.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/pageload/PageLoader.java Thu Sep  1 09:04:32 2005
@@ -25,10 +25,12 @@
 import org.apache.hivemind.HiveMind;
 import org.apache.hivemind.Location;
 import org.apache.hivemind.service.ThreadLocale;
+import org.apache.tapestry.AbstractComponent;
 import org.apache.tapestry.BaseComponent;
 import org.apache.tapestry.IAsset;
 import org.apache.tapestry.IBinding;
 import org.apache.tapestry.IComponent;
+import org.apache.tapestry.IEngine;
 import org.apache.tapestry.INamespace;
 import org.apache.tapestry.IPage;
 import org.apache.tapestry.IRequestCycle;
@@ -36,15 +38,18 @@
 import org.apache.tapestry.asset.AssetSource;
 import org.apache.tapestry.binding.BindingConstants;
 import org.apache.tapestry.binding.BindingSource;
+import org.apache.tapestry.binding.ExpressionBinding;
 import org.apache.tapestry.binding.ListenerBinding;
 import org.apache.tapestry.coerce.ValueConverter;
 import org.apache.tapestry.engine.IPageLoader;
+import org.apache.tapestry.event.ChangeObserver;
 import org.apache.tapestry.resolver.ComponentSpecificationResolver;
 import org.apache.tapestry.services.BSFManagerFactory;
 import org.apache.tapestry.services.ComponentConstructor;
 import org.apache.tapestry.services.ComponentConstructorFactory;
 import org.apache.tapestry.services.ComponentTemplateLoader;
 import org.apache.tapestry.spec.BindingType;
+import org.apache.tapestry.spec.ContainedComponent;
 import org.apache.tapestry.spec.IAssetSpecification;
 import org.apache.tapestry.spec.IBindingSpecification;
 import org.apache.tapestry.spec.IComponentSpecification;
@@ -431,7 +436,7 @@
                         componentSpecification,
                         _componentResolver.getType(),
                         componentNamespace,
-                        location);
+                        contained);
 
                 // Add it, by name, to the container.
 
@@ -500,6 +505,10 @@
         INamespace componentNamespace = _componentResolver.getNamespace();
         IComponentSpecification spec = _componentResolver.getSpecification();
 
+        IContainedComponent contained = new ContainedComponent();
+        contained.setLocation(location);
+        contained.setType(componentType);
+
         IComponent result = instantiateComponent(
                 page,
                 container,
@@ -507,7 +516,7 @@
                 spec,
                 _componentResolver.getType(),
                 componentNamespace,
-                location);
+                contained);
 
         container.addComponent(result);
 
@@ -526,7 +535,8 @@
      */
 
     private IComponent instantiateComponent(IPage page, IComponent container, String id,
-            IComponentSpecification spec, String type, INamespace namespace, Location location)
+            IComponentSpecification spec, String type, INamespace namespace,
+            IContainedComponent containedComponent)
     {
         ComponentClassProviderContext context = new ComponentClassProviderContext(type, spec,
                 namespace);
@@ -559,7 +569,8 @@
         result.setPage(page);
         result.setContainer(container);
         result.setId(id);
-        result.setLocation(location);
+        result.setContainedComponent(containedComponent);
+        result.setLocation(containedComponent.getLocation());
 
         _count++;
 

Modified: jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/util/io/BinaryDumpOutputStream.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/util/io/BinaryDumpOutputStream.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/util/io/BinaryDumpOutputStream.java (original)
+++ jakarta/tapestry/trunk/framework/src/java/org/apache/tapestry/util/io/BinaryDumpOutputStream.java Thu Sep  1 09:04:32 2005
@@ -20,16 +20,13 @@
 import java.io.Writer;
 
 /**
- *  A kind of super-formatter.  It is sent a stream of binary data and
- *  formats it in a human-readable dump format which is forwarded to
- *  its output stream.
- *
- * <p>Currently, output is in hex though options to change that may
- * be introduced.
- *
- *  @author Howard Lewis Ship
+ * A kind of super-formatter. It is sent a stream of binary data and formats it in a human-readable
+ * dump format which is forwarded to its output stream.
+ * <p>
+ * Currently, output is in hex though options to change that may be introduced.
  * 
- **/
+ * @author Howard Lewis Ship
+ */
 
 public class BinaryDumpOutputStream extends OutputStream
 {
@@ -38,41 +35,35 @@
     private boolean locked = false;
 
     private boolean showOffset = true;
+
     private int bytesPerLine = 16;
+
     private int spacingInterval = 4;
+
     private char substituteChar = '.';
+
     private String offsetSeperator = ": ";
+
     private int offset = 0;
+
     private int lineCount = 0;
+
     private int bytesSinceSpace = 0;
+
     private char[] ascii = null;
+
     private boolean showAscii = true;
+
     private String asciiBegin = "  |";
+
     private String asciiEnd = "|";
 
     private static final char[] HEX =
-        {
-            '0',
-            '1',
-            '2',
-            '3',
-            '4',
-            '5',
-            '6',
-            '7',
-            '8',
-            '9',
-            'a',
-            'b',
-            'c',
-            'd',
-            'e',
-            'f' };
+    { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
 
     /**
-     *  Creates a <code>PrintWriter</code> for <code>System.out</code>.
-     *
-     **/
+     * Creates a <code>PrintWriter</code> for <code>System.out</code>.
+     */
 
     public BinaryDumpOutputStream()
     {
@@ -140,9 +131,8 @@
     }
 
     /**
-     *  Forwards the <code>flush()</code> to the <code>PrintWriter</code>.
-     *
-     **/
+     * Forwards the <code>flush()</code> to the <code>PrintWriter</code>.
+     */
 
     public void flush() throws IOException
     {
@@ -222,10 +212,9 @@
     }
 
     /**
-     *  Sets the character used in the ASCII dump that substitutes for characters
-     *  outside the range of 32..126.
-     *
-     **/
+     * Sets the character used in the ASCII dump that substitutes for characters outside the range
+     * of 32..126.
+     */
 
     public void setSubstituteChar(char value)
     {
@@ -303,5 +292,25 @@
 
             out.print(HEX[nybble]);
         }
+    }
+
+    public void setSpacingInterval(int spacingInterval)
+    {
+        this.spacingInterval = spacingInterval;
+    }
+
+    public boolean isShowOffset()
+    {
+        return showOffset;
+    }
+
+    public void setShowOffset(boolean showOffset)
+    {
+        this.showOffset = showOffset;
+    }
+
+    public int getSpacingInterval()
+    {
+        return spacingInterval;
     }
 }

Copied: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/BaseComponentTestCase.java (from r265533, jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/BaseComponentTestCase.java)
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/BaseComponentTestCase.java?p2=jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/BaseComponentTestCase.java&p1=jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/BaseComponentTestCase.java&r1=265533&r2=265748&rev=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/BaseComponentTestCase.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/BaseComponentTestCase.java Thu Sep  1 09:04:32 2005
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry.components;
+package org.apache.tapestry;
 
 import java.io.CharArrayWriter;
 import java.io.PrintWriter;

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/TestAbstractComponent.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/TestAbstractComponent.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/TestAbstractComponent.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/TestAbstractComponent.java Thu Sep  1 09:04:32 2005
@@ -14,7 +14,9 @@
 
 package org.apache.tapestry;
 
-import org.apache.hivemind.test.HiveMindTestCase;
+import org.apache.hivemind.ApplicationRuntimeException;
+import org.apache.tapestry.spec.IContainedComponent;
+import org.apache.tapestry.test.Creator;
 
 /**
  * Tests a few new features of {@link org.apache.tapestry.AbstractComponent}&nbsp;added in release
@@ -23,7 +25,7 @@
  * @author Howard M. Lewis Ship
  * @since 4.0
  */
-public class TestAbstractComponent extends HiveMindTestCase
+public class TestAbstractComponent extends BaseComponentTestCase
 {
     private static class ConcreteComponent extends AbstractComponent
     {
@@ -67,5 +69,60 @@
             assertEquals(TapestryMessages.providedByEnhancement("getSpecification"), ex
                     .getMessage());
         }
+    }
+
+    public void testContainedComponent()
+    {
+        Creator creator = new Creator();
+
+        IContainedComponent cc = newContainedComponent();
+
+        replayControls();
+
+        IComponent component = (IComponent) creator.newInstance(BaseComponent.class);
+
+        component.setContainedComponent(cc);
+
+        assertSame(cc, component.getContainedComponent());
+
+        verifyControls();
+    }
+
+    public void testContainedComponentConflict()
+    {
+        Creator creator = new Creator();
+
+        IContainedComponent cc1 = newContainedComponent();
+        IContainedComponent cc2 = newContainedComponent();
+
+        IPage page = newPage("Fred");
+
+        trainGetIdPath(page, null);
+
+        replayControls();
+
+        IComponent component = (IComponent) creator.newInstance(BaseComponent.class, new Object[]
+        { "page", page, "container", page, "id", "barney" });
+
+        component.setContainedComponent(cc1);
+
+        try
+        {
+            component.setContainedComponent(cc2);
+            unreachable();
+        }
+        catch (ApplicationRuntimeException ex)
+        {
+            assertEquals(
+                    "Attempt to change containedComponent property of component Fred/barney, which is not allowed.",
+                    ex.getMessage());
+        }
+
+        verifyControls();
+    }
+
+    private IContainedComponent newContainedComponent()
+    {
+        return (IContainedComponent) newMock(IContainedComponent.class);
     }
 }

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/callback/TestDirectCallback.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/callback/TestDirectCallback.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/callback/TestDirectCallback.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/callback/TestDirectCallback.java Thu Sep  1 09:04:32 2005
@@ -16,11 +16,11 @@
 
 import org.apache.hivemind.ApplicationRuntimeException;
 import org.apache.hivemind.Location;
+import org.apache.tapestry.BaseComponentTestCase;
 import org.apache.tapestry.IComponent;
 import org.apache.tapestry.IDirect;
 import org.apache.tapestry.IPage;
 import org.apache.tapestry.IRequestCycle;
-import org.apache.tapestry.components.BaseComponentTestCase;
 import org.easymock.MockControl;
 
 /**

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/callback/TestExternalCallback.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/callback/TestExternalCallback.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/callback/TestExternalCallback.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/callback/TestExternalCallback.java Thu Sep  1 09:04:32 2005
@@ -15,10 +15,10 @@
 package org.apache.tapestry.callback;
 
 import org.apache.hivemind.ApplicationRuntimeException;
+import org.apache.tapestry.BaseComponentTestCase;
 import org.apache.tapestry.IExternalPage;
 import org.apache.tapestry.IPage;
 import org.apache.tapestry.IRequestCycle;
-import org.apache.tapestry.components.BaseComponentTestCase;
 import org.easymock.MockControl;
 
 /**

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/callback/TestPageCallback.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/callback/TestPageCallback.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/callback/TestPageCallback.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/callback/TestPageCallback.java Thu Sep  1 09:04:32 2005
@@ -14,9 +14,9 @@
 
 package org.apache.tapestry.callback;
 
+import org.apache.tapestry.BaseComponentTestCase;
 import org.apache.tapestry.IPage;
 import org.apache.tapestry.IRequestCycle;
-import org.apache.tapestry.components.BaseComponentTestCase;
 
 /**
  * Tests for {@link org.apache.tapestry.callback.PageCallback}.

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestAny.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestAny.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestAny.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestAny.java Thu Sep  1 09:04:32 2005
@@ -16,6 +16,7 @@
 
 import org.apache.hivemind.ApplicationRuntimeException;
 import org.apache.hivemind.Location;
+import org.apache.tapestry.BaseComponentTestCase;
 import org.apache.tapestry.IBinding;
 import org.apache.tapestry.IMarkupWriter;
 import org.apache.tapestry.IRender;

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestBlock.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestBlock.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestBlock.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestBlock.java Thu Sep  1 09:04:32 2005
@@ -14,6 +14,7 @@
 
 package org.apache.tapestry.components;
 
+import org.apache.tapestry.BaseComponentTestCase;
 import org.apache.tapestry.IBinding;
 import org.apache.tapestry.IComponent;
 import org.apache.tapestry.IMarkupWriter;

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestConditional.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestConditional.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestConditional.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestConditional.java Thu Sep  1 09:04:32 2005
@@ -14,6 +14,7 @@
 
 package org.apache.tapestry.components;
 
+import org.apache.tapestry.BaseComponentTestCase;
 import org.apache.tapestry.IBinding;
 import org.apache.tapestry.IMarkupWriter;
 import org.apache.tapestry.IRender;

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestIfElse.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestIfElse.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestIfElse.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestIfElse.java Thu Sep  1 09:04:32 2005
@@ -14,6 +14,7 @@
 
 package org.apache.tapestry.components;
 
+import org.apache.tapestry.BaseComponentTestCase;
 import org.apache.tapestry.IBinding;
 import org.apache.tapestry.IForm;
 import org.apache.tapestry.IMarkupWriter;

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestInsert.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestInsert.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestInsert.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestInsert.java Thu Sep  1 09:04:32 2005
@@ -20,6 +20,7 @@
 
 import org.apache.hivemind.ApplicationRuntimeException;
 import org.apache.hivemind.Location;
+import org.apache.tapestry.BaseComponentTestCase;
 import org.apache.tapestry.IBinding;
 import org.apache.tapestry.IMarkupWriter;
 import org.apache.tapestry.IPage;

Modified: jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestInvokeListener.java
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestInvokeListener.java?rev=265748&r1=265747&r2=265748&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestInvokeListener.java (original)
+++ jakarta/tapestry/trunk/framework/src/test/org/apache/tapestry/components/TestInvokeListener.java Thu Sep  1 09:04:32 2005
@@ -14,6 +14,7 @@
 
 package org.apache.tapestry.components;
 
+import org.apache.tapestry.BaseComponentTestCase;
 import org.apache.tapestry.IActionListener;
 import org.apache.tapestry.IMarkupWriter;
 import org.apache.tapestry.IRequestCycle;



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


Mime
View raw message