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

svn commit: r630342 - in /tapestry/tapestry5/trunk: tapestry-core/ tapestry-core/src/main/java/org/apache/tapestry/corelib/components/ tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/ tapestry-core/src/main/resources/org/apache/...

Author: hlship
Date: Fri Feb 22 14:47:26 2008
New Revision: 630342

URL: http://svn.apache.org/viewvc?rev=630342&view=rev
Log:
TAPESTRY-2172: DateField component shows up misplaced in major browsers

Added:
    tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/
    tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/
    tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/bg.gif   (with props)
    tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/bottom.gif   (with props)
    tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/footer.gif   (with props)
    tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/header.gif   (with props)
    tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/rightbig.gif   (with props)
    tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/rightsmall.gif   (with props)
    tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/index.html   (with props)
    tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/style.css   (with props)
Modified:
    tapestry/tapestry5/trunk/tapestry-core/LICENSE.txt
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/DateField.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/DateField.xdoc
    tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/datefield.js
    tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/scriptaculous_1_8/prototype.js
    tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/ajax.apt
    tapestry/tapestry5/trunk/tapestry-core/src/test/app1/SecurityAlert.tml
    tapestry/tapestry5/trunk/tapestry-core/src/test/app1/css/app.css
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/IntegrationTests.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/components/Border.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry/integration/app1/components/Border.tml
    tapestry/tapestry5/trunk/tapestry-ioc/LICENSE.txt

Modified: tapestry/tapestry5/trunk/tapestry-core/LICENSE.txt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/LICENSE.txt?rev=630342&r1=630341&r2=630342&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/LICENSE.txt (original)
+++ tapestry/tapestry5/trunk/tapestry-core/LICENSE.txt Fri Feb 22 14:47:26 2008
@@ -210,8 +210,8 @@
 JAVASSIST
 
 Javassist is not bundled with tapestry-core, but tapestry-core is not functional without Javassist.
-Javassist is bundled under a dual license: Mozilla Public License when distributed outside of JBoss,
-LGPL when distributed as part of JBoss.
+Javassist is distributed under a dual license: Mozilla Public License or LGPL (Lesser Gnu Public License). Tapestry
+invokes the MPL for compatibility with the Apache Software License.
 
 MOZILLA PUBLIC LICENSE
 Version 1.1

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/DateField.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/DateField.java?rev=630342&r1=630341&r2=630342&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/DateField.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/DateField.java Fri Feb 22 14:47:26 2008
@@ -34,12 +34,12 @@
 import java.util.Locale;
 
 /**
- * A component used to collect a provided date from the user. This is a wrapper around the LGPL <a
- * href="http://www.dynarch.com/projects/calendar/">dynarch.com DHTML/JavaScript Calendar</a>.
+ * A component used to collect a provided date from the user using a client-side JavaScript calendar. Non-JavaScript
+ * clients can simply type into a text field..
  */
 // TODO: More testing; see https://issues.apache.org/jira/browse/TAPESTRY-1844
 @IncludeStylesheet("${tapestry.datepicker}/css/datepicker.css")
-@IncludeJavaScriptLibrary({"${tapestry.datepicker}/js/datepicker.js", "datefield.js"})
+@IncludeJavaScriptLibrary({ "${tapestry.datepicker}/js/datepicker.js", "datefield.js" })
 public class DateField extends AbstractField
 {
     /**
@@ -89,8 +89,8 @@
     private final DateFormat _outputFormat = new SimpleDateFormat("MM/dd/yyyy");
 
     /**
-     * When the user types a value, they may only type two digits for the year; SimpleDateFormat
-     * will do something reasonable.  If they use the popup, it will be unambiguously 4 digits.
+     * When the user types a value, they may only type two digits for the year; SimpleDateFormat will do something
+     * reasonable.  If they use the popup, it will be unambiguously 4 digits.
      */
     private final DateFormat _inputFormat = new SimpleDateFormat("MM/dd/yy");
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/DateField.xdoc
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/DateField.xdoc?rev=630342&r1=630341&r2=630342&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/DateField.xdoc (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/DateField.xdoc Fri Feb 22 14:47:26 2008
@@ -1,5 +1,6 @@
 <document>
     <body>
+
         <section name="Related Components">
             <ul>
                 <li>
@@ -53,6 +54,14 @@
                 <code><![CDATA[<t:datefield>]]></code>
                 element is all that's really necessary.
             </p>
+        </section>
+
+        <section name="Notes">
+
+            <p>The DateField component is based on the open source
+            <a href="http://webfx.eae.net/dhtml/datepicker/usage.html">WebFX DatePicker</a>
+            widget.
+
         </section>
     </body>
 </document>

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/datefield.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/datefield.js?rev=630342&r1=630341&r2=630342&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/datefield.js (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/corelib/components/datefield.js Fri Feb 22 14:47:26 2008
@@ -84,10 +84,12 @@
     {
         this.datePicker = new DatePicker();
 
-        this.popup = this.datePicker.create().hide().absolutize();
+        this.popup = $(this.datePicker.create());
 
         this.field.insert({ after : this.popup });
 
+        this.popup.absolutize().hide();
+
         this.datePicker.onselect = function()
         {
             this.field.value = this.formatDate(this.datePicker.getDate());
@@ -109,17 +111,17 @@
 
     positionPopup : function()
     {
-        var fieldPos = this.field.positionedOffset();
+        this.popup.clonePosition(this.field, { offsetTop: this.field.getHeight() + 2 }).setStyle({ width: "", height: "" });
+    },
 
-        var height = this.field.getHeight();
+    /** Duration used when fading the popup in or out. */
 
-        this.popup.setStyle({ top: fieldPos.top + height + 2 + "px", left: fieldPos.left, width: "", height: "" });
-    },
+    FADE_DURATION : .20,
 
     hidePopup : function()
     {
 
-        new Effect.Fade(this.popup, { duration: .20 });
+        new Effect.Fade(this.popup, { duration: this.FADE_DURATION });
     },
 
     revealPopup : function()
@@ -133,7 +135,7 @@
             Tapestry.DateField.activeDateField.hidePopup();
         }
 
-        new Effect.Appear(this.popup, { duration: .20 });
+        new Effect.Appear(this.popup, { duration: this.FADE_DURATION });
 
         Tapestry.DateField.activeDateField = this;
     }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/scriptaculous_1_8/prototype.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/scriptaculous_1_8/prototype.js?rev=630342&r1=630341&r2=630342&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/scriptaculous_1_8/prototype.js (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry/scriptaculous_1_8/prototype.js Fri Feb 22 14:47:26 2008
@@ -1,5 +1,5 @@
-/*  Prototype JavaScript framework, version 1.6.0.2
- *  (c) 2005-2008 Sam Stephenson
+/*  Prototype JavaScript framework, version 1.6.0.1
+ *  (c) 2005-2007 Sam Stephenson
  *
  *  Prototype is freely distributable under the terms of an MIT-style license.
  *  For details, see the Prototype web site: http://www.prototypejs.org/
@@ -7,7 +7,7 @@
  *--------------------------------------------------------------------------*/
 
 var Prototype = {
-    Version: '1.6.0.2',
+    Version: '1.6.0.1',
 
     Browser: {
         IE:     !!(window.attachEvent && !window.opera),
@@ -136,7 +136,7 @@
         {
             if (Object.isUndefined(object)) return 'undefined';
             if (object === null) return 'null';
-            return object.inspect ? object.inspect() : String(object);
+            return object.inspect ? object.inspect() : object.toString();
         }
         catch (e)
         {
@@ -209,8 +209,7 @@
 
     isArray: function(object)
     {
-        return object != null && typeof object == "object" &&
-               'splice' in object && 'join' in object;
+        return object && object.constructor === Array;
     },
 
     isHash: function(object)
@@ -713,7 +712,7 @@
             }
 
             return before + String.interpret(ctx);
-        });
+        }.bind(this));
     }
 });
 Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
