You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2007/02/11 20:05:35 UTC

svn commit: r506094 - in /tapestry/tapestry4/trunk: ./ src/site/ src/site/apt/ajax/ src/site/resources/images/ tapestry-examples/TimeTracker/src/context/WEB-INF/ tapestry-examples/TimeTracker/src/context/css/ tapestry-framework/src/descriptor/META-INF/...

Author: jkuhnert
Date: Sun Feb 11 11:05:33 2007
New Revision: 506094

URL: http://svn.apache.org/viewvc?view=rev&rev=506094
Log:
-) Updated root NOTICE file and referenced the inclusion of dojo javascript as well as placed a copy of the license
in the root dir.

-) Condensed some of the Tapestry js files down into one package for redundant things like event/core/html/etc .. as it 
costs too much to make the extra IO requests when it could be done in one go.

-) Found the reason why this unknown "tab_close.gif" file was being downloaded on every request and removed the
guilty code.

-) Added better server side debugging as well as a small guide. Fixes TAPESTRY-1260. 

-) Fixed new fx javascript unit tests references to dojo.lfx. 

Added:
    tapestry/tapestry4/trunk/LICENSE_DOJO.txt   (with props)
    tapestry/tapestry4/trunk/src/site/apt/ajax/debugging.apt
    tapestry/tapestry4/trunk/src/site/resources/images/ajax-firebug.png   (with props)
Removed:
    tapestry/tapestry4/trunk/tapestry-examples/TimeTracker/src/context/css/exception.css
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/event.js
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/html.js
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/lang.js
Modified:
    tapestry/tapestry4/trunk/NOTICE.txt
    tapestry/tapestry4/trunk/src/site/apt/ajax/index.apt
    tapestry/tapestry4/trunk/src/site/apt/ajax/responsebuilder.apt
    tapestry/tapestry4/trunk/src/site/site.xml
    tapestry/tapestry4/trunk/tapestry-examples/TimeTracker/src/context/WEB-INF/log4j.properties
    tapestry/tapestry4/trunk/tapestry-examples/TimeTracker/src/context/css/timetracker.css
    tapestry/tapestry4/trunk/tapestry-framework/src/descriptor/META-INF/tapestry.globals.xml
    tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/DojoAjaxResponseBuilder.java
    tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/dojo.js
    tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/iframe_history.html
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/fx.js
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tests/test_fx.js