@@ -988,22 +987,22 @@
 {
     if (!iterable) return [];
     if (iterable.toArray) return iterable.toArray();
-    var length = iterable.length || 0, results = new Array(length);
+    var length = iterable.length, results = new Array(length);
     while (length--) results[length] = iterable[length];
     return results;
 }
 
 if (Prototype.Browser.WebKit)
 {
-    $A = function(iterable)
+    function $A(iterable)
     {
         if (!iterable) return [];
         if (!(Object.isFunction(iterable) && iterable == '[object NodeList]') &&
             iterable.toArray) return iterable.toArray();
-        var length = iterable.length || 0, results = new Array(length);
+        var length = iterable.length, results = new Array(length);
         while (length--) results[length] = iterable[length];
         return results;
-    };
+    }
 }
 
 Array.from = $A;
@@ -1603,7 +1602,7 @@
 
             var contentType = response.getHeader('Content-type');
             if (this.options.evalJS == 'force'
-                    || (this.options.evalJS && this.isSameOrigin() && contentType
+                    || (this.options.evalJS && contentType
                     && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
                 this.evalResponse();
         }
@@ -1625,21 +1624,11 @@
         }
     },
 
-    isSameOrigin: function()
-    {
-        var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
-        return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
-            protocol: location.protocol,
-            domain: document.domain,
-            port: location.port ? ':' + location.port : ''
-        }));
-    },
-
     getHeader: function(name)
     {
         try
         {
-            return this.transport.getResponseHeader(name) || null;
+            return this.transport.getResponseHeader(name);
         }
         catch (e)
         {
@@ -1740,8 +1729,7 @@
         json = decodeURIComponent(escape(json));
         try
         {
-            return json.evalJSON(this.request.options.sanitizeJSON ||
-                                 !this.request.isSameOrigin());
+            return json.evalJSON(this.request.options.sanitizeJSON);
         }
         catch (e)
         {
@@ -1758,8 +1746,7 @@
             return null;
         try
         {
-            return this.responseText.evalJSON(options.sanitizeJSON ||
-                                              !this.request.isSameOrigin());
+            return this.responseText.evalJSON(options.sanitizeJSON);
         }
         catch (e)
         {
@@ -1995,30 +1982,26 @@
             Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
             insertions = {bottom:insertions};
 
-        var content, insert, tagName, childNodes;
+        var content, t, range;
 
-        for (var position in insertions)
+        for (position in insertions)
         {
             content = insertions[position];
             position = position.toLowerCase();
-            insert = Element._insertionTranslations[position];
+            t = Element._insertionTranslations[position];
 
             if (content && content.toElement) content = content.toElement();
             if (Object.isElement(content))
             {
-                insert(element, content);
+                t.insert(element, content);
                 continue;
             }
 
             content = Object.toHTML(content);
 
-            tagName = ((position == 'before' || position == 'after')
-                    ? element.parentNode : element).tagName.toUpperCase();
-
-            childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
-
-            if (position == 'top' || position == 'after') childNodes.reverse();
-            childNodes.each(insert.curry(element));
+            range = element.ownerDocument.createRange();
+            t.initializeRange(element, range);
+            t.insert(element, range.createContextualFragment(content.stripScripts()));
 
             content.evalScripts.bind(content).defer();
         }
@@ -2069,7 +2052,7 @@
 
     descendants: function(element)
     {
-        return $(element).select("*");
+        return $(element).getElementsBySelector("*");
     },
 
     firstDescendant: function(element)
@@ -2115,16 +2098,17 @@
         element = $(element);
         if (arguments.length == 1) return $(element.parentNode);
         var ancestors = element.ancestors();
-        return Object.isNumber(expression) ? ancestors[expression] :
-               Selector.findElement(ancestors, expression, index);
+        return expression ? Selector.findElement(ancestors, expression, index) :
+               ancestors[index || 0];
     },
 
     down: function(element, expression, index)
     {
         element = $(element);
         if (arguments.length == 1) return element.firstDescendant();
-        return Object.isNumber(expression) ? element.descendants()[expression] :
-               element.select(expression)[index || 0];
+        var descendants = element.descendants();
+        return expression ? Selector.findElement(descendants, expression, index) :
+               descendants[index || 0];
     },
 
     previous: function(element, expression, index)
@@ -2132,8 +2116,8 @@
         element = $(element);
         if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
         var previousSiblings = element.previousSiblings();
-        return Object.isNumber(expression) ? previousSiblings[expression] :
-               Selector.findElement(previousSiblings, expression, index);
+        return expression ? Selector.findElement(previousSiblings, expression, index) :
+               previousSiblings[index || 0];
     },
 
     next: function(element, expression, index)
@@ -2141,8 +2125,8 @@
         element = $(element);
         if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
         var nextSiblings = element.nextSiblings();
-        return Object.isNumber(expression) ? nextSiblings[expression] :
-               Selector.findElement(nextSiblings, expression, index);
+        return expression ? Selector.findElement(nextSiblings, expression, index) :
+               nextSiblings[index || 0];
     },
 
     select: function()
@@ -2293,8 +2277,7 @@
                 }
                 while (!(nextAncestor = ancestor.nextSibling) && ancestor.parentNode);
             }