Added: tapestry/tapestry4/trunk/LICENSE_DOJO.txt
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/LICENSE_DOJO.txt?view=auto&rev=506094
==============================================================================
--- tapestry/tapestry4/trunk/LICENSE_DOJO.txt (added)
+++ tapestry/tapestry4/trunk/LICENSE_DOJO.txt Sun Feb 11 11:05:33 2007
@@ -0,0 +1,195 @@
+Dojo is availble under *either* the terms of the modified BSD license *or* the
+Academic Free License version 2.1. As a recipient of Dojo, you may choose which
+license to receive this code under (except as noted in per-module LICENSE
+files). Some modules may not be the copyright of the Dojo Foundation. These
+modules contain explicit declarations of copyright in both the LICENSE files in
+the directories in which they reside and in the code itself. No external
+contributions are allowed under licenses which are fundamentally incompatible
+with the AFL or BSD licenses that Dojo is distributed under.
+
+The text of the AFL and BSD licenses is reproduced below. 
+
+-------------------------------------------------------------------------------
+The "New" BSD License:
+**********************
+
+Copyright (c) 2005-2006, The Dojo Foundation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+  * Redistributions of source code must retain the above copyright notice, this
+    list of conditions and the following disclaimer.
+  * Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+  * Neither the name of the Dojo Foundation nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------------------
+The Academic Free License, v. 2.1:
+**********************************
+
+This Academic Free License (the "License") applies to any original work of
+authorship (the "Original Work") whose owner (the "Licensor") has placed the
+following notice immediately following the copyright notice for the Original
+Work:
+
+Licensed under the Academic Free License version 2.1
+
+1) Grant of Copyright License. Licensor hereby grants You a world-wide,
+royalty-free, non-exclusive, perpetual, sublicenseable license to do the
+following:
+
+a) to reproduce the Original Work in copies;
+
+b) to prepare derivative works ("Derivative Works") based upon the Original
+Work;
+
+c) to distribute copies of the Original Work and Derivative Works to the
+public;
+
+d) to perform the Original Work publicly; and
+
+e) to display the Original Work publicly.
+
+2) Grant of Patent License. Licensor hereby grants You a world-wide,
+royalty-free, non-exclusive, perpetual, sublicenseable license, under patent
+claims owned or controlled by the Licensor that are embodied in the Original
+Work as furnished by the Licensor, to make, use, sell and offer for sale the
+Original Work and Derivative Works.
+
+3) Grant of Source Code License. The term "Source Code" means the preferred
+form of the Original Work for making modifications to it and all available
+documentation describing how to modify the Original Work. Licensor hereby
+agrees to provide a machine-readable copy of the Source Code of the Original
+Work along with each copy of the Original Work that Licensor distributes.
+Licensor reserves the right to satisfy this obligation by placing a
+machine-readable copy of the Source Code in an information repository
+reasonably calculated to permit inexpensive and convenient access by You for as
+long as Licensor continues to distribute the Original Work, and by publishing
+the address of that information repository in a notice immediately following
+the copyright notice that applies to the Original Work.
+
+4) Exclusions From License Grant. Neither the names of Licensor, nor the names
+of any contributors to the Original Work, nor any of their trademarks or
+service marks, may be used to endorse or promote products derived from this
+Original Work without express prior written permission of the Licensor. Nothing
+in this License shall be deemed to grant any rights to trademarks, copyrights,
+patents, trade secrets or any other intellectual property of Licensor except as
+expressly stated herein. No patent license is granted to make, use, sell or
+offer to sell embodiments of any patent claims other than the licensed claims
+defined in Section 2. No right is granted to the trademarks of Licensor even if
+such marks are included in the Original Work. Nothing in this License shall be
+interpreted to prohibit Licensor from licensing under different terms from this
+License any Original Work that Licensor otherwise would have a right to
+license.
+
+5) This section intentionally omitted.
+
+6) Attribution Rights. You must retain, in the Source Code of any Derivative
+Works that You create, all copyright, patent or trademark notices from the
+Source Code of the Original Work, as well as any notices of licensing and any
+descriptive text identified therein as an "Attribution Notice." You must cause
+the Source Code for any Derivative Works that You create to carry a prominent
+Attribution Notice reasonably calculated to inform recipients that You have
+modified the Original Work.
+
+7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
+the copyright in and to the Original Work and the patent rights granted herein
+by Licensor are owned by the Licensor or are sublicensed to You under the terms
+of this License with the permission of the contributor(s) of those copyrights
+and patent rights. Except as expressly stated in the immediately proceeding
+sentence, the Original Work is provided under this License on an "AS IS" BASIS
+and WITHOUT WARRANTY, either express or implied, including, without limitation,
+the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU.
+This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No
+license to Original Work is granted hereunder except under this disclaimer.
+
+8) Limitation of Liability. Under no circumstances and under no legal theory,
+whether in tort (including negligence), contract, or otherwise, shall the
+Licensor be liable to any person for any direct, indirect, special, incidental,
+or consequential damages of any character arising as a result of this License
+or the use of the Original Work including, without limitation, damages for loss
+of goodwill, work stoppage, computer failure or malfunction, or any and all
+other commercial damages or losses. This limitation of liability shall not
+apply to liability for death or personal injury resulting from Licensor's
+negligence to the extent applicable law prohibits such limitation. Some
+jurisdictions do not allow the exclusion or limitation of incidental or
+consequential damages, so this exclusion and limitation may not apply to You.
+
+9) Acceptance and Termination. If You distribute copies of the Original Work or
+a Derivative Work, You must make a reasonable effort under the circumstances to
+obtain the express assent of recipients to the terms of this License. Nothing
+else but this License (or another written agreement between Licensor and You)
+grants You permission to create Derivative Works based upon the Original Work
+or to exercise any of the rights granted in Section 1 herein, and any attempt
+to do so except under the terms of this License (or another written agreement
+between Licensor and You) is expressly prohibited by U.S. copyright law, the
+equivalent laws of other countries, and by international treaty. Therefore, by
+exercising any of the rights granted to You in Section 1 herein, You indicate
+Your acceptance of this License and all of its terms and conditions.
+
+10) Termination for Patent Action. This License shall terminate automatically
+and You may no longer exercise any of the rights granted to You by this License
+as of the date You commence an action, including a cross-claim or counterclaim,
+against Licensor or any licensee alleging that the Original Work infringes a
+patent. This termination provision shall not apply for an action alleging
+patent infringement by combinations of the Original Work with other software or
+hardware.
+
+11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this
+License may be brought only in the courts of a jurisdiction wherein the
+Licensor resides or in which Licensor conducts its primary business, and under
+the laws of that jurisdiction excluding its conflict-of-law provisions. The
+application of the United Nations Convention on Contracts for the International
+Sale of Goods is expressly excluded. Any use of the Original Work outside the
+scope of this License or after its termination shall be subject to the
+requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et
+seq., the equivalent laws of other countries, and international treaty. This
+section shall survive the termination of this License.
+
+12) Attorneys Fees. In any action to enforce the terms of this License or
+seeking damages relating thereto, the prevailing party shall be entitled to
+recover its costs and expenses, including, without limitation, reasonable
+attorneys' fees and costs incurred in connection with such action, including
+any appeal of such action. This section shall survive the termination of this
+License.
+
+13) Miscellaneous. This License represents the complete agreement concerning
+the subject matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent necessary to
+make it enforceable.
+
+14) Definition of "You" in This License. "You" throughout this License, whether
+in upper or lower case, means an individual or a legal entity exercising rights
+under, and complying with all of the terms of, this License. For legal
+entities, "You" includes any entity that controls, is controlled by, or is
+under common control with you. For purposes of this definition, "control" means
+(i) the power, direct or indirect, to cause the direction or management of such
+entity, whether by contract or otherwise, or (ii) ownership of fifty percent
+(50%) or more of the outstanding shares, or (iii) beneficial ownership of such
+entity.
+
+15) Right to Use. You may use the Original Work in all ways not otherwise
+restricted or conditioned by this License or by law, and Licensor promises not
+to interfere with or be responsible for such uses by You.
+
+This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved.
+Permission is hereby granted to copy and distribute this license without
+modification. This license may not be modified without the express written
+permission of its copyright owner.

Propchange: tapestry/tapestry4/trunk/LICENSE_DOJO.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: tapestry/tapestry4/trunk/NOTICE.txt
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/NOTICE.txt?view=diff&rev=506094&r1=506093&r2=506094
==============================================================================
--- tapestry/tapestry4/trunk/NOTICE.txt (original)
+++ tapestry/tapestry4/trunk/NOTICE.txt Sun Feb 11 11:05:33 2007
@@ -1,2 +1,5 @@
 This product includes software developed by
 The Apache Software Foundation (http://www.apache.org/).
+
+This product additionally includes script code developed by the Dojo Foundation under 
+the Academic free license or BSD license. (http://opensource.org/licenses/afl-2.1.php , http://opensource.org/licenses/bsd-license.php).

Added: tapestry/tapestry4/trunk/src/site/apt/ajax/debugging.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/apt/ajax/debugging.apt?view=auto&rev=506094
==============================================================================
--- tapestry/tapestry4/trunk/src/site/apt/ajax/debugging.apt (added)
+++ tapestry/tapestry4/trunk/src/site/apt/ajax/debugging.apt Sun Feb 11 11:05:33 2007
@@ -0,0 +1,64 @@
+ ------
+Ajax/DHTML Guide - Debugging
+ ------
+Jesse Kuhnert
+ ------
+11 February 2007
+ ------
+ 
+Server Side Debugging
+
+  There are of course a variety of debugging methods / options you can employ, but the easiest thing to do when getting going initially may 
+  be to turn on two key logging categories in your logging configuration file of choice. This example shows how to turn on debugging using
+  log4j configurations:
+  
++-----------------------------------------------------------
+log4j.rootLogger=DEBUG, A1
+
+# A1 is set to be a ConsoleAppender. 
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%c{1} [%p] %m%n
+
+log4j.logger.tapestry.globals.ResponseBuilder=DEBUG
+log4j.logger.org.apache.tapestry.services.impl.DojoAjaxResponseBuilder=DEBUG
++-----------------------------------------------------------
+
+  This simple configuration example should be enough to turn on an enormous amount of detail on the inner workings of the 
+  {{{../apidocs/org/apache/tapestry/services/ResponseBuilder.html}ResponseBuilder}} service. The global ResponseBuilder hivemind service
+  already comes pre-configured with the hivemind {{{http://hivemind.apache.org/hivemind1/hivemind/LoggingInterceptor.html}logging interceptor}} 
+  service, so you should be able to watch as each of the core methods on that interface are invoked.
+  
+Client Side Debugging
+
+  First and foremost, if you don't have the {{{http://getfirebug.com/}FireBug}} firefox extension installed - {{{http://getfirebug.com/}get it now}}. Using
+  this plugin alone should give you a plethora of useful debugging information. Tapestry/Dojo also make good use of some of the core functionality exposed
+  by this plugin in client side debugging facilities, so there is even greater incentive to check it out.
+  
+* Configuration
+
+  The logging facilities employed on the client side work in much the same way as the standard log4j style logging semantics many people are used to. The options
+  for turning this kind of logging on / configuration can all be controlled through the {{{../components/general/shell.html}Shell}} or ScriptIncludes components - 
+  whichever you use in your projects. 
+  
+  There are 3 core configuration parameters to these components that control the majority of logic here:
+  
+  * <<browserLogLevel>> - Sets the default browser based javascript log level to use to debug client side interactions. If you specify an html element id to 
+  						  place the debug content it will be written there. Otherwise, the default is to write to an element with id "debug", or append to the 
+  						  document body if none exists.
+  						  
+  						  See the dojo docs for more information about logging, but the basic idea is that you can write statements like <<<dojo.log.info("Doing some operation");>>>
+  						  in javascript and have them appropriately filtered based on the log level.
+  
+  * <<debugEnabled>> - Turns browser level logging completely on/off.
+  
+  * <<consoleEnabled>> - Enables/disables the <<<dojo.debug.console>>> functionality which should redirect most logging messages to your browsers javascript console <(if it supports one)>.
+  						 
+  						 The debug console is disabled by default. Currently known supported browsers are FireFox<(having FireBug extension helps a great deal)>/Opera/Safari.  
+
+* Sample
+
+  Following is a sample screenshot of the kind of debugging statements you'll find in debug mode from the {{{../demos.html}TimeTracker demo}}.
+  
+[/images/ajax-firebug.png] Sample firebug output with console debugging enabled.
\ No newline at end of file

Modified: tapestry/tapestry4/trunk/src/site/apt/ajax/index.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/apt/ajax/index.apt?view=diff&rev=506094&r1=506093&r2=506094
==============================================================================
--- tapestry/tapestry4/trunk/src/site/apt/ajax/index.apt (original)
+++ tapestry/tapestry4/trunk/src/site/apt/ajax/index.apt Sun Feb 11 11:05:33 2007
@@ -9,5 +9,5 @@
 Introduction
 
   This section of the site is definitely a work in progress, but for now most people will find
-  the {{{EventListener.html}EventListener}} documentation particularly helpful.
+  the {{{eventlistener.html}EventListener}} documentation particularly helpful.
   

Modified: tapestry/tapestry4/trunk/src/site/apt/ajax/responsebuilder.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/apt/ajax/responsebuilder.apt?view=diff&rev=506094&r1=506093&r2=506094
==============================================================================
--- tapestry/tapestry4/trunk/src/site/apt/ajax/responsebuilder.apt (original)
+++ tapestry/tapestry4/trunk/src/site/apt/ajax/responsebuilder.apt Sun Feb 11 11:05:33 2007
@@ -11,7 +11,7 @@
   One of the largest changes made to Tapestry 4.1 was the rendering cycle. Traditionally, responses were made
   using one basic {{{../apidocs/org/apache/tapestry/IMarkupWriter.html}IMarkupWriter}} instance
   to capture and render output back to the browser. <(this isn't entirely true, NullWriter instances are used 
-  in some instances, like rewinding {{{../components/Form.html}Form}} components)>
+  in some instances, like rewinding {{{../components/form/form.html}Form}} components)>
   
   The new method looks basically the same on the surface, but rendering output is now managed by specific
   {{{../apidocs/org/apache/tapestry/services/ResponseBuilder.html}ResponseBuilder}} instances,

Added: tapestry/tapestry4/trunk/src/site/resources/images/ajax-firebug.png
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/resources/images/ajax-firebug.png?view=auto&rev=506094
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry4/trunk/src/site/resources/images/ajax-firebug.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Modified: tapestry/tapestry4/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/site.xml?view=diff&rev=506094&r1=506093&r2=506094
==============================================================================
--- tapestry/tapestry4/trunk/src/site/site.xml (original)
+++ tapestry/tapestry4/trunk/src/site/site.xml Sun Feb 11 11:05:33 2007
@@ -82,6 +82,7 @@
             
             <item name="XHR/DHTML Guide" href="/ajax/index.html" collapse="true">
                 <item name="Introduction" href="/ajax/index.html" />
+                <item name="Debugging" href="/ajax/debugging.html" />
                 <item name="EventListener" href="/ajax/eventlistener.html" />
                 <item name="ResponseBuilder" href="/ajax/responsebuilder.html" />
             </item>

Modified: tapestry/tapestry4/trunk/tapestry-examples/TimeTracker/src/context/WEB-INF/log4j.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/TimeTracker/src/context/WEB-INF/log4j.properties?view=diff&rev=506094&r1=506093&r2=506094
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/TimeTracker/src/context/WEB-INF/log4j.properties (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/TimeTracker/src/context/WEB-INF/log4j.properties Sun Feb 11 11:05:33 2007
@@ -31,3 +31,6 @@
 log4j.logger.org.apache.tapestry.timetracker=DEBUG
 log4j.logger.org.apache.tapestry.form=DEBUG
 log4j.logger.org.apache.tapestry.form.FormSupportImpl=DEBUG
+
+#log4j.logger.tapestry.globals.ResponseBuilder=DEBUG
+#log4j.logger.org.apache.tapestry.services.impl.DojoAjaxResponseBuilder=DEBUG

Modified: tapestry/tapestry4/trunk/tapestry-examples/TimeTracker/src/context/css/timetracker.css
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/TimeTracker/src/context/css/timetracker.css?view=diff&rev=506094&r1=506093&r2=506094
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-examples/TimeTracker/src/context/css/timetracker.css (original)
+++ tapestry/tapestry4/trunk/tapestry-examples/TimeTracker/src/context/css/timetracker.css Sun Feb 11 11:05:33 2007
@@ -1,7 +1,6 @@
 @import url("undohtml.css");  /* CSS to undo some default browser css that gets in the way more than it helps */
 @import url("dojo.css");
 @import url("forms.css");
-@import url("exception.css");
 
 body {
     width: auto;
@@ -89,4 +88,37 @@
     float:left;
     clear:both;
     width:95%;
+}
+
+.exceptionDialog {
+    overflow: auto;
+    display: block;
+    margin-left: 5%;
+    margin-right: 5%;
+    height: 500px;
+    background-color: white;
+    border-left: 2px solid #E07000;
+    border-right: 2px solid #E07000;
+    border-bottom: 2px solid #E07000;
+    -moz-border-radius-bottomright: 10px;
+    -moz-border-radius-bottomleft: 10px;
+}
+
+.exceptionCloseLink {
+    display: block;
+    margin-left: 5%;
+    margin-right: 5%;
+    background-color: ThreeDFace;
+    padding-top: 3px;
+    padding-left: 5px;
+    padding-bottom: 3px;
+    font-weight: bold;
+    color: #000000;
+    cursor: pointer;
+    cursor: hand;
+    border-left: 2px solid #E07000;
+    border-right: 2px solid #E07000;
+    border-top: 2px solid #E07000;
+    -moz-border-radius-topright: 10px;
+    -moz-border-radius-topleft: 10px;
 }

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/descriptor/META-INF/tapestry.globals.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/descriptor/META-INF/tapestry.globals.xml?view=diff&rev=506094&r1=506093&r2=506094
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/descriptor/META-INF/tapestry.globals.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/descriptor/META-INF/tapestry.globals.xml Sun Feb 11 11:05:33 2007
@@ -47,6 +47,9 @@
     <invoke-factory service-id="hivemind.lib.ServicePropertyFactory">
         <construct service-id="RequestGlobals" property="responseBuilder"/>
     </invoke-factory> 
+    
+    <interceptor service-id="hivemind.LoggingInterceptor" />
+    
   </service-point>
   
   <service-point id="HttpServletRequest" interface="javax.servlet.http.HttpServletRequest">

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/DojoAjaxResponseBuilder.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/DojoAjaxResponseBuilder.java?view=diff&rev=506094&r1=506093&r2=506094
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/DojoAjaxResponseBuilder.java (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/DojoAjaxResponseBuilder.java Sun Feb 11 11:05:33 2007
@@ -21,6 +21,8 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.hivemind.Resource;
 import org.apache.hivemind.util.Defense;
 import org.apache.tapestry.IAsset;
@@ -53,10 +55,11 @@
  * types into easy to manage xml elements that can then be interpreted and managed by 
  * running client-side javascript.
  * 
- * @author jkuhnert
  */
 public class DojoAjaxResponseBuilder implements ResponseBuilder
 {
+    private static final Log _log = LogFactory.getLog(DojoAjaxResponseBuilder.class);
+    
     private final AssetFactory _assetFactory;
     
     private final String _namespace;
@@ -170,8 +173,7 @@
     {
         _localeManager.persistLocale();
         
-        _contentType = new ContentType(CONTENT_TYPE
-                + ";charset=" + cycle.getInfrastructure().getOutputEncoding());
+        _contentType = new ContentType(CONTENT_TYPE + ";charset=" + cycle.getInfrastructure().getOutputEncoding());
         
         String encoding = _contentType.getParameter(ENCODING_KEY);
         
@@ -614,6 +616,8 @@
         // write out captured content
         
         Iterator keys = _writers.keySet().iterator();
+        String buffer = null;
+        
         while (keys.hasNext()) {
             
             String key = (String)keys.next();
@@ -621,10 +625,17 @@
             
             nw.end();
             
+            buffer = nw.getBuffer();
+            
+            if (_log.isDebugEnabled()) {
+                
+                _log.debug("Ajax markup buffer for key <" + key + " contains: " + buffer);
+            }
+            
             if (!isScriptWriter(key))
-                _writer.printRaw(ScriptUtils.ensureValidScriptTags(nw.getBuffer()));
+                _writer.printRaw(ScriptUtils.ensureValidScriptTags(buffer));
             else
-                _writer.printRaw(nw.getBuffer());
+                _writer.printRaw(buffer);
         }
         
         // end response

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/dojo.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/dojo.js?view=diff&rev=506094&r1=506093&r2=506094
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/dojo.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/dojo.js Sun Feb 11 11:05:33 2007
@@ -816,7 +816,7 @@
 return _47e;},getPreviousSibling:function(){var idx=this.getParentIndex();if(idx<=0){return null;}
 return this.parent.children[idx-1];},getSiblings:function(){return this.parent.children;},getParentIndex:function(){return dojo.lang.indexOf(this.parent.children,this,true);},getNextSibling:function(){var idx=this.getParentIndex();if(idx==this.parent.children.length-1){return null;}
 if(idx<0){return null;}
-return this.parent.children[idx+1];}});dojo.widget.lcArgsCache={};dojo.widget.tags={};dojo.widget.tags["dojo:propertyset"]=function(_482,_483,_484){var _485=_483.parseProperties(_482["dojo:propertyset"]);};dojo.widget.tags["dojo:connect"]=function(_486,_487,_488){var _489=_487.parseProperties(_486["dojo:connect"]);};dojo.widget.buildWidgetFromParseTree=function(type,frag,_48c,_48d,_48e,_48f){dojo.a11y.setAccessibleMode();var _490=type.split(":");_490=(_490.length==2)?_490[1]:type;var _491=_48f||_48c.parseProperties(frag[frag["ns"]+":"+_490]);var _492=dojo.widget.manager.getImplementation(_490,null,null,frag["ns"]);if(!_492){throw new Error("cannot find \""+type+"\" widget");}else{if(!_492.create){throw new Error("\""+type+"\" widget object has no \"create\" method and does not appear to implement *Widget");}}
+return this.parent.children[idx+1];}});dojo.widget.lcArgsCache={};dojo.widget.tags={};dojo.widget.tags["dojo:propertyset"]=function(_482,_483,_484){var _485=_483.parseProperties(_482["dojo:propertyset"]);};dojo.widget.tags["dojo:connect"]=function(_486,_487,_488){var _489=_487.parseProperties(_486["dojo:connect"]);};dojo.widget.buildWidgetFromParseTree=function(type,frag,_48c,_48d,_48e,_48f){var _490=type.split(":");_490=(_490.length==2)?_490[1]:type;var _491=_48f||_48c.parseProperties(frag[frag["ns"]+":"+_490]);var _492=dojo.widget.manager.getImplementation(_490,null,null,frag["ns"]);if(!_492){throw new Error("cannot find \""+type+"\" widget");}else{if(!_492.create){throw new Error("\""+type+"\" widget object has no \"create\" method and does not appear to implement *Widget");}}
 _491["dojoinsertionindex"]=_48e;var ret=_492.create(_491,frag,_48d,frag["ns"]);return ret;};dojo.widget.defineWidget=function(_494,_495,_496,init,_498){if(dojo.lang.isString(arguments[3])){dojo.widget._defineWidget(arguments[0],arguments[3],arguments[1],arguments[4],arguments[2]);}else{var args=[arguments[0]],p=3;if(dojo.lang.isString(arguments[1])){args.push(arguments[1],arguments[2]);}else{args.push("",arguments[1]);p=2;}
 if(dojo.lang.isFunction(arguments[p])){args.push(arguments[p],arguments[p+1]);}else{args.push(null,arguments[p]);}
 dojo.widget._defineWidget.apply(this,args);}};dojo.widget.defineWidget.renderers="html|svg|vml";dojo.widget._defineWidget=function(_49b,_49c,_49d,init,_49f){var _4a0=_49b.split(".");var type=_4a0.pop();var regx="\\.("+(_49c?_49c+"|":"")+dojo.widget.defineWidget.renderers+")\\.";var r=_49b.search(new RegExp(regx));_4a0=(r<0?_4a0.join("."):_49b.substr(0,r));dojo.widget.manager.registerWidgetPackage(_4a0);var pos=_4a0.indexOf(".");var _4a5=(pos>-1)?_4a0.substring(0,pos):_4a0;_49f=(_49f)||{};_49f.widgetType=type;if((!init)&&(_49f["classConstructor"])){init=_49f.classConstructor;delete _49f.classConstructor;}

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/iframe_history.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/iframe_history.html?view=diff&rev=506094&r1=506093&r2=506094
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/iframe_history.html (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/iframe_history.html Sun Feb 11 11:05:33 2007
@@ -1,6 +1,5 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
 	<title></title>

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js?view=diff&rev=506094&r1=506093&r2=506094
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js Sun Feb 11 11:05:33 2007
@@ -1,7 +1,11 @@
 dojo.provide("tapestry.core");
+dojo.provide("tapestry.html");
+dojo.provide("tapestry.event");
+dojo.provide("tapestry.lang");
 
+dojo.require("dojo.lang.common");
 dojo.require("dojo.logging.Logger");
-dojo.require("dojo.io.*");
+dojo.require("dojo.io.BrowserIO");
 dojo.require("dojo.event.browser");
 dojo.require("dojo.widget.*");
 dojo.require("dojo.widget.Dialog");
@@ -18,7 +22,7 @@
 	
 	// property: version 
 	// The current client side library version, usually matching the current java library version. (ie 4.1, etc..)
-	version:"4.1",
+	version:"4.1.2",
 	scriptInFlight:false, // whether or not javascript is currently being eval'd, default false
 	ScriptFragment:'(?:<script.*?>)((\n|.|\r)*?)(?:<\/script>)', // regexp for script elements
 	
@@ -358,4 +362,253 @@
 	}
 }
 
-dojo.require("tapestry.html");
+/**
+ * package: tapestry.html
+ * Provides functionality related to parsing and rendering dom nodes.
+ */
+tapestry.html={
+    
+    TextareaMatcher:'<textarea(.*?)/>', // regexp for compact textarea elements
+    TextareaReplacer:'<textarea$1></textarea>', // replace pattern for compact textareas
+	
+    /**
+	 * Function: getContentAsString
+	 * 
+	 * Takes a dom node and returns its contents rendered in a string.
+     *
+     * The resulting string does NOT contain any markup (or attributes) of
+     * the given node - only child nodes are rendered and returned.Content
+     *
+     * Implementation Note: This function tries to make use of browser 
+     * specific features (the xml attribute of nodes in IE and the XMLSerializer
+     * object in Mozilla derivatives) - if those fails, a generic implementation
+     * is used that is guaranteed to work in all platforms.
+	 * 
+	 * Parameters: 
+	 * 
+	 *	node - The dom node.
+	 * Returns:
+	 * 
+	 * The string representation of the given node's contents.
+	 */    
+	getContentAsString:function(node){
+		if (typeof node.xml != "undefined")
+			return this._getContentAsStringIE(node);
+		else if (typeof XMLSerializer != "undefined" )
+			return this._getContentAsStringMozilla(node);
+		else
+			return this._getContentAsStringGeneric(node);
+	},        
+	
+   /**
+	 * Function: getElementAsString
+	 * 
+	 * Takes a dom node and returns itself and its contents rendered in a string.
+     *
+     * Implementation Note: This function uses a generic implementation in order
+     * to generate the returned string.
+	 * 
+	 * Parameters: 
+	 * 
+	 *	node - The dom node.
+	 * Returns:
+	 * 
+	 * The string representation of the given node.
+	 */         
+	getElementAsString:function(node){
+		if (!node) { return ""; }
+		
+		var s='<' + node.nodeName;
+		// add attributes
+		if (node.attributes && node.attributes.length > 0) {
+			for (var i=0; i < node.attributes.length; i++) {
+				s += " " + node.attributes[i].name + "=\"" + node.attributes[i].value + "\"";	
+			}
+		}
+		// close start tag
+		s += '>';
+		// content of tag
+		s += this._getContentAsStringGeneric(node);
+		// end tag
+		s += '</' + node.nodeName + '>';
+		return s;
+	},        
+
+	_getContentAsStringIE:function(node){
+		var s="";
+    	for (var i = 0; i < node.childNodes.length; i++)
+        	s += node.childNodes[i].xml;
+    	return s;
+	},
+	
+	_getContentAsStringMozilla:function(node){
+		var xmlSerializer = new XMLSerializer();
+	    var s = "";
+	    for (var i = 0; i < node.childNodes.length; i++) {
+	        s += xmlSerializer.serializeToString(node.childNodes[i]);
+	        if (s == "undefined")
+		        return this._getContentAsStringGeneric(node);
+	    }
+	    
+        s = this._processTextareas(s);
+        
+	    return s;
+	},
+	
+	_getContentAsStringGeneric:function(node){
+		var s="";
+		if (node == null) { return s; }
+		for (var i = 0; i < node.childNodes.length; i++) {
+			switch (node.childNodes[i].nodeType) {
+				case 1: // ELEMENT_NODE
+				case 5: // ENTITY_REFERENCE_NODE
+					s += this.getElementAsString(node.childNodes[i]);
+					break;
+				case 3: // TEXT_NODE
+				case 2: // ATTRIBUTE_NODE
+				case 4: // CDATA_SECTION_NODE
+					s += node.childNodes[i].nodeValue;
+					break;
+				default:
+					break;
+			}
+		}
+		return s;	
+	},
+
+	_processTextareas:function(htmlData)
+ 	{
+        var match = new RegExp(tapestry.html.TextareaMatcher);
+        while (htmlData.match(match)){
+            htmlData = htmlData.replace(match, tapestry.html.TextareaReplacer);
+        }
+        return htmlData;
+ 	}
+}
+
+/**
+ * package: tapestry.event
+ * 
+ * Utility functions that handle converting javascript event objects into 
+ * a name/value pair format that can be sent to the remote server.
+ */
+tapestry.event={
+	
+	/**
+	 * Function: buildEventProperties
+	 * 
+	 * Takes an incoming browser generated event (like key/mouse events) and
+	 * creates a js object holding the basic values of the event in order for 
+	 * it to be submitted to the server.
+	 * 
+	 * Parameters: 
+	 * 
+	 *	event - The javascript event method is based on, if it isn't a valid
+	 * 				browser event it will be ignored.
+	 *	props - The existing property object to set the values on, if it doesn't
+	 * 				exist one will be created.
+	 * Returns:
+	 * 
+	 * The desired event properties bound to an object. Ie obj.target,obj.charCode, etc..
+	 */
+	buildEventProperties:function(event, props){
+		if (!dojo.event.browser.isEvent(event)) return {};
+		if (!props) props={};
+		
+		if(event["type"]) props.beventtype=event.type;
+		if(event["keys"]) props.beventkeys=event.keys;
+		if(event["charCode"]) props.beventcharCode=event.charCode;
+		if(event["pageX"]) props.beventpageX=event.pageX;
+		if(event["pageY"]) props.beventpageY=event.pageY;
+		if(event["layerX"]) props.beventlayerX=event.layerX;
+		if(event["layerY"]) props.beventlayerY=event.layerY;
+		
+		if (event["target"]) this.buildTargetProperties(props, event.target);
+		
+		return props;
+	},
+	
+	/**
+	 * Function: buildTargetProperties
+	 * 
+	 * Generic function to build a properties object populated with
+	 * relevent target data.
+	 * 
+	 * Parameters:
+	 * 	
+	 * 	props - The object that event properties are being set on to return to
+	 * 			the server.
+	 * 	target - The javscript Event.target object that the original event was targeted for.
+	 * 
+	 * Returns:
+	 * 	The original props object passed in, populated with any data found.
+	 */
+	buildTargetProperties:function(props, target){
+		if(!target) { return; }
+		
+		if (dojo.dom.isNode(target)) {
+			return this.buildNodeProperties(props, target);
+		} else {
+			dojo.raise("buildTargetProperties() Unknown target type:" + target);
+		}
+	},
+	
+	/**
+	 * Function: buildNodeProperties
+	 * 
+	 * Builds needed target node properties, like the node's id.
+	 * 
+	 * Parameters:
+	 * 	props - The object that event properties are being set on to return to
+	 * 			the server.
+	 * 	node - The dom node specified as the Event.target in a javascript event.
+	 */
+	buildNodeProperties:function(props, node) {
+		if (node.getAttribute("id")) {
+			props["beventtarget.id"]=node.getAttribute("id");
+		}
+	}
+}
+
+tapestry.lang = {
+
+	/**
+	 * Searches the specified list for an object with a matching propertyName/value pair. 
+	 * @param list 			The array of objects to search.
+	 * @param properyName	The object property key to match on. (ie object[propertyName]) 
+	 * 			Can also be a template object to match in the form of {key:{key:value}} nested
+	 * 			as deeply as you like. 
+	 * @param value 		The value to be matched against
+	 * @return The matching array object found, or null.
+	 */
+	find:function(list, property, value){
+		if (!list || !property || list.length < 1) return null;
+		
+		// if not propMatch then template object was passed in
+		var propMatch=dojo.lang.isString(property);
+		if (propMatch && !value) return null; //if doing string/other non template match and no value
+		
+		for (var i=0; i < list.length; i++) {
+			if (!list[i]) continue;
+			if (propMatch) {
+				if (list[i] && list[i][property] && list[i][property] == value) return list[i];
+			} else {
+				if (this.matchProperty(property, list[i])) return list[i];
+			}
+		}
+		return null;
+	},
+	
+	// called recursively to match object properties
+	// partially stolen logic from dojo.widget.html.SortableTable.sort
+	matchProperty:function(template, object){
+		if(!dojo.lang.isObject(template) || !dojo.lang.isObject(object))
+			return template.valueOf() == object.valueOf();
+		
+		for(var p in template){
+			if(!(p in object)) return false;	//	boolean
+			if (!this.matchProperty(template[p], object[p])) return false;
+		}
+		return true;
+	}
+}
\ No newline at end of file

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/fx.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/fx.js?view=diff&rev=506094&r1=506093&r2=506094
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/fx.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/fx.js Sun Feb 11 11:05:33 2007
@@ -127,4 +127,4 @@
             return miObj.proceed();
         }        
     }
-}
\ No newline at end of file
+}

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/tests/test_fx.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tests/test_fx.js?view=diff&rev=506094&r1=506093&r2=506094
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/tests/test_fx.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/tests/test_fx.js Sun Feb 11 11:05:33 2007
@@ -1,7 +1,7 @@
 dojo.registerModulePath("tapestry", "../tapestry");
 
 dojo.require("tapestry.fx");
-dojo.require("dojo.lfx");
+dojo.require("dojo.lfx.html");
 
 function test_preEffects(){
     
@@ -9,7 +9,7 @@
         
         jum.assertTrue(dojo.lang.isEmpty(tapestry.fx.preEffects));
         
-        var animation = dojo.lfx.wipeIn();
+        var animation = dojo.lfx.html.wipeIn();
         
         tapestry.fx.attachPreEffect("div1", animation);
         
@@ -25,7 +25,7 @@
         
         jum.assertTrue(dojo.lang.isEmpty(tapestry.fx.postEffects));
         
-        tapestry.fx.attachPostEffect("div1", dojo.lfx.wipeIn());
+        tapestry.fx.attachPostEffect("div1", dojo.lfx.html.wipeIn());
         
         jum.assertFalse(dojo.lang.isEmpty(tapestry.fx.postEffects));
 }