-            if (nextAncestor && nextAncestor.sourceIndex)
-                return (e > a && e < nextAncestor.sourceIndex);
+            if (nextAncestor) return (e > a && e < nextAncestor.sourceIndex);
         }
 
         while (element = element.parentNode)
@@ -2456,7 +2439,7 @@
             {
                 if (element.tagName == 'BODY') break;
                 var p = Element.getStyle(element, 'position');
-                if (p !== 'static') break;
+                if (p == 'relative' || p == 'absolute') break;
             }
         } while (element);
         return Element._returnOffset(valueL, valueT);
@@ -2614,6 +2597,51 @@
     }
 };
 
+
+if (!document.createRange || Prototype.Browser.Opera)
+{
+    Element.Methods.insert = function(element, insertions)
+    {
+        element = $(element);
+
+        if (Object.isString(insertions) || Object.isNumber(insertions) ||
+            Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
+            insertions = { bottom: insertions };
+
+        var t = Element._insertionTranslations, content, position, pos, tagName;
+
+        for (position in insertions)
+        {
+            content = insertions[position];
+            position = position.toLowerCase();
+            pos = t[position];
+
+            if (content && content.toElement) content = content.toElement();
+            if (Object.isElement(content))
+            {
+                pos.insert(element, content);
+                continue;
+            }
+
+            content = Object.toHTML(content);
+            tagName = ((position == 'before' || position == 'after')
+                    ? element.parentNode : element).tagName.toUpperCase();
+
+            if (t.tags[tagName])
+            {
+                var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
+                if (position == 'top' || position == 'after') fragments.reverse();
+                fragments.each(pos.insert.curry(element));
+            }
+            else element.insertAdjacentHTML(pos.adjacency, content.stripScripts());
+
+            content.evalScripts.bind(content).defer();
+        }
+
+        return element;
+    };
+}
+
 if (Prototype.Browser.Opera)
 {
     Element.Methods.getStyle = Element.Methods.getStyle.wrap(
@@ -2666,34 +2694,14 @@
 
 else if (Prototype.Browser.IE)
 {
-    // IE doesn't report offsets correctly for static elements, so we change them
-    // to "relative" to get the values, then change them back.
-    Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap(
-            function(proceed, element)
-            {
-                element = $(element);
-                var position = element.getStyle('position');
-                if (position !== 'static') return proceed(element);
-                element.setStyle({ position: 'relative' });
-                var value = proceed(element);
-                element.setStyle({ position: position });
-                return value;
-            }
-            );
-
-    $w('positionedOffset viewportOffset').each(function(method)
+    $w('positionedOffset getOffsetParent viewportOffset').each(function(method)
     {
         Element.Methods[method] = Element.Methods[method].wrap(
                 function(proceed, element)
                 {
                     element = $(element);
                     var position = element.getStyle('position');
-                    if (position !== 'static') return proceed(element);
-        // Trigger hasLayout on the offset parent so that IE6 reports
-                    // accurate offsetTop and offsetLeft values for position: fixed.
-                    var offsetParent = element.getOffsetParent();
-                    if (offsetParent && offsetParent.getStyle('position') === 'fixed')
-                        offsetParent.setStyle({ zoom: 1 });
+                    if (position != 'static') return proceed(element);
                     element.setStyle({ position: 'relative' });
                     var value = proceed(element);
                     element.setStyle({ position: position });
@@ -2788,10 +2796,7 @@
     };
 
     Element._attributeTranslations.write = {
-        names: Object.extend({
-            cellpadding: 'cellPadding',
-            cellspacing: 'cellSpacing'
-        }, Element._attributeTranslations.read.names),
+        names: Object.clone(Element._attributeTranslations.read.names),
         values: {
             checked: function(element, value)
             {
@@ -2936,7 +2941,7 @@
     };
 }
 
-if ('outerHTML' in document.createElement('div'))
+if (document.createElement('div').outerHTML)
 {
     Element.Methods.replace = function(element, content)
     {
@@ -2986,34 +2991,55 @@
 Element._getContentFromAnonymousElement = function(tagName, html)
 {
     var div = new Element('div'), t = Element._insertionTranslations.tags[tagName];
-    if (t)
+    div.innerHTML = t[0] + html + t[1];
+    t[2].times(function()
     {
-        div.innerHTML = t[0] + html + t[1];
-        t[2].times(function()
-        {
-            div = div.firstChild
-        });
-    }
-    else div.innerHTML = html;
+        div = div.firstChild
+    });
     return $A(div.childNodes);
 };
 
 Element._insertionTranslations = {
-    before: function(element, node)
-    {
-        element.parentNode.insertBefore(node, element);
+    before: {
+        adjacency: 'beforeBegin',
+        insert: function(element, node)
+        {
+            element.parentNode.insertBefore(node, element);
+        },
+        initializeRange: function(element, range)
+        {
+            range.setStartBefore(element);
+        }
     },
-    top: function(element, node)
-    {
-        element.insertBefore(node, element.firstChild);
+    top: {
+        adjacency: 'afterBegin',
+        insert: function(element, node)
+        {
+            element.insertBefore(node, element.firstChild);
+        },
+        initializeRange: function(element, range)
+        {
+            range.selectNodeContents(element);
+            range.collapse(true);
+        }
     },
-    bottom: function(element, node)
-    {
-        element.appendChild(node);
+    bottom: {
+        adjacency: 'beforeEnd',
+        insert: function(element, node)
+        {
+            element.appendChild(node);
+        }
     },
-    after: function(element, node)
-    {
-        element.parentNode.insertBefore(node, element.nextSibling);
+    after: {
+        adjacency: 'afterEnd',
+        insert: function(element, node)
+        {
+            element.parentNode.insertBefore(node, element.nextSibling);
+        },
+        initializeRange: function(element, range)
+        {
+            range.setStartAfter(element);
+        }
     },
     tags: {
         TABLE:  ['<table>',                '</table>',                   1],
@@ -3026,6 +3052,7 @@
 
 (function()
 {
+    this.bottom.initializeRange = this.top.initializeRange;
     Object.extend(this.tags, {
         THEAD: this.tags.TBODY,
         TFOOT: this.tags.TBODY,
@@ -3233,7 +3260,7 @@
                 window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop);
     }
 };
-/* Portions of the Selector class are derived from Jack Slocum’s DomQuery,
+/* Portions of the Selector class are derived from Jack Slocum’s DomQuery,
  * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style
  * license.  Please see http://www.yui-ext.com/ for more information. */
 
@@ -3522,14 +3549,14 @@
     },
 
     criteria: {
-        tagName:      'n = h.tagName(n, r, "#{1}", c);      c = false;',
-        className:    'n = h.className(n, r, "#{1}", c);    c = false;',
-        id:           'n = h.id(n, r, "#{1}", c);           c = false;',
-        attrPresence: 'n = h.attrPresence(n, r, "#{1}", c); c = false;',
+        tagName:      'n = h.tagName(n, r, "#{1}", c);   c = false;',
+        className:    'n = h.className(n, r, "#{1}", c); c = false;',
+        id:           'n = h.id(n, r, "#{1}", c);        c = false;',
+        attrPresence: 'n = h.attrPresence(n, r, "#{1}"); c = false;',
         attr: function(m)
         {
             m[3] = (m[5] || m[6]);
-            return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m);
+            return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(m);
         },
         pseudo: function(m)
         {
@@ -3554,8 +3581,7 @@
         tagName:      /^\s*(\*|[\w\-]+)(\b|$)?/,
         id:           /^#([\w\-\*]+)(\b|$)/,
         className:    /^\.([\w\-\*]+)(\b|$)/,
-        pseudo:
-                /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,
+        pseudo:       /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s)|(?=:))/,
         attrPresence: /^\[([\w]+)\]/,
         attr:         /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/
     },
@@ -3585,7 +3611,7 @@
         attr: function(element, matches)
         {
             var nodeValue = Element.readAttribute(element, matches[1]);
-            return nodeValue && Selector.operators[matches[2]](nodeValue, matches[5] || matches[6]);
+            return Selector.operators[matches[2]](nodeValue, matches[3]);
         }
     },
 
@@ -3602,16 +3628,15 @@
         // marks an array of nodes for counting
         mark: function(nodes)
         {
-            var _true = Prototype.emptyFunction;
             for (var i = 0, node; node = nodes[i]; i++)
-                node._countedByPrototype = _true;
+                node._counted = true;
             return nodes;
         },
 
         unmark: function(nodes)
         {
             for (var i = 0, node; node = nodes[i]; i++)
-                node._countedByPrototype = undefined;
+                node._counted = undefined;
             return nodes;
         },
 
@@ -3620,19 +3645,19 @@
         // rather than nth-child
         index: function(parentNode, reverse, ofType)
         {
-            parentNode._countedByPrototype = Prototype.emptyFunction;
+            parentNode._counted = true;
             if (reverse)
             {
                 for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--)
                 {
                     var node = nodes[i];
-                    if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
+                    if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;
                 }
             }
             else
             {
                 for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)
-                    if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
+                    if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;
             }
         },
 
@@ -3642,9 +3667,9 @@
             if (nodes.length == 0) return nodes;
             var results = [], n;
             for (var i = 0, l = nodes.length; i < l; i++)
-                if (!(n = nodes[i])._countedByPrototype)
+                if (!(n = nodes[i])._counted)
                 {
-                    n._countedByPrototype = Prototype.emptyFunction;
+                    n._counted = true;
                     results.push(Element.extend(n));
                 }
             return Selector.handlers.unmark(results);
@@ -3705,7 +3730,7 @@
         // TOKEN FUNCTIONS
         tagName: function(nodes, root, tagName, combinator)
         {
-            var uTagName = tagName.toUpperCase();
+            tagName = tagName.toUpperCase();
             var results = [], h = Selector.handlers;
             if (nodes)
             {
@@ -3722,7 +3747,7 @@
                     if (tagName == "*") return nodes;
                 }
                 for (var i = 0, node; node = nodes[i]; i++)
-                    if (node.tagName.toUpperCase() === uTagName) results.push(node);
+                    if (node.tagName.toUpperCase() == tagName) results.push(node);
                 return results;
             }
             else return root.getElementsByTagName(tagName);
@@ -3782,20 +3807,18 @@
             return results;
         },
 
-        attrPresence: function(nodes, root, attr, combinator)
+        attrPresence: function(nodes, root, attr)
         {
             if (!nodes) nodes = root.getElementsByTagName("*");
-            if (nodes && combinator) nodes = this[combinator](nodes);
             var results = [];
             for (var i = 0, node; node = nodes[i]; i++)
                 if (Element.hasAttribute(node, attr)) results.push(node);
             return results;
         },
 
-        attr: function(nodes, root, attr, value, operator, combinator)
+        attr: function(nodes, root, attr, value, operator)
         {
             if (!nodes) nodes = root.getElementsByTagName("*");
-            if (nodes && combinator) nodes = this[combinator](nodes);
             var handler = Selector.operators[operator], results = [];
             for (var i = 0, node; node = nodes[i]; i++)
             {
@@ -3892,7 +3915,7 @@
             h.mark(nodes);
             for (var i = 0, node; node = nodes[i]; i++)
             {
-                if (!node.parentNode._countedByPrototype)
+                if (!node.parentNode._counted)
                 {
                     h.index(node.parentNode, reverse, ofType);
                     indexed.push(node.parentNode);
@@ -3938,7 +3961,7 @@
             var exclusions = new Selector(selector).findElements(root);
             h.mark(exclusions);
             for (var i = 0, results = [], node; node = nodes[i]; i++)
-                if (!node._countedByPrototype) results.push(node);
+                if (!node._counted) results.push(node);
             h.unmark(exclusions);
             return results;
         },
@@ -3996,22 +4019,12 @@
         }
     },
 
-    split: function(expression)
-    {
-        var expressions = [];
-        expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m)
-        {
-            expressions.push(m[1].strip());
-        });
-        return expressions;
-    },
-
     matchElements: function(elements, expression)
     {
-        var matches = $$(expression), h = Selector.handlers;
+        var matches = new Selector(expression).findElements(), h = Selector.handlers;
         h.mark(matches);
         for (var i = 0, results = [], element; element = elements[i]; i++)
-            if (element._countedByPrototype) results.push(element);
+            if (element._counted) results.push(element);
         h.unmark(matches);
         return results;
     },
@@ -4028,7 +4041,12 @@
 
     findChildElements: function(element, expressions)
     {
-        expressions = Selector.split(expressions.join(','));
+        var exprs = expressions.join(',');
+        expressions = [];
+        exprs.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m)
+        {
+            expressions.push(m[1].strip());
+        });
         var results = [], h = Selector.handlers;
         for (var i = 0, l = expressions.length, selector; i < l; i++)
         {
@@ -4041,24 +4059,14 @@
 
 if (Prototype.Browser.IE)
 {
-    Object.extend(Selector.handlers, {
-        // IE returns comment nodes on getElementsByTagName("*").
-        // Filter them out.
-        concat: function(a, b)
-        {
-            for (var i = 0, node; node = b[i]; i++)
-                if (node.tagName !== "!") a.push(node);
-            return a;
-        },
-
-        // IE improperly serializes _countedByPrototype in (inner|outer)HTML.
-        unmark: function(nodes)
-        {
-            for (var i = 0, node; node = nodes[i]; i++)
-                node.removeAttribute('_countedByPrototype');
-            return nodes;
-        }
-    });
+    // IE returns comment nodes on getElementsByTagName("*").
+    // Filter them out.
+    Selector.handlers.concat = function(a, b)
+    {
+        for (var i = 0, node; node = b[i]; i++)
+            if (node.tagName !== "!") a.push(node);
+        return a;
+    };
 }
 
 function $$()
@@ -4652,9 +4660,9 @@
 
     function getEventID(element)
     {
-        if (element._prototypeEventID) return element._prototypeEventID[0];
+        if (element._eventID) return element._eventID;
         arguments.callee.id = arguments.callee.id || 1;
-        return element._prototypeEventID = [++arguments.callee.id];
+        return element._eventID = ++arguments.callee.id;
     }
 
     function getDOMEventName(eventName)
@@ -4687,7 +4695,7 @@
                 return false;
 
             Event.extend(event);
-            handler.call(element, event);
+            handler.call(element, event)
         };
 
         wrapper.handler = handler;
@@ -4790,15 +4798,14 @@
             if (element == document && document.createEvent && !element.dispatchEvent)
                 element = document.documentElement;
 
-            var event;
             if (document.createEvent)
             {
-                event = document.createEvent("HTMLEvents");
+                var event = document.createEvent("HTMLEvents");
                 event.initEvent("dataavailable", true, true);
             }
             else
             {
-                event = document.createEventObject();
+                var event = document.createEventObject();
                 event.eventType = "ondataavailable";
             }
 
@@ -4830,8 +4837,7 @@
 Object.extend(document, {
     fire:          Element.Methods.fire.methodize(),
     observe:       Element.Methods.observe.methodize(),
-    stopObserving: Element.Methods.stopObserving.methodize(),
-    loaded:        false
+    stopObserving: Element.Methods.stopObserving.methodize()
 });
 
 (function()
@@ -4839,19 +4845,19 @@
     /* Support for the DOMContentLoaded event is based on work by Dan Webb,
 Matthias Miller, Dean Edwards and John Resig. */
 
-    var timer;
+    var timer, fired = false;
 
     function fireContentLoadedEvent()
     {
-        if (document.loaded) return;
+        if (fired) return;
         if (timer) window.clearInterval(timer);
         document.fire("dom:loaded");
-        document.loaded = true;
+        fired = true;
     }
 
     if (document.addEventListener)
     {
-        // Note: patch from http://dev.rubyonrails.org/ticket/10532 
+        // Note: patch from http://dev.rubyonrails.org/ticket/10532
         if (Prototype.Browser.WebKit || navigator.userAgent.include('KHTML'))
         {
             timer = window.setInterval(function()

Modified: tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/ajax.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/ajax.apt?rev=630342&r1=630341&r2=630342&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/ajax.apt (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/site/apt/guide/ajax.apt Fri Feb 22 14:47:26 2008
@@ -16,6 +16,13 @@
   Ajax support takes the form of new components and, occasionally,
   {{{mixins.html}component mixins}}.  
 
+Changes to Prototype
+
+  Tapestry currently uses a slightly patched version of
+  {{{http://www.thebungeebook.net/wp-content/uploads/2008/01/prototype-1601.js}Prototype 1.6.0.1}}.  Version 1.6.0.2
+  appears to have some issues supporting Internet Explorer.  Tapestry's version is slightly patch
+  for {{{https://issues.apache.org/jira/browse/TAPESTRY-2108}TAPESTRY-2108}}.
+
 Changes to Scriptaculous
 
   Scriptaculous normally has a special {{{http://wiki.script.aculo.us/scriptaculous/show/Usage}script loading option}}.

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/SecurityAlert.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/SecurityAlert.tml?rev=630342&r1=630341&r2=630342&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/app1/SecurityAlert.tml (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/app1/SecurityAlert.tml Fri Feb 22 14:47:26 2008
@@ -1,9 +1,9 @@
 <html t:type="Border" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
-    
-    <h1>Security Alert</h1>
-    
+
+    <h1 id="pagetitle">Security Alert</h1>
+
     <p>
         Security exception: ${message}
-    </p>    
-    
+    </p>
+
 </html>

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/css/app.css
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/css/app.css?rev=630342&r1=630341&r2=630342&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/app1/css/app.css (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/app1/css/app.css Fri Feb 22 14:47:26 2008
@@ -1,7 +1,40 @@
-BODY {
-    font-family: "Trebuchet MS";
-}
-
 SPAN.inherit {
     font-style: italic;
+}
+
+A.selected {
+    font-size: large;
+    font-weight: bold;
+}
+
+DIV#topspread {
+    padding: 0px 5px;
+}
+
+DIV.menu {
+    margin-bottom: 10px;
+}
+
+/** Copy of "#right h3" */
+
+DIV#left H3 {
+    background: #4A1605 url( images/rightbig.gif ) no-repeat;
+    height: 30px;
+    line-height: 30px;
+    color: #fff;
+    padding-left: 10px;
+    font-size: 13px;
+    font-weight: 600;
+}
+
+/* Copy of ".menu h4" */
+DIV.t-env-data-section {
+    background: #4A1605 url( images/rightsmall.gif ) no-repeat;
+    height: 20px;
+    line-height: 20px;
+    color: #fff;
+    padding-left: 10px;
+    font-size: 12px;
+    font-weight: 600;
+    width: 170px;
 }

Added: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/bg.gif
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/bg.gif?rev=630342&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/bg.gif
------------------------------------------------------------------------------
    svn:executable = *

Propchange: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/bg.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/bottom.gif
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/bottom.gif?rev=630342&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/bottom.gif
------------------------------------------------------------------------------
    svn:executable = *

Propchange: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/bottom.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/footer.gif
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/footer.gif?rev=630342&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/footer.gif
------------------------------------------------------------------------------
    svn:executable = *

Propchange: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/footer.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/header.gif
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/header.gif?rev=630342&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/header.gif
------------------------------------------------------------------------------
    svn:executable = *

Propchange: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/header.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/rightbig.gif
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/rightbig.gif?rev=630342&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/rightbig.gif
------------------------------------------------------------------------------
    svn:executable = *

Propchange: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/rightbig.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/rightsmall.gif
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/rightsmall.gif?rev=630342&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/rightsmall.gif
------------------------------------------------------------------------------
    svn:executable = *

Propchange: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/images/rightsmall.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/index.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/index.html?rev=630342&view=auto
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/index.html (added)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/index.html Fri Feb 22 14:47:26 2008
@@ -0,0 +1,108 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <title>Professional</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+    <meta http-equiv="Content-Language" content="English"/>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+    <link rel="stylesheet" type="text/css" href="style.css" media="screen"/>
+</head>
+<body>
+<div id="wrap">
+
+    <div id="header">
+        <h1><a href="#">Your Website Title</a></h1>
+
+        <h2>Slogan of your website - H2</h2>
+    </div>
+
+    <div id="content">
+
+        <div id="intro">
+            Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla imperdiet aliquet orci.
+            Sed quis nibh. Mauris ac elit sed velit scelerisque nonummy. Class aptent taciti sociosqu
+            ad litora torquent per conubia nostra, per inceptos hymenaeos. Phasellus quis ipsum
+            ac mauris vulputate ullamcorper. Praesent nonummy urna a es. Consectetuer adipiscing elit.
+            Mauris ac elit sed velit scelerisque nonummy.Sed quis nibh. Mauris ac elit sed velit scelerisque nonummy.
+            Nulla imperdiet aliquet orci. Sed quis nibh. Mauris ac elit sed velit scelerisque.
+        </div>
+
+        <div id="left">
+
+            <h2><a href="#">Lorem Ipsum dolor sit amet</a></h2>
+
+            <img src="images/pic.gif" alt="Example pic" style="border: 3px solid #eee;"/>
+            <br/>
+            Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla imperdiet aliquet orci.
+            Sed quis nibh. Mauris ac elit sed velit scelerisque nonummy. Class aptent taciti sociosqu
+            ad litora torquent per conubia nostra, per inceptos hymenaeos. Phasellus quis ipsum
+            ac mauris vulputate ullamcorper. Praesent nonummy urna a es. Consectetuer adipiscing elit.
+            Mauris ac elit sed velit scelerisque nonummy.Sed quis nibh. Mauris ac elit sed velit scelerisque nonummy.
+            Nulla imperdiet aliquet orci. Sed quis nibh. Mauris ac elit sed velit scelerisque.
+            <br/><br/>
+            Consectetuer adipiscing elit.
+            Mauris ac elit sed velit scelerisque nonummy.Sed quis nibh. Mauris ac elit sed velit scelerisque nonummy.
+            Nulla imperdiet aliquet orci. Sed quis nibh. Mauris ac elit sed velit scelerisque.
+            Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla imperdiet aliquet orci.
+            Sed quis nibh. Mauris ac elit sed velit scelerisque nonummy. Class aptent taciti sociosqu
+            ad litora torquent per conubia nostra, per inceptos hymenaeos. Phasellus quis ipsum
+            ac mauris vulputate ullamcorper. Praesent nonummy urna a es.
+            <br/><br/>
+            Mauris ac elit sed velit scelerisque.
+            Lorem ipsum dolor sit amet, consectetuer adipiscing.
+
+        </div>
+
+        <div id="right">
+
+            <h3>Advertisments or Latest Articles</h3>
+
+            <div class="rightads">
+                <img src="images/ads.gif" alt="Ads"/>
+            </div>
+
+            <div class="menu">
+                <h4>Categories</h4>
+                <ul>
+                    <li><a href="#">Home</a></li>
+                    <li><a href="#">Art and Humanities</a></li>
+                    <li><a href="#">World Politics</a></li>
+                    <li><a href="#">World Sports</a></li>
+                    <li><a href="#">Categories</a></li>
+                    <li><a href="#">Your Category</a></li>
+                    <li><a href="#">Something Goes Here</a></li>
+                    <li><a href="#">Example Categories</a></li>
+                    <li><a href="#">Surfing</a></li>
+                </ul>
+            </div>
+
+            <div class="menu1">
+                <h4>Archives</h4>
+                <ul>
+                    <li><a href="#">January 2007</a></li>
+                    <li><a href="#">February 2007</a></li>
+                    <li><a href="#">March 2007</a></li>
+                    <li><a href="#">April 2007</a></li>
+                    <li><a href="#">May 2007</a></li>
+                    <li><a href="#">June 2007</a></li>
+                    <li><a href="#">July 2007</a></li>
+                    <li><a href="#">August 2007</a></li>
+                    <li><a href="#">September 2007</a></li>
+                </ul>
+            </div>
+
+        </div>
+
+        <div style="clear: both;"></div>
+    </div>
+
+    <div id="footer">
+        &copy; Copyright by <a href="#">You</a> | Design by <a href="http://www.minimalistic-design.net">Minimalistic
+        Design</a>
+    </div>
+
+    <div id="bottom"></div>
+
+</div>
+</body>
+</html>
\ No newline at end of file

Propchange: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/index.html
------------------------------------------------------------------------------
    svn:executable = *

Added: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/style.css
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/style.css?rev=630342&view=auto
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/style.css (added)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/style.css Fri Feb 22 14:47:26 2008
@@ -0,0 +1 @@
+STAR {
    padding: 0;
    margin: 0;
}

body {
    background: #aaa;
    font-family: Verdana, Tahoma, Arial, sans-serif;
    font-size: 12px;
    padding: 0;
    margin: 0;
    color: #555;
    line-height: 20px;
}

a {
    color: #4A1605;
    text-decoration: none;
}

a:hover {
    color: #333;
    text-decoration: underline;
}

img {
    border: none;
}

li {
    margin: 0;
    padding: 0;
}

#wrap {
    width: 990px;
    margin: 0 auto;
}

#header {
    height: 110px;
    background: #aaa url( images/header.gif ) no-repeat;
}

#header h1 {
    padding: 30px 0 0 20px;
    font-size: 24px;
    letter-spacing: -3px;
    text-transform: uppercase;
}

#header h1 a {
    color: #fff;
}

#header h1 a:hover {
    color: #eee;
    text-decoration: none;
}

#header h2 {
    font-size: 17px;
    color: #eee;
    font-weight: 100;
    padding: 0 0 0 20px;
}

#intro {
    background: #f7f7f7;
    border-top: 3px solid #aaa;
    border-bottom: 3px solid #aaa;
    margin: 5px 10px;
  
   padding: 10px;
}

#content {
    background: #aaa url( images/bg.gif ) repeat-y;
    padding: 10px;
}

#left {
    width: 560px;
    float: left;
    padding-left: 10px;
    text-align: justify;
    padding-bottom: 10px;
}

#left h2 {
    font-size: 25px;
    padding: 10px 0;
    font-weight: 100;
    letter-spacing: -2px;
}

#left h2 a {
    color: #888;
}

#left h2 a:hover {
    color: #333;
    text-decoration: none;
}

#right {
    width: 370px;
    float: right;
    margin-top: 15px;
    margin-right: 10px;
    padding-bottom: 10px;
}

.rightads {
    padding: 10px;
}

#right h3 {
    background: #4A1605 url( images/rightbig.gif ) no-repeat;
    height: 30px;
    line-height: 30px;
    color: #fff;
    padding-left: 10px;
    font-size: 13px;
    font-weight: 600;
}

.menu {
    float: left;
    width: 360px;
}

.menu h4 {
    background: #4A1605 url( images/rightsmall.gif ) no-repeat;
    height: 20px;
    line-height: 20px;
    color: #fff;
    padding-left: 10px;
 
    font-size: 12px;
    font-weight: 600;
    width: 170px;
}

.menu ul {
    padding: 5px 10px;
    list-style-type: none;
    font-weight: 600;
    font-size: 11px;
}

.menu1 ul {
    padding: 5px 10px;
    list-style-type: none;
    font-weight: 600;
    font-size: 11px;
}

#footer {
    height: 30px;
    background: #aaa url( images/footer.gif ) no-repeat;
    line-height: 30px;
    color: #fff;
    font-size: 11px;
    text-align: center;
}

#footer a {
    color: #fff;
}

#footer a:hover {
    color: #eee;
}

#bottom {
    height: 10px;
    background: #aaa url( images/bottom.gif ) no-repeat;
}
\ No newline at end of file

Propchange: tapestry/tapestry5/trunk/tapestry-core/src/test/app1/layout/style.css
------------------------------------------------------------------------------
    svn:executable = *

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/IntegrationTests.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/IntegrationTests.java?rev=630342&r1=630341&r2=630342&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/IntegrationTests.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/IntegrationTests.java Fri Feb 22 14:47:26 2008
@@ -705,7 +705,7 @@
     {
         start("Protected Page");
 
-        assertText("//h1", "Security Alert");
+        assertText("pagetitle", "Security Alert");
 
         // The message is set by Protected, but is rendered by SecurityAlert.
 
@@ -1015,11 +1015,11 @@
     {
         open(BASE_URL);
 
-        assertTextPresent("Currently on page: Start");
+        assertText("activePageName", "Start");
 
         clickAndWait("link=Grid Demo");
 
-        assertTextPresent("Currently on page: GridDemo");
+        assertText("activePageName", "GridDemo");
     }
 
     @Test

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/components/Border.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/components/Border.java?rev=630342&r1=630341&r2=630342&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/components/Border.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/integration/app1/components/Border.java Fri Feb 22 14:47:26 2008
@@ -22,9 +22,10 @@
 import org.apache.tapestry.services.Request;
 
 /**
- * Here's a component with a template, including a t:body element.
+ * Here's a component with a template, including a t:body element.   Really should rename this to "Layout" as that's the
+ * T5 naming.
  */
-@IncludeStylesheet("context:css/app.css")
+@IncludeStylesheet({ "context:layout/style.css", "context:css/app.css" })
 public class Border
 {
     @Inject

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry/integration/app1/components/Border.tml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry/integration/app1/components/Border.tml?rev=630342&r1=630341&r2=630342&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry/integration/app1/components/Border.tml (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry/integration/app1/components/Border.tml Fri Feb 22 14:47:26 2008
@@ -1,47 +1,71 @@
-<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
     <head>
         <title>Tapestry Integration Test Application #1</title>
-        <style>
-            A.selected
-            {
-            font-size: large;
-            font-weight: bold;
-            }
-        </style>
     </head>
     <body>
-        <t:body/>
+        <div id="wrap">
 
-        <hr/>
+            <div id="header">
+                <h1>Tapestry Integration Test Application</h1>
+            </div>
 
-        <p>
-            <a t:type="PageLink" page="Start">Back to index</a>
-        </p>
+            <div id="content">
+                <div id="topspread">
+                    <t:body/>
+                </div>
 
-        <p>
-            Currently on page: ${componentResources.pageName} (via
-            <span id="secure">${secure}</span>
-            access)
-        </p>
 
+                <div id="right">
+                    <div class="menu">
+                        <h4>Navigation</h4>
+                        <ul>
+                            <li>
+                                Page:
+                                <span id="activePageName">${componentResources.pageName}</span>
+                            </li>
+                            <li>Access:
+                                <span id="secure">${secure}</span>
+                            </li>
+                            <li>
+                                <t:pagelink page="start">Back to index</t:pagelink>
+                            </li>
+                        </ul>
 
-        <h3>
-            Request info:
-        </h3>
+                        <h4>Fabricated classes:</h4>
 
-        <t:renderobject object="request"/>
+                        <dl>
+                            <dt>IOC Layer: ${iocClassFactory.createdClassCount}</dt>
+                            <dd>Service proxies and interceptors</dd>
 
-        <h3>Fabricated classes:</h3>
+                            <dt>Component Layer: ${componentClassFactory.createdClassCount}</dt>
+                            <dd>For the most part, this is going to be prop: bindings</dd>
+                        </dl>
 
-        <dl>
-            <dt>IOC Layer: ${iocClassFactory.createdClassCount}</dt>
-            <dd>Service proxies and interceptors</dd>
+                    </div>
+                </div>
 
-            <dt>Component Layer: ${componentClassFactory.createdClassCount}</dt>
-            <dd>For the most part, this is going to be prop: bindings</dd>
-        </dl>
+                <div id="left">
+                    <h3>Request info:</h3>
+
+                    <t:renderobject object="request"/>
+
+                </div>
+
+
+                <div style="clear:both;"></div>
 
-    </body>
 
+            </div>
+            <div id="footer">
+                &copy; 2008
+                <a href="http://apache.org/">Apache Software Foundation</a>
+            </div>
 
+            <div id="bottom"/>
+
+        </div>
+
+
+    </body>
 </html>

Modified: tapestry/tapestry5/trunk/tapestry-ioc/LICENSE.txt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/LICENSE.txt?rev=630342&r1=630341&r2=630342&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/LICENSE.txt (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/LICENSE.txt Fri Feb 22 14:47:26 2008
@@ -202,9 +202,13 @@
    limitations under the License.
 
    
+-------------------------------------------------------------------------------
+
 JAVASSIST
 
-Javassist is not bundled with tapestry-core, but is bound to it.
+Javassist is not bundled with tapestry-ioc, but tapestry-ioc is not functional without Javassist.
+Javassist is distributed under a dual license: Mozilla Public License or LGPL (Lesser Gnu Public License). Tapestry
+invokes the MPL for compatibility with the Apache Software License.
 
 MOZILLA PUBLIC LICENSE
 Version 1.1
@@ -235,7 +239,7 @@
             A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.
 
             B. Any new file that contains any part of the Original Code or previous Modifications.
-             
+
       1.10. ''Original Code'' means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License.
 
       1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation,  method, process, and apparatus claims, in any patent Licensable by grantor.
@@ -254,7 +258,7 @@
             (c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License.
 
             (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code;  or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices.
-             
+
       2.2. Contributor Grant.
       Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license
 
@@ -284,7 +288,7 @@
 
             (b) Contributor APIs.
             If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file.
-             
+
                 (c)    Representations.
             Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License.
 
@@ -374,4 +378,3 @@
 
       Alternatively, the contents of this file may be used under the terms of the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), in which case the provisions of the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the LGPL, and not to allow others to use your version of this file under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of either the MPL or the LGPL.
 
-   
\ No newline at end of file