]> source.dussan.org Git - vaadin-framework.git/commitdiff
Added many new demos.
authorJani Laakso <jani.laakso@itmill.com>
Mon, 2 Apr 2007 14:25:00 +0000 (14:25 +0000)
committerJani Laakso <jani.laakso@itmill.com>
Mon, 2 Apr 2007 14:25:00 +0000 (14:25 +0000)
svn changeset:1096/svn branch:trunk

WebContent/EmbeddedToolkit.jsp [new file with mode: 0644]
WebContent/WEB-INF/web.xml
WebContent/index.html
WebContent/openajax/HubTest-BasicConformance.js [new file with mode: 0644]
WebContent/openajax/OpenAjax.js [new file with mode: 0644]
WebContent/openajax/index.html [new file with mode: 0644]
WebContent/styles/demos.css

diff --git a/WebContent/EmbeddedToolkit.jsp b/WebContent/EmbeddedToolkit.jsp
new file mode 100644 (file)
index 0000000..d8fce62
--- /dev/null
@@ -0,0 +1,65 @@
+<%
+  //
+  // Demonstrates how Toolkit application can be integrated into jsp pages
+  //
+  String test = "This text comes from EmbeddedToolkit.jsp file";
+  // Toolkit application name. This is servlet URL pattern, see web.xml
+  String applicationName = "TableDemo";
+%>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
+       "http://www.w3.org/TR/html4/loose.dtd">
+ <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ITMillToolkit40="http://itmill.com/toolkit">
+ <head>
+ <title>Embedding Toolkit to JSP pages</title>
+        <!-- Toolkit code block starts -->
+        
+        <NOSCRIPT><META http-equiv="refresh" content="0; url=?WA_NOSCRIPT=1" /></NOSCRIPT>
+        <link rel="stylesheet" href="<%=applicationName %>/RES/base/css/base-ajax.css" type="text/css" />
+        <link rel="stylesheet" href="<%=applicationName %>/RES/base/css/calendar-default.css" type="text/css" />
+        <script src="<%=applicationName %>/RES/base/script/ajax-client.js" type="text/javascript"></script>
+        <script src="<%=applicationName %>/RES/base/script/base-ajax-components.js" type="text/javascript"></script>
+        <script src="<%=applicationName %>/RES/base/ext/jscalendar/calendar.js" type="text/javascript"></script>
+        <script src="<%=applicationName %>/RES/base/ext/jscalendar/lang/calendar-en.js" type="text/javascript"></script>
+        <script src="<%=applicationName %>/RES/base/ext/jscalendar/calendar-setup.js" type="text/javascript"></script>
+        <script src="<%=applicationName %>/RES/base/ext/firebug/firebugx.js" type="text/javascript"></script>
+        <link rel="stylesheet" href="<%=applicationName %>/RES/corporate/css/corporate-ajax.css" type="text/css" />
+        <script src="<%=applicationName %>/RES/corporate/script/corporate-ajax-components.js" type="text/javascript"></script>
+        
+        <!-- Toolkit code block ends -->
+        
+ </head>
+ <!-- Toolkit code: for body set tag class with value itmtk -->
+ <body class="itmtk">
+ <center>
+ <h3><%=test %> before Toolkit application.</h3>
+ <hr />
+        <!-- Toolkit code block starts -->
+        
+        <div id="ajax-wait">Loading...</div>
+        <div id="ajax-window"></div>
+        <script language="JavaScript">
+        itmill.tmp = new itmill.Client(document.getElementById('ajax-window'),"<%=applicationName %>/UIDL/","<%=applicationName %>/RES/base/client/",document.getElementById('ajax-wait'));
+         (new itmill.themes.Base("<%=applicationName %>/RES/base/")).registerTo(itmill.tmp);
+        itmill.tmp.start();
+        delete itmill.tmp;
+        </script>
+        
+        <!-- Toolkit code block ends -->
+        
+ </tr></td></table>
+ <hr />
+ <h3><%=test %> after Toolkit application.</h3>
+ <br />
+ <br />
+ </center>
+ </body>
+ </html>
\ No newline at end of file
index 30fa1923ee88eb00ce0e59f397f0a67fb6f66b59..0ce0ba0bd4d523038aa16471b17e16512ccdb95d 100644 (file)
 <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
        <display-name>IT Mill Toolkit</display-name>
 
-<!-- APPLICATION: ...demo.Hello -->
     <servlet>
-        <servlet-name>hello</servlet-name>
+        <servlet-name>features</servlet-name>
         <servlet-class>com.itmill.toolkit.terminal.web.ApplicationServlet</servlet-class>
         <init-param>
             <param-name>application</param-name>
-            <param-value>com.itmill.toolkit.demo.HelloWorld</param-value>
+            <param-value>com.itmill.toolkit.demo.features.FeaturesApplication</param-value>
         </init-param>
     </servlet>
     <servlet-mapping>
-        <servlet-name>hello</servlet-name>
-        <url-pattern>/hello/*</url-pattern>
+        <servlet-name>features</servlet-name>
+        <url-pattern>/features/*</url-pattern>
     </servlet-mapping>
 
-<!-- APPLICATION: ...demo.features -->
+       <servlet>
+        <servlet-name>Parameters</servlet-name>
+        <servlet-class>com.itmill.toolkit.terminal.web.ApplicationServlet</servlet-class>
+        <init-param>
+            <param-name>application</param-name>
+            <param-value>com.itmill.toolkit.example.Parameters</param-value>
+        </init-param>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>Parameters</servlet-name>
+        <url-pattern>/Parameters/*</url-pattern>
+    </servlet-mapping>
+    
+       <servlet>
+        <servlet-name>Login</servlet-name>
+        <servlet-class>com.itmill.toolkit.terminal.web.ApplicationServlet</servlet-class>
+        <init-param>
+            <param-name>application</param-name>
+            <param-value>com.itmill.toolkit.demo.Login</param-value>
+        </init-param>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>Login</servlet-name>
+        <url-pattern>/Login/*</url-pattern>
+    </servlet-mapping>
+    
     <servlet>
-        <servlet-name>features</servlet-name>
+        <servlet-name>QueryContainerDemo</servlet-name>
         <servlet-class>com.itmill.toolkit.terminal.web.ApplicationServlet</servlet-class>
         <init-param>
             <param-name>application</param-name>
-            <param-value>com.itmill.toolkit.demo.features.FeaturesApplication</param-value>
+            <param-value>com.itmill.toolkit.demo.QueryContainerDemo</param-value>
         </init-param>
     </servlet>
     <servlet-mapping>
-        <servlet-name>features</servlet-name>
-        <url-pattern>/features/*</url-pattern>
+        <servlet-name>QueryContainerDemo</servlet-name>
+        <url-pattern>/QueryContainerDemo/*</url-pattern>
+    </servlet-mapping>
+    
+     <servlet>
+        <servlet-name>TableDemo</servlet-name>
+        <servlet-class>com.itmill.toolkit.terminal.web.ApplicationServlet</servlet-class>
+        <init-param>
+            <param-name>application</param-name>
+            <param-value>com.itmill.toolkit.demo.TableDemo</param-value>
+        </init-param>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>TableDemo</servlet-name>
+        <url-pattern>/TableDemo/*</url-pattern>
+    </servlet-mapping>
+    
+    <servlet>
+        <servlet-name>TreeFilesystemContainer</servlet-name>
+        <servlet-class>com.itmill.toolkit.terminal.web.ApplicationServlet</servlet-class>
+        <init-param>
+            <param-name>application</param-name>
+            <param-value>com.itmill.toolkit.demo.TreeFilesystemContainer</param-value>
+        </init-param>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>TreeFilesystemContainer</servlet-name>
+        <url-pattern>/TreeFilesystemContainer/*</url-pattern>
+    </servlet-mapping>
+    
+    <servlet>
+        <servlet-name>TreeFilesystem</servlet-name>
+        <servlet-class>com.itmill.toolkit.terminal.web.ApplicationServlet</servlet-class>
+        <init-param>
+            <param-name>application</param-name>
+            <param-value>com.itmill.toolkit.demo.TreeFilesystem</param-value>
+        </init-param>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>TreeFilesystem</servlet-name>
+        <url-pattern>/TreeFilesystem/*</url-pattern>
+    </servlet-mapping>
+    
+     <servlet>
+        <servlet-name>ModalWindow</servlet-name>
+        <servlet-class>com.itmill.toolkit.terminal.web.ApplicationServlet</servlet-class>
+        <init-param>
+            <param-name>application</param-name>
+            <param-value>com.itmill.toolkit.demo.ModalWindow</param-value>
+        </init-param>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>ModalWindow</servlet-name>
+        <url-pattern>/ModalWindow/*</url-pattern>
+    </servlet-mapping>
+    
+    <servlet>
+        <servlet-name>HelloWorld</servlet-name>
+        <servlet-class>com.itmill.toolkit.terminal.web.ApplicationServlet</servlet-class>
+        <init-param>
+            <param-name>application</param-name>
+            <param-value>com.itmill.toolkit.demo.HelloWorld</param-value>
+        </init-param>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>HelloWorld</servlet-name>
+        <url-pattern>/HelloWorld/*</url-pattern>
     </servlet-mapping>
 
-<!-- APPLICATION: ...demo.calc -->
     <servlet>
-        <servlet-name>calc</servlet-name>
+        <servlet-name>Calc</servlet-name>
         <servlet-class>com.itmill.toolkit.terminal.web.ApplicationServlet</servlet-class>
         <init-param>
             <param-name>application</param-name>
         </init-param>
     </servlet>
     <servlet-mapping>
-        <servlet-name>calc</servlet-name>
-        <url-pattern>/calc/*</url-pattern>
+        <servlet-name>Calc</servlet-name>
+        <url-pattern>/Calc/*</url-pattern>
+    </servlet-mapping>
+
+    <servlet>
+        <servlet-name>KeyboardShortcut</servlet-name>
+        <servlet-class>com.itmill.toolkit.terminal.web.ApplicationServlet</servlet-class>
+        <init-param>
+            <param-name>application</param-name>
+            <param-value>com.itmill.toolkit.demo.Shortcut</param-value>
+        </init-param>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>KeyboardShortcut</servlet-name>
+        <url-pattern>/shortcut/*</url-pattern>
     </servlet-mapping>
+    
 
        <welcome-file-list>
                <welcome-file>index.html</welcome-file>
index 971990a86a638ee1fda428459368c2304840afb0..fe2acbc69826c628f66689286328b113b002067e 100644 (file)
 <div id="itmilllogo"><h1>IT Mill Toolkit</h1></div>
 
 <div id="toolkit"></div>
-<!--
-<h2>IT Mill Toolkit Demo</h2>
--->
+
   <div id="feature-browser">
        <h3>Feature Browser</h3>
        <div class="option">
         <span class="link"><a href="features/?renderingMode=detect">Autodetected mode</a></span>
         <span class="desc">Use AJAX if supported by browser, otherwise fallback to HTML mode</span>
        </div>
-       
        <div class="option">
         <span class="link"><a href="features/?renderingMode=ajax">AJAX mode</a></span>
         <span class="desc">Select AJAX-based technology mode</span>
        </div>
-       
        <div class="option">
         <span class="link"><a href="features/?renderingMode=html">HTML mode</a></span>
         <span class="desc">Select page based request/response technology mode</span>
        </div>
-       
+       <br />  
+  </div>
+  
+  <div id="sample-code">
+       <h4>Simple applications</h4>
+       <div class="option">
+        <span class="link"><a href="HelloWorld">HelloWorld</a></span>
+        <span class="desc">Simple Toolkit application.</span>
+       </div>
+       <div class="option">
+        <span class="link"><a href="Calc">Calc</a></span>
+        <span class="desc">Simple Toolkit application where events are used.</span>
+       </div>
+       <br />
+  </div>
+  
+  <div id="feature-browser">
+       <h3><a href="openajax/index.html">OpenAjax Hub Conformance tests</a></h3>
+       <div class="option">
+        Integrates sample Toolkit application to HTML page which performs basic OpenAjax hub conformance tests.
+        See HTML source what is required for integration.
+        <b>Note:</b> Embedded FeatureBrowser application is the same
+        application instance that can be accessed as standalone application, see <code>FeatureBrowser</code>.
+       </div>  
+  </div>
+  
+   <div id="feature-browser">
+       <h3><a href="EmbeddedToolkit.jsp">Embedding Toolkit application to other frameworks</a></h3>
+       <div class="option">
+        Integrates sample Toolkit application to JSP page. See HTML source or respective jsp 
+        file what is required for integration. <b>Note:</b> Embedded TableDemo application is the same
+        application instance that can be accessed as standalone application, see <code>TableDemo</code>.
+       </div>  
+  </div>
+  
+  <div id="feature-browser">
+       <h3><a href="QueryContainerDemo">QueryContainerDemo</a></h3>
+       <div class="option">
+        This example shows how Table, Select and Tree UI components can use Containers. 
+        QueryContainer is used to bind SQL table rows into Toolkit UI components. 
+        Table has few example actions added. Also embedding XHTML through Label components is used. 
+        Demonstrates: how to create <code>com.itmill.toolkit.data.Container</code> and set it as 
+        datasource to UI components <code>com.itmill.toolkit.ui.Component.Tree</code>, how to 
+        receive ExpandEvent and implement <code>com.itmill.toolkit.ui.Tree.ExpandListener</code>, 
+        how to use <code>com.itmill.toolkit.event.Action</code>.
+       </div>  
+  </div>
+  
+   <div id="feature-browser">
+       <h3><a href="TableDemo">TableDemo</a></h3>
+       <div class="option">
+        Similar to QueryContainerDemo but uses table only. Two buttons demonstrate another 
+        possibility how event framework works, in this example specific methods are 
+        registered for button click events. <b>Note:</b> This application instance is embedded
+        to jsp page also, see <code>EmbeddedToolkit.jsp</code> above.
+       </div>  
+  </div>
+  
+  <div id="feature-browser">
+       <h3><a href="TreeFilesystemContainer">TreeFilesystemContainer</a></h3>
+       <div class="option">
+        Browsable file explorer using Toolkit Tree component. Demonstrates: how to
+        use <code>com.itmill.toolkit.ui.Component.Tree</code> datasource container,
+        how to create <code>com.itmill.toolkit.data.util.FilesystemContainer</code>,
+        how to read <code>com.itmill.toolkit.ui.Component.Event</code> objects, how
+        to receive and handle any event by implementing
+        <code>com.itmill.toolkit.ui.Component.Listener</code>.
+       </div>  
+  </div>
+  
+  <div id="feature-browser">
+       <h3><a href="TreeFilesystem">TreeFilesystem</a></h3>
+       <div class="option">
+        Browsable file explorer using Toolkit Tree component. Demonstrates: how
+        to add items hierarchially into
+        <code>com.itmill.toolkit.ui.Component.Tree</code>, how to receive
+        ExpandEvent and implement
+        <code>com.itmill.toolkit.ui.Tree.ExpandListener</code>.
+       </div>  
+  </div>
+  
+  <div id="feature-browser">
+       <h3><a href="ModalWindow">Modal window</a></h3>
+       <div class="option">
+        Example of Modal Window.
+       </div>  
+  </div>
+
+  <div id="feature-browser">
+       <h3><a href="shortcut">Keyboard events demo</a></h3>
+       <div class="option">
+        Contains few Toolkit UI components that can be interacted by pressing keys in keyboard.
+       </div>  
+  </div>
+  
+  <div id="feature-browser">
+       <h3><a href="Parameters">URI and Parameter handling demo</a></h3>
+       <div class="option">
+        This is a demonstration of how URL parameters can be recieved and handled.
+        Parameters and URL:s can be received trough the windows by registering
+        URIHandler and ParameterHandler classes window.
+       </div>  
   </div>
 
+  <div id="sample-code">
+       <h4>Upgrading from Millstone 3 to Toolkit 4.0.0</h4>
+       <div class="option">
+        <span class="link"><a href="Login">Login</a></span>
+        <span class="desc">Simple Millstone 3.1.1 application that was upgraded to Toolkit 4.0.0 by updating three import rows.</span>
+       </div>
+       <br />
+       <br />
+  </div>
+  
+<!--
   <div id="sample-code">
        <h3>IT Mill Toolkit Sample Code</h3>
 
         <span class="desc">See source code how a simple Toolkit application is created</span>
     </div>
   </div>
+-->
 
 </div><!-- // Container -->
 
diff --git a/WebContent/openajax/HubTest-BasicConformance.js b/WebContent/openajax/HubTest-BasicConformance.js
new file mode 100644 (file)
index 0000000..ca8ce23
--- /dev/null
@@ -0,0 +1,62 @@
+/*******************************************************************************\r
+ * HubTest-BasicConformance.js:\r
+ *             JavaScript for test case HubTest-BasicConformance.html.\r
+ *\r
+ *             This JavaScript MUST NOT BE CHANGED.\r
+ *\r
+ * Copyright 2007 OpenAjax Alliance\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not \r
+ * use this file except in compliance with the License. You may obtain a copy \r
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless \r
+ * required by applicable law or agreed to in writing, software distributed \r
+ * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR \r
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the \r
+ * specific language governing permissions and limitations under the License.\r
+ *\r
+ ******************************************************************************/\r
+\r
+var checkPrefix = HubTest_BasicConformance_MyPrefix;\r
+var publishSubscribeWorking = false;\r
+var markupScannerWorking = false;\r
+var loadHandlerWorking = false;\r
+\r
+function TestWasSuccessful(idstring) {\r
+       var elem = document.getElementById(idstring);\r
+       elem.innerHTML = '<span style="color:green">TEST SUCCEEDED!!!</span>';\r
+}\r
+\r
+function subscribeTestCB(prefix, name, subscriberData, publisherData) {\r
+       publishSubscribeWorking = true;\r
+}\r
+\r
+/* This function updates the HTML DOM based on whether the various test succeeded.\r
+       It is invoked when the document 'load' event is raised. */\r
+function ConformanceChecks() {\r
+       var elem = document.getElementById("LibraryName");\r
+       elem.innerHTML = '<span style="color:green">For library: '+checkPrefix+'</span>';\r
+       if (OpenAjax.libraries[checkPrefix]) {\r
+               TestWasSuccessful("registerLibraryResult");\r
+       }\r
+       if (OpenAjax.globals[checkPrefix]) {\r
+               TestWasSuccessful("registerGlobalsResult");\r
+       }\r
+       if (loadHandlerWorking) {\r
+               TestWasSuccessful("addOnLoadResult");\r
+       }\r
+       OpenAjax.subscribe("foo","bar",subscribeTestCB);\r
+       OpenAjax.publish("foo","bar");\r
+       if (publishSubscribeWorking) {\r
+               TestWasSuccessful("PublishSubscribeResult");\r
+       }\r
+       if (markupScannerWorking) {\r
+               TestWasSuccessful("MarkupScannerResult");\r
+       }\r
+}\r
+\r
+/* This logic verifies that the markup scanner is working */\r
+function markupScannerCB(element) {\r
+       markupScannerWorking = true;\r
+}\r
+OpenAjax.registerAttrScanCB("foo", "class", "match", "HubTestResult", markupScannerCB);\r
+\r
diff --git a/WebContent/openajax/OpenAjax.js b/WebContent/openajax/OpenAjax.js
new file mode 100644 (file)
index 0000000..9f50c09
--- /dev/null
@@ -0,0 +1,1063 @@
+/*******************************************************************************\r
+ * OpenAjax.js / OpenAjaxBootstrap.js:\r
+ *\r
+ * Component of the OpenAjax Hub, as specified by OpenAjax Alliance.\r
+ * Specification is under development at: \r
+ *\r
+ *   http://www.openajax.org/member/wiki/OpenAjax_Hub_Specification\r
+ *\r
+ * In the current implementation, the OpenAjax.js file is created by simply \r
+ * concatenating the individual component JavaScript files in a particular order, with\r
+ * where this file must be the first one in the list.\r
+ *\r
+ * Copyright 2006-2007 OpenAjax Alliance\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not \r
+ * use this file except in compliance with the License. You may obtain a copy \r
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless \r
+ * required by applicable law or agreed to in writing, software distributed \r
+ * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR \r
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the \r
+ * specific language governing permissions and limitations under the License.\r
+ *\r
+ ******************************************************************************/\r
+\r
+/*\r
+ * OpenAjax Hub configuration parameters.\r
+ * These configuration parameters are meant for use by the application developer,\r
+ * not the Ajax runtime library developer. \r
+ *\r
+ * The following is a quick summary of available parameters.\r
+ * Refer to the OpenAjax Hub Specification for the official and detailed definition of these features.\r
+ *\r
+ * bootstrapFile = string \r
+ *             Holds name of JavaScript file that initializes OpenAjax object and includes definition of\r
+ *             OpenAjax.require() function for dynamic module loading.\r
+ * idsToScan = array of strings (Default is [])\r
+ *             Provides to the OpenAjax Hub a list of element IDs upon which to invoke the\r
+ *             markup scanner.\r
+ * scanPage = boolean (Default is true)\r
+ *             Tells the OpenAjax Hub whether to auto-invoke its markup scanner \r
+ *             on the BODY element in the document.\r
+ */\r
+if (typeof OpenAjaxConfig == "undefined") {\r
+       OpenAjaxConfig = {};\r
+}\r
+\r
+/*\r
+ * Only create an OpenAjax object if it doesn't exist already.\r
+ * (If it already exists, then assume the prior instance provides the services that are needed.\r
+ * Also, attempts to initialize a second time probably will clobber key data from existing OpenAjax object.)\r
+ */\r
+if (typeof OpenAjax == "undefined") {\r
+\r
+       OpenAjax = {\r
+\r
+               implementer: "http://openajax.org",\r
+               implVersion: "0.3",\r
+               specVersion: "0.3",\r
+               implExtraData: {},\r
+               _allModules: {"Libraries":1,"LoadUnload":1,"Globals":1,"PublishSubscribe":1,"MarkupScanner":1},\r
+               loadDone: false,\r
+               unloadDone: false,\r
+\r
+\r
+               // Public function. If module has not been loaded already, load it now.\r
+               require: function(modules) {\r
+                       var head = document.head;\r
+                       if (!head) {\r
+                               // Overcome bug in Mozilla when XSLT generates the HTML document.\r
+                               head = document.getElementsByTagName("head").item(0);\r
+                       }\r
+                       if (!head) {\r
+                               return;\r
+                       }\r
+                       var reqmods = modules.split(",");\r
+                       var allmods = OpenAjax._allModules;\r
+                       for (var i=0; i<reqmods.length; i++) {\r
+                               var module = reqmods[i];\r
+                               if (!allmods[module]) {\r
+                                       break;\r
+                               }\r
+                               if (OpenAjax["__module"+module]){\r
+                                       break;\r
+                               }\r
+                               var fname=OpenAjax._path+module+".js";\r
+                               var se = document.createElement("script");\r
+                               se.setAttribute("type", "text/javascript");\r
+                               se.setAttribute("src", fname);\r
+                               head.appendChild(se);\r
+                       }\r
+               }\r
+       };\r
+\r
+\r
+       // Find path to bootstrap file (for case where bootstrapping approach is used).\r
+       // Note: can't get script tags via document.getElementsByTagName("script") due to Mozilla bug.\r
+       // Instead, have to loop through children of HEAD looking for SCRIPT elements.\r
+       var head = document.getElementsByTagName("head").item(0);\r
+       var children = head.childNodes;\r
+       var re = new RegExp((OpenAjaxConfig.bootstrapFile || "OpenAjaxBootstrap.js")+".*$");\r
+       for (var i=0; i < children.length; i++) {\r
+               var s = children[i];\r
+               if (s.nodeType != 1 || s.nodeName != "SCRIPT") {\r
+                       continue;\r
+               }\r
+               if (s.src && s.src.match(re)) {\r
+                       // FIXME: We need automated tests for all of this bootstrapping logic.\r
+                       // FIXME: load= has yet to be tested. May not work at all.\r
+                       OpenAjax._path = s.src.replace(re,'');\r
+                       var requiredModules = s.src.match(/\?.*load=([A-Za-z,]*)/);\r
+                       if (requiredModules) {\r
+                               OpenAjax.require(requiredModules);\r
+                       } else {\r
+                               // Note: We do not load all modules by default.\r
+                               OpenAjax.require("Libraries,LoadUnload,Globals,PublishSubscribe,MarkupScanner");\r
+                       }\r
+                       break;\r
+               }\r
+       }\r
+\r
+}\r
+\r
+/* For single-file distribution of entire Hub, the other OpenAjax Hub JavaScript files \r
+       should be concatenated after this comment into file OpenAjax.js. */\r
+\r
+/*******************************************************************************\r
+ * Libraries.js:\r
+ *\r
+ * A component of the OpenAjax Hub, as specified by OpenAjax Alliance.\r
+ * Specification is under development at: \r
+ *\r
+ *   http://www.openajax.org/member/wiki/OpenAjax_Hub_Specification\r
+ *\r
+ * This file manages the Ajax libraries that register themselves with\r
+ * the OpenAjax Hub via the OpenAjax.registerLibrary() method.\r
+ *\r
+ * The logic from OpenAjaxBootstrap.js must have been loaded before this file.\r
+ *\r
+ * Copyright 2006-2007 OpenAjax Alliance\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not \r
+ * use this file except in compliance with the License. You may obtain a copy \r
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless \r
+ * required by applicable law or agreed to in writing, software distributed \r
+ * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR \r
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the \r
+ * specific language governing permissions and limitations under the License.\r
+ *\r
+ ******************************************************************************/\r
+\r
+       OpenAjax.__moduleLibraries = 1;\r
+\r
+       // holds the libraries that have been registered so far.\r
+       OpenAjax.libraries = {};\r
+\r
+       /*\r
+        *      Registers an Ajax library with the OpenAjax Hub.\r
+        */\r
+       OpenAjax.registerLibrary = function (\r
+                       prefix,                 // Unique library ID string, suitable as prefix in xmlns declaration\r
+                       namespaceURI,   // Namespace URI string suitable for use with xmlns attribute\r
+                       version,                // Library version in the form of #[.#]*, such as "1", "1.1" or "1.20.2".\r
+                       extraData){             // Optional, can be null. Arbitrary Object holding extra info about library.\r
+               if (this.libraries[prefix]) {\r
+                       throw new Error("Repeat attempt to register library: " + prefix);\r
+               }\r
+               this.libraries[prefix] = {\r
+                       prefix: prefix,\r
+                       namespaceURI: namespaceURI,\r
+                       version: version,\r
+                       extraData: extraData\r
+               };\r
+       };\r
+\r
+       /*\r
+        *      Unregisters an Ajax library with the OpenAjax Hub.\r
+        */\r
+\r
+       OpenAjax.unregisterLibrary = function(\r
+                       prefix ){                       // Library prefix that was passed to registerLibrary().\r
+\r
+               // Remove references to any globals registered to this library.\r
+               // (See Globals.js)\r
+               if (this.globals) {\r
+                       delete this.globals[prefix];\r
+               }\r
+\r
+               // Remove registration for this library.\r
+               delete this.libraries[prefix];\r
+       };\r
+\r
+       // Register the OpenAjax Hub itself as a library.\r
+       OpenAjax.registerLibrary("OpenAjax", "http://openajax.org/hub", "0.3", {});\r
+/*******************************************************************************\r
+ * LoadUnload.js:\r
+ *\r
+ * A component of the OpenAjax Hub, as specified by OpenAjax Alliance.\r
+ * Specification is under development at: \r
+ *\r
+ *   http://www.openajax.org/member/wiki/OpenAjax_Hub_Specification\r
+ *\r
+ * This file manages load and unload event handlers on the BODY element.\r
+ *\r
+ * The logic from OpenAjaxBootstrap.js must have been loaded before this file.\r
+ *\r
+ * Copyright 2006-2007 OpenAjax Alliance\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not \r
+ * use this file except in compliance with the License. You may obtain a copy \r
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless \r
+ * required by applicable law or agreed to in writing, software distributed \r
+ * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR \r
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the \r
+ * specific language governing permissions and limitations under the License.\r
+ *\r
+ ******************************************************************************/\r
+\r
+       OpenAjax.__moduleLoadUnload = 1;\r
+\r
+       OpenAjax._callbacks = {load: {}, unload: {}};\r
+\r
+(function(){\r
+       var addCallback = function(     \r
+                       eventName,  // load or unload\r
+                       funcOrName,     // callback function or string that holds name of function\r
+                       scope,          // object, default is window\r
+                       phase) {        // "library", "component", or "application", default is "application"\r
+               if(typeof funcOrName == "string"){\r
+                       // get a function object\r
+                       scope = scope || window;\r
+                       funcOrName = scope[funcOrName];\r
+               }\r
+               phase = phase || "application";\r
+               var cb = OpenAjax._callbacks[eventName];\r
+               (cb[phase]=cb[phase]||[]).push(funcOrName);\r
+       };\r
+\r
+       /*\r
+        * Registers an event handler non-destructively to be fired\r
+        * when the window's onload handler is executed\r
+        */\r
+       OpenAjax.addOnLoad = function(  \r
+                       funcOrName,     // callback function or string that holds name of function\r
+                       scope,          // object, defaults is window\r
+                       phase){         // "library", "component", or "application", default is "application"\r
+\r
+               addCallback("load", funcOrName, scope, phase);\r
+       };\r
+\r
+       /*\r
+        * Registers an event handler non-destructively to be fired\r
+        * when the window's onunload handler is executed\r
+        */\r
+       OpenAjax.addOnUnload = function(\r
+                       funcOrName,     // callback function or string that holds name of function\r
+                       scope,          // object, defaults is window\r
+                       phase){         // "library", "component", or "application", default is "application"\r
+\r
+               addCallback("unload", funcOrName, scope, phase);\r
+       };\r
+})();\r
+\r
+(function(){\r
+       var invokeCallbacks = function(phase, eventName) {\r
+               var arr = OpenAjax._callbacks[eventName][phase]||[];\r
+               for (var i=0; i < arr.length; i++) {\r
+                       arr[i].call();\r
+               }\r
+               // Callbacks have been called, so clear array.\r
+               OpenAjax._callbacks[eventName][phase] = [];\r
+       };\r
+\r
+       /*\r
+        * This is the OpenAjax onload event handler that the OpenAjax library\r
+        * registers on the BODY element.\r
+        */\r
+       OpenAjax.OnLoadHandler = function() {\r
+               // Invoke registered load event handlers for "library" phase.\r
+               invokeCallbacks("library", "load");\r
+               // Invoke registered load event handlers for "component" phase.\r
+               invokeCallbacks("component", "load");\r
+\r
+               // Invoke markup scanner if markup scanner module is loaded.\r
+               // FIXME: Need to add a test for this check.\r
+               if (OpenAjax.__moduleMarkupScanner) {\r
+                       OpenAjax.scanDocument();\r
+               }\r
+\r
+               // Invoke registered load event handlers for "application" phase.\r
+               invokeCallbacks("application", "load");\r
+\r
+               // Set flag indicating that OpenAjax load handling is done.\r
+               // FIXME: Need to add a test for this.\r
+               OpenAjax.loadDone = true;\r
+       };\r
+\r
+\r
+       /*\r
+        * This is the OpenAjax onunload event handler that the OpenAjax library\r
+        * registers on the BODY element.\r
+        */\r
+       OpenAjax.OnUnloadHandler = function() {\r
+               // Invoke registered unload event handlers for "application" phase.\r
+               invokeCallbacks("application", "unload");\r
+\r
+               // Invoke registered unload event handlers for "component" phase.\r
+               invokeCallbacks("component", "unload");\r
+\r
+               // Invoke registered unload event handlers for "library" phase.\r
+               invokeCallbacks("library", "unload");\r
+\r
+               // Set flag indicating that OpenAjax unload handling is done.\r
+               // FIXME: Need to add a test for this.\r
+               OpenAjax.unloadDone = true;\r
+       };\r
+})();\r
+\r
+(function(){\r
+       /*\r
+        * Private function that attaches an event listener for a given event\r
+        * on the specified target object.\r
+        */\r
+       var addOnEvent = function(\r
+                       type,           // event type string\r
+                       funcOrName,     // callback function or string that holds name of function\r
+                       scope){         // object, defaults is window\r
+\r
+               if(typeof funcOrName == "string"){\r
+                       scope = scope || window;\r
+                       funcOrName = scope[funcOrName];\r
+               }\r
+               var enclosedFunc = function(){ return funcOrName.apply(scope, arguments); };\r
+\r
+               if(window["attachEvent"]){\r
+                       window.attachEvent("on"+type, enclosedFunc);\r
+               } else if(window["addEventListener"]){\r
+                       window.addEventListener(type, enclosedFunc, false);\r
+               } else if(document["addEventListener"]){\r
+                       document.addEventListener(type, enclosedFunc, false);\r
+               }\r
+       };\r
+\r
+       /*\r
+        * Register the OpenAjax load and unload event handlers on the BODY element.\r
+        */\r
+       addOnEvent("load", OpenAjax.OnLoadHandler);\r
+       addOnEvent("unload", OpenAjax.OnUnloadHandler);\r
+})();\r
+/*******************************************************************************\r
+ * Globals.js:\r
+ *\r
+ * A component of the OpenAjax Hub, as specified by OpenAjax Alliance.\r
+ * Specification is under development at: \r
+ *\r
+ *   http://www.openajax.org/member/wiki/OpenAjax_Hub_Specification\r
+ *\r
+ * This file manages the global objects that are added to the JavaScript\r
+ * runtime environment by the Ajax libraries.\r
+ *\r
+ * Includes function OpenAjax.globalsCollisionCheck(globals, prefix), \r
+ * which determines whether the list of global objects in array 'globals'\r
+ * collides with any of the global objects used by currently\r
+ * registered Ajax libraries.\r
+ *\r
+ * The logic from OpenAjaxBootstrap.js must have been loaded before this file.\r
+ *\r
+ * Copyright 2006-2007 OpenAjax Alliance\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not \r
+ * use this file except in compliance with the License. You may obtain a copy \r
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless \r
+ * required by applicable law or agreed to in writing, software distributed \r
+ * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR \r
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the \r
+ * specific language governing permissions and limitations under the License.\r
+ *\r
+ ******************************************************************************/\r
+\r
+       OpenAjax.__moduleGlobals = 1;\r
+\r
+       // Hash mapping libraries registered so far to a list of their global object names\r
+       OpenAjax.globals = {};\r
+\r
+       /*\r
+        *      Identifies the global objects that the given Ajax library is adding to\r
+        *      the JavaScript runtime environment.  If any collisions are found,\r
+        *      a runtime error will be raised.\r
+        */\r
+       OpenAjax.registerGlobals = function (\r
+                       prefix,                 // Library prefix that was passed to registerLibrary().\r
+                       globals){               // An array of strings that identify the globals added \r
+                                                       // to the JavaScript runtime environment by this library.\r
+\r
+               // Check the list of globals against the previously registered globals.\r
+               var err = this.globalsCollisionCheck(globals, prefix);\r
+               if (err) {\r
+                       throw new Error(err);\r
+               }\r
+\r
+               // Everything is OK, so register the globals for this library.\r
+               this.globals[prefix] = globals;\r
+       };\r
+\r
+\r
+       /*\r
+        *      Determines whether the list of global objects in array 'candidates'\r
+        *      collides with any of the global objects that have been listed by currently\r
+        *      registered Ajax libraries.\r
+        */\r
+       //FIXME: Would be better if this returned an array of collisions, where the array was machine-parsable.\r
+       OpenAjax.globalsCollisionCheck = function (\r
+                       candidates,     // An array of strings that identify the globals against which we want to check\r
+                       prefix){                        // If provided, then don't compare 'globals' against globals registered by 'prefix'.\r
+               var err = null;\r
+\r
+               // see if there are collisions\r
+               for (var registered in this.globals) {\r
+                       // do not check the list of globals for 'prefix'.\r
+                       if (registered != prefix) {\r
+                               var names = this.globals[registered];\r
+                               for (var x=0; x<candidates.length; x++) {\r
+                                       candidate_global = candidates[x];\r
+                                       for (var y=0; y<names.length; y++) {\r
+                                               if (candidate_global == names[y]) {\r
+                                                       err = "Global object collision for object '"+candidate_global+"'. "+\r
+                                                                       "Previously registered by library '"+registered+"'.";\r
+                                                       if (prefix) {\r
+                                                               err += " Library attempting to register this global: '"+prefix+"'.";\r
+                                                       }\r
+                                                       break;\r
+                                               }\r
+                                       }\r
+                                       if (err) {\r
+                                               break;\r
+                                       }\r
+                               }\r
+                       }\r
+                       if (err) {\r
+                               break;\r
+                       }\r
+               }\r
+               return err;\r
+       }\r
+\r
+\r
+\r
+       // Register the OpenAjax Hub's globals\r
+       OpenAjax.registerGlobals("OpenAjax", ["OpenAjax","OpenAjaxConfig"]);\r
+/*******************************************************************************\r
+ * PublishSubscribe.js:\r
+ *\r
+ * A component of the OpenAjax Hub, as specified by OpenAjax Alliance.\r
+ * Specification is under development at: \r
+ *\r
+ *   http://www.openajax.org/member/wiki/OpenAjax_Hub_Specification\r
+ *\r
+ * This file provides a publish/subscribe mechanism such that Ajax libraries\r
+ * can communication with each other. An Ajax library can publish events\r
+ * to which other Ajax libraries can subscribe.\r
+ *\r
+ * The logic from OpenAjaxBootstrap.js must have been loaded before this file.\r
+ *\r
+ * Copyright 2006-2007 OpenAjax Alliance\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not \r
+ * use this file except in compliance with the License. You may obtain a copy \r
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless \r
+ * required by applicable law or agreed to in writing, software distributed \r
+ * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR \r
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the \r
+ * specific language governing permissions and limitations under the License.\r
+ *\r
+ ******************************************************************************/\r
+\r
+/* FIXME\r
+add unsubcribe method\r
+*/\r
+\r
+       OpenAjax.__modulePublishSubscribe = 1;\r
+\r
+       // Private variable, holds the listeners that Ajax libraries have registered.\r
+       OpenAjax._listeners = { "*": { "*": [] } };\r
+\r
+       /*\r
+        *      Allows registration of interest in named events based on\r
+        *      toolkit-specific prefix and event name. Global event\r
+        *      matching is provided by passing "*" in the prefix and/or\r
+        *      name arguments. Optional arguments may be specified for\r
+        *      executing the specified handler function in a provided\r
+        *      scope and for further filtering events prior to application\r
+        */\r
+       OpenAjax.subscribe = function (\r
+                       prefix,         // Library prefix that was passed to registerLibrary().string, or null, or "*" to match all.\r
+                       name,           // Event name. Can be "*" to match all.\r
+                       refOrName,      // callback function or string that holds name of function\r
+                       scope,          // object, default is window\r
+                       subscriberData, // arbitrary object, can be null\r
+                       filter){                // function\r
+\r
+               // NOTE: the following code is written in a verbose style for the\r
+               // sake of readability. Non-reference implementations should use a\r
+               // terser variant.\r
+\r
+               if (prefix == null || prefix == "") {\r
+                       prefix = "__null__";\r
+               }\r
+\r
+               if(!this._listeners[prefix]){\r
+                       this._listeners[prefix] = { "*": [] };\r
+               }\r
+\r
+               if(!this._listeners[prefix][name]){\r
+                       this._listeners[prefix][name] = [];\r
+               }\r
+\r
+               if (typeof subscriberData == 'undefined') {\r
+                       subscriberData = null;\r
+               }\r
+\r
+               if(!scope){\r
+                       scope = window;\r
+               }\r
+\r
+               if(typeof refOrName == "string"){\r
+                       // get a function object\r
+                       refOrName = scope[refOrName];\r
+               }\r
+\r
+               this._listeners[prefix][name].push({\r
+                       "func": refOrName, \r
+                       "data": subscriberData,\r
+                       "scope": scope, \r
+                       "filter": filter\r
+               });\r
+       }\r
+\r
+\r
+       /*\r
+        *      Publish events based on toolkit-specific prefix and event name.\r
+        */\r
+       OpenAjax.publish = function (\r
+                       prefix,                 // Library prefix that was passed to registerLibrary().string, or null.\r
+                       name,                   // Event name.\r
+                       publisherData){ // arbitrary object, can be null\r
+\r
+               // NOTE: the following code is written in a verbose style for the\r
+               // sake of readability. Non-reference implementations should use a\r
+               // terser variant.\r
+\r
+               if (prefix == null || prefix == "") {\r
+                       prefix = "__null__";\r
+               }\r
+               if (typeof publisherData == 'undefined') {\r
+                       publisherData = null;\r
+               }\r
+\r
+               var globals = this._listeners["*"]["*"];\r
+\r
+               var handlers = [];\r
+\r
+               // aggregate the various handler sets to form a single list of handlers\r
+               if(this._listeners[prefix]){\r
+\r
+                       if(this._listeners[prefix][name]){\r
+                               handlers = handlers.concat( this._listeners[prefix][name] );\r
+                       }\r
+\r
+                       if(this._listeners[prefix]["*"]){\r
+                               handlers = handlers.concat( this._listeners[prefix]["*"] );\r
+                       }\r
+\r
+               }else{\r
+                       handlers = globals;\r
+               }\r
+\r
+               if(this._listeners["*"][name]){\r
+                       handlers = handlers.concat( this._listeners["*"][name] );\r
+               }\r
+\r
+               if(handlers.length == 0){\r
+                       // avoid iterations if we aren't going to call any listeners anyway\r
+                       return false;\r
+               }\r
+\r
+               for(var x=0; x<handlers.length; x++){\r
+\r
+                       var argsArr = [prefix, name, handlers[x].data, publisherData];\r
+                       if(typeof handlers[x].filter == "function"){\r
+                               if( !handlers[x].filter.apply(window, argsArr) ){ continue; }\r
+                       }\r
+\r
+                       handlers[x].func.apply(handlers[x].scope, argsArr);\r
+\r
+               }\r
+               return true;\r
+       }/*******************************************************************************\r
+ * MarkupScanner.js:\r
+ *\r
+ * A component of the OpenAjax Hub, as specified by OpenAjax Alliance.\r
+ * Specification is under development at: \r
+ *\r
+ *   http://www.openajax.org/member/wiki/OpenAjax_Hub_Specification\r
+ *\r
+ * This file manages the process of dispatching particular elements within\r
+ * the document to particular Ajax runtime libraries in order to\r
+ * perform that library's DOM transformation on the subtree headed by\r
+ * that particular element.\r
+ *\r
+ * An Ajax library registers callbacks which are invoked either\r
+ * before, during, or after a top-down analysis of the document DOM.\r
+ *\r
+ * The logic from OpenAjaxBootstrap.js must have been loaded before this file.\r
+ *\r
+ * Copyright 2006-2007 OpenAjax Alliance\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not \r
+ * use this file except in compliance with the License. You may obtain a copy \r
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless \r
+ * required by applicable law or agreed to in writing, software distributed \r
+ * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR \r
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the \r
+ * specific language governing permissions and limitations under the License.\r
+ *\r
+ ******************************************************************************/\r
+\r
+       OpenAjax.__moduleMarkupScanner = 1;\r
+\r
+       /* -------------- PRIVATE VARIABLES AND FUNCTIONS -------------------- */\r
+\r
+       // Private variables, holds the markup scanner callbacks to invoke in response\r
+       // to various built-in scanning features.\r
+       // The value of each is an array of objects, where each object\r
+       //    holds the parameters from the corresponding register function.\r
+       OpenAjax._TagNameCBs = [];                      // Examine element's tagname, possibly prefixed\r
+       OpenAjax._AttrNameCBs = [];                     // Look for a particular attribute, possibly prefixed\r
+\r
+       // Private variable, holds the custom markup scanner callbacks that have been registered so far.\r
+       // The value of each entry is a function pointer to the registered markup scanner callback.\r
+       OpenAjax._CustomScannerCBs = { };\r
+\r
+       /*\r
+        *      Utility routines used by the public functions listed further down in the file.\r
+        */\r
+\r
+       /* Add a given callback function that the appropriate private array. */\r
+       OpenAjax._regScanCB = function (\r
+                       functionName,           // Public function name for error messages\r
+                       arrayToAdjust,          // The array to which this registration will be added.\r
+                       prefix,                         // The prefix that corresponds to this library.\r
+                       nodeName,                       // For attributes: attr name. For elements: tag name. Can have namespace prefix.\r
+                       checkType,                      // "match"=must match entire string, "match-start"=must match initial characters\r
+                                                               // For attribute matching, additional options are available for space-separated\r
+                                                               // value lists, such as 'class' attribute:\r
+                                                               // "token"=must match entire token, "token-start"=must mast initial characters\r
+                                                               // For element matching, additional options are available.\r
+                                                               // "match-namespace"=matches given namespace URI, "match-prefix"=matches given prefix.\r
+                       checkString,            // string to check\r
+                       refOrName,                      // function or string that will be called with the HTML subtree root element\r
+                       scope){                         // object, default is window\r
+\r
+               var nsuri;\r
+               if(!scope){\r
+                       scope = window;\r
+               }\r
+               if(typeof refOrName == "string"){\r
+                       // get a function object\r
+                       refOrName = scope[refOrName];\r
+               }\r
+               if(typeof refOrName != "function"){\r
+                       throw new Error("invalid function reference passed to "+functionName+"()");\r
+               }\r
+               if (nodeName) {\r
+                       if(typeof nodeName != "string"){\r
+                               throw new Error("nodeName is not a string in "+functionName+"()");\r
+                       }\r
+                       var t = nodeName.split(":");\r
+                       // To save space, we assume parameters passed according to rules, so if there is at least one colon, assume there is only one.\r
+                       if (t.length >= 2) {\r
+                               nsuri = OpenAjax.libraries[t[0]].namespaceURI;\r
+                               nodeName = t[1];\r
+                       } else {\r
+                               nsuri = null;\r
+                               // No namespace prefix, so nodeName already has correct value.\r
+                       }\r
+               }\r
+               arrayToAdjust.push({\r
+                       "prefix": prefix, \r
+                       "nsuri": nsuri, \r
+                       "nodeName": nodeName, \r
+                       "checkType": checkType,\r
+                       "checkString": checkString, \r
+                       "func": refOrName\r
+               });\r
+       }\r
+\r
+       /* Remove callback functions from the appropriate private array. */\r
+       OpenAjax._unregScanCB = function (\r
+                       functionName,           // Public function name for error messages\r
+                       arrayToAdjust,          // The array from which registrations will be removed.\r
+                       prefix){                        // The prefix that corresponds to this library.\r
+               for (var i=arrayToAdjust.length-1; i >=0 ; i--) {\r
+                       if (arrayToAdjust[i].prefix == prefix) {\r
+                               // Use 'slice' instead of 'splice' due to bug in IE7.\r
+                               var tail = arrayToAdjust.slice(i+1);\r
+                               var len = arrayToAdjust.length;\r
+                               for (var p=i; p<len; p++) {\r
+                                       arrayToAdjust.pop();\r
+                               }\r
+                               arrayToAdjust = arrayToAdjust.concat(tail);\r
+                       }\r
+               }\r
+               return(arrayToAdjust);\r
+       }\r
+\r
+       /* -------------- PUBLIC FUNCTIONS -------------------- */\r
+       /* -------------- BUILT-IN SCANNER CHECKS ------------- */\r
+\r
+       /*\r
+        *      Registers a callback function that is invoked for element nodes in the document\r
+        *      that have a particular attribute set to a particular value.\r
+        */\r
+       OpenAjax.registerAttrScanCB = function (\r
+                       prefix,                         // The prefix that corresponds to this library.\r
+                       attrName,                       // attribute to check\r
+                       checkType,                      // "match"=must match entire string, "match-start"=must match initial characters\r
+                                                               // For attributes with space-separated values,\r
+                                                               // "token"=must match entire token, "token-start"=must mast initial characters\r
+                       checkString,            // value string to check\r
+                       refOrName,                      // function or string that will be called with the HTML subtree root element\r
+                       scope){                         // object, default is window\r
+               if (OpenAjax._error) {\r
+                       throw OpenAjax._error;  // Hub is in bad state. Bail with error message.\r
+               }\r
+               if (arguments.length < 5) {\r
+                       throw new Error("Insufficient number of arguments in OpenAjax.registerAttrScanCB");\r
+               }\r
+               OpenAjax._regScanCB("registerAttrScanCB", OpenAjax._AttrNameCBs,\r
+                                                       prefix, attrName, checkType, checkString, refOrName, scope);\r
+       }\r
+\r
+       /*\r
+        *      Unregisters all callback functions registered by the given library for the attribute.\r
+        */\r
+       OpenAjax.unregisterAttrScanCB = function(prefix){ \r
+               OpenAjax._AttrNameCBs = OpenAjax._unregScanCB("unregisterAttrScanCB", OpenAjax._AttrNameCBs, prefix);\r
+       }\r
+\r
+       /*\r
+        *      Registers a callback function that is invoked for element nodes in the document\r
+        *      that have a particular tagName (with or without NS), namespace, or prefix.\r
+        */\r
+       OpenAjax.registerTagnameScanCB = function (\r
+                       prefix,                         // The prefix that corresponds to this library.\r
+                       checkType,                      // "match"=must match localName exactly, along with NS or prefix if not null.\r
+                                                               // "match-start"=must match first N chars of localName, along with NS or prefix if not null.\r
+                                                               // "match-namespace"=must be in a given NS (requires DOM Level 2 namespaces),\r
+                                                               // "match-prefix"=must have given prefix (with or without DOM Level 2 namespaces).\r
+                       checkString,            // value string to check\r
+                       refOrName,                      // function or string that will be called with the HTML subtree root element\r
+                       scope){                         // object, default is window\r
+               if (OpenAjax._error) {\r
+                       throw OpenAjax._error;  // Hub is in bad state. Bail with error message.\r
+               }\r
+               if (arguments.length < 4) {\r
+                       throw new Error("Insufficient number of arguments in OpenAjax.registerTagnameScanCB");\r
+               }\r
+               OpenAjax._regScanCB("registerTagnameScanCB", OpenAjax._TagNameCBs,\r
+                                                       prefix, checkString, checkType, null, refOrName, scope);\r
+       }\r
+\r
+       /*\r
+        *      Unregisters all callback functions registered by the given library for the attribute.\r
+        */\r
+       OpenAjax.unregisterTagnameScanCB = function(prefix){ \r
+               OpenAjax._TagNameCBs = OpenAjax._unregScanCB("unregisterTagnameScanCB", OpenAjax._TagNameCBs, prefix);\r
+       }\r
+\r
+       /* -------------- PUBLIC FUNCTIONS -------------------- */\r
+       /* -------------- CUSTOM SCANNER CHECKS ------------- */\r
+\r
+       /*\r
+        *      Registers a custom callback function to invoke for element nodes in the document\r
+        *      during the (top-to-bottom) document scanning process.\r
+        */\r
+       OpenAjax.registerCustomScannerCB = function (\r
+                       prefix,         // Library prefix that was passed to registerLibrary().\r
+                       refOrName,      // The callback function object reference or the name of a function to be called.\r
+                       scope){         // Optional. An Object in which to execute refOrName. If null, default is window.\r
+\r
+               if (OpenAjax._error) {\r
+                       throw OpenAjax._error;  // Hub is in bad state. Bail with error message.\r
+               }\r
+               if (arguments.length < 2)\r
+                       throw new Error("Insufficient number of arguments in OpenAjax.registerCustomScanner");\r
+               if (prefix == null)\r
+                       throw new Error("prefix cannot be null in OpenAjax.registerCustomScanner()");\r
+               if (prefix == "")\r
+                       throw new Error("prefix cannot be empty string in OpenAjax.registerCustomScanner()");\r
+\r
+               if(!scope){\r
+                       scope = window;\r
+               }\r
+\r
+               if(typeof refOrName == "string"){\r
+                       // get a function object\r
+                       refOrName = scope[refOrName];\r
+               }\r
+\r
+               if(typeof refOrName != "function"){\r
+                       throw new Error("invalid function reference passed to OpenAjax.registerCustomScanner()");\r
+               }\r
+\r
+               OpenAjax._CustomScannerCBs[prefix] = refOrName;\r
+       }\r
+\r
+       /*\r
+        *      Unregisters a custom callback function .\r
+        */\r
+       OpenAjax.unregisterCustomScannerCB = function(\r
+               prefix){        // Library prefix that was passed to registerLibrary().\r
+\r
+               if (!OpenAjax._CustomScannerCBs[prefix]) {\r
+                       throw new Error("Attempt to unregister a CustomScannerCB for '" + prefix + "' that has not been registered.");\r
+               } else {        \r
+                       // Remove registration for this library.\r
+                       delete OpenAjax._CustomScannerCBs[prefix];\r
+               }\r
+       }\r
+\r
+       /* -------------- PUBLIC FUNCTIONS -------------------- */\r
+       /* -------------- DOCUMENT AND NODE SCANNERS ---------- */\r
+\r
+       /*\r
+        *      Perform markup scanning on the document.\r
+        */\r
+       OpenAjax.scanDocument = function() {\r
+               var any = false;\r
+\r
+               if (OpenAjax._error) {\r
+                       throw OpenAjax._error;  // Hub is in bad state. Bail with error message.\r
+               }\r
+\r
+               // See if any attr=value scanner CBs have been registered.\r
+               if (OpenAjax._AttrNameCBs.length) { \r
+                       any = true;\r
+               }\r
+\r
+               // See if any tagname scanner CBs have been registered.\r
+               if (OpenAjax._TagNameCBs.length) { \r
+                       any = true;\r
+               }\r
+\r
+               // See if OpenAjax._CustomScannerCBs has any entries.\r
+               for (prefix in OpenAjax._CustomScannerCBs) {\r
+                       any = true;\r
+                       break;\r
+               }\r
+\r
+               if (any) {\r
+                       var ids = OpenAjaxConfig.idsToScan;\r
+                       if (ids && ids.length) {\r
+                               for (var i = 0 ; i<ids.length; i++){\r
+                                       OpenAjax.scanNode(document.getElementById(ids[i]));\r
+                               }       \r
+                       } else if (OpenAjaxConfig.scanPage !== false) {\r
+                               OpenAjax.scanNode(document.body);\r
+                       }\r
+               }\r
+       }\r
+\r
+       /*\r
+        *      Invoke any registered markup handler callbacks on this element node.\r
+        */\r
+       OpenAjax.scanNode = function (\r
+                       node ,                  //the node to recursively process\r
+                       shallowScan ){  //if true, only scan this node not any children. defaults to false=deep scan.\r
+               var returnValue;\r
+\r
+               // Ignore everything but element nodes (nodeType==1)\r
+               if (!node || node.nodeType!=1) {\r
+                       return;\r
+               }\r
+               // IE has a bug where it sometimes treats close tag as an open tag.\r
+               // So, ignore any so-called elements where first character of nodeName is "/"\r
+               if (!node.nodeName || node.nodeName.charAt(0) == "/") {\r
+                       return;\r
+               }\r
+               if (typeof shallowScan == 'undefined') {\r
+                       shallowScan = false;\r
+               }\r
+\r
+               var stopScanChildNodes = false;\r
+               var stopScanThisNode = false;\r
+\r
+               // Check if any attribute=value callbacks have been registered.\r
+               if (!stopScanThisNode) {\r
+                       if (OpenAjax._AttrNameCBs.length) {\r
+                               for (var i=0; i<OpenAjax._AttrNameCBs.length; i++) {\r
+                                       var attrValue = null;\r
+                                       var cbObject = OpenAjax._AttrNameCBs[i];\r
+                                       var nsuri = cbObject.nsuri;\r
+                                       var attrName = cbObject.nodeName;\r
+                                       if (nsuri) {\r
+                                               if (node.getAttributeNS) {\r
+                                                       attrValue = node.getAttributeNS(nsuri, attrName);\r
+                                                       // Workaround for Safari 2.0.4, which incorrectly implements getAttributeNS\r
+                                                       // where it matches against any old nsuri.\r
+                                                       var tempValue = node.getAttributeNS("zzz-bogus-uri", attrName);\r
+                                                       if (tempValue == attrValue) {\r
+                                                               attrValue = null;\r
+                                                       }\r
+                                               }\r
+                                               // Look for prefix:attrName for browsers that do not have namespace support\r
+                                               // or which choose to treat the document as HTML4 without namespace support.\r
+                                               if (!attrValue || attrValue == "") {\r
+                                                       attrValue = node.getAttribute(cbObject.prefix+":"+attrName);\r
+                                               }\r
+                                       } else {\r
+                                               attrValue = node.getAttribute(attrName);\r
+                                       }\r
+                                       // IE has a bug where it doesn't support 'class' via getAttribute.\r
+                                       if (!attrValue && !nsuri && attrName == "class" && node.className) {\r
+                                               attrValue = node.className;\r
+                                       }\r
+                                       if (attrValue) {\r
+                                               returnValue = null;\r
+                                               var checkType = cbObject.checkType;\r
+                                               if (checkType == "match") {\r
+                                                       if (attrValue.length == cbObject.checkString.length && attrValue.indexOf(cbObject.checkString) == 0) {\r
+                                                               returnValue = cbObject.func.call(window, node);\r
+                                                       }\r
+                                               } else if (checkType == "match-start") {\r
+                                                       if (attrValue.indexOf(cbObject.checkString) == 0) {\r
+                                                               returnValue = cbObject.func.call(window, node);\r
+                                                       }\r
+                                               } else if (checkType == "token" || checkType == "token-start") {\r
+                                                       var str_array = attrValue.split(" ");\r
+                                                       for (var j=0; j < str_array.length; j++) {\r
+                                                               var token = str_array[j];\r
+                                                               if (checkType == "token") {\r
+                                                                       if (token.length == cbObject.checkString.length && token.indexOf(cbObject.checkString) == 0) {\r
+                                                                               returnValue = cbObject.func.call(window, node);\r
+                                                                               break;\r
+                                                                       }\r
+                                                               } else if (checkType == "token-start") {\r
+                                                                       if (token.indexOf(cbObject.checkString) == 0) {\r
+                                                                               returnValue = cbObject.func.call(window, node);\r
+                                                                               break;\r
+                                                                       }\r
+                                                               }\r
+                                                       }\r
+                                               }\r
+                                               if (returnValue) {\r
+                                                       // If any callbacks sets stopScanChildNodes to true, then don't scan child nodes.\r
+                                                       if (returnValue.stopScanChildNodes) {\r
+                                                               stopScanChildNodes = true;\r
+                                                       }\r
+                                                       // If returnValue says to cancel all further scanning, then break out of this loop.\r
+                                                       if (returnValue.stopScanThisNode) {\r
+                                                               stopScanThisNode = true;\r
+                                                               break;\r
+                                                       }\r
+                                               }\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+\r
+               // Check if any tagname callbacks have been registered.\r
+               if (!stopScanThisNode) {\r
+                       if (OpenAjax._TagNameCBs.length) {\r
+                               for (var i=0; i<OpenAjax._TagNameCBs.length; i++) {\r
+                                       var cbObject = OpenAjax._TagNameCBs[i];\r
+                                       var tagPrefix = null;\r
+                                       var tagNS = null;\r
+                                       var tagLocalName = null;\r
+                                       if (node.prefix && node.namespaceURI && node.localName) {\r
+                                               // DOM Level 2 namespaces is supported.\r
+                                               tagPrefix = node.prefix;\r
+                                               tagNS = node.namespaceURI;\r
+                                               tagLocalName = node.localName;\r
+                                       } else {\r
+                                               if (node.tagName) {\r
+                                                       var tagName = node.tagName;\r
+                                                       if (tagName.indexOf(":") != -1) {\r
+                                                               var temp_array = tagName.split(":");\r
+                                                               tagPrefix = temp_array[0];\r
+                                                               tagLocalName = temp_array[1];\r
+                                                       } else {\r
+                                                               tagLocalName = tagName;\r
+                                                       }\r
+                                               }\r
+                                       }\r
+                                       if (tagLocalName) {\r
+                                               returnValue = null;\r
+                                               var checkType = cbObject.checkType;\r
+                                               if (checkType == "match-namespace") {\r
+                                                       // FIXME: Need to create test cases for namespace option.\r
+                                                       // FIXME: May need to uppercase the namespace URIs before comparisons.\r
+                                                       if (tagNS && tagNS == cbObject.nsuri) {\r
+                                                               // FIXME - Need to review code associated with 3rd and 4th params on callbacks.\r
+                                                               returnValue = cbObject.func.call(window, node);\r
+                                                       }\r
+                                               } else if (checkType == "match-prefix") {\r
+                                                       var checkPrefix = cbObject.prefix.toUpperCase();\r
+                                                       if (tagPrefix && tagPrefix == checkPrefix) {\r
+                                                               returnValue = cbObject.func.call(window, node);\r
+                                                       }\r
+                                               } else if (checkType == "match" || checkType == "match-start") {\r
+                                                       var checkPrefix = cbObject.prefix.toUpperCase();\r
+                                                       var checkNS = cbObject.nsuri;\r
+                                                       var checkLocalName = cbObject.nodeName.toUpperCase();\r
+                                                       if ((checkType == "match" && checkLocalName == tagLocalName) ||\r
+                                                                       (checkType == "match-start" && tagLocalName.indexOf(checkLocalName) == 0)) {\r
+                                                               if ((!tagPrefix && !tagNS) || \r
+                                                                               (tagNS && tagNS == checkNS) ||\r
+                                                                               (tagPrefix && tagPrefix == checkPrefix)) {\r
+                                                                       // FIXME - Need to review code associated with 3rd and 4th params on callbacks.\r
+                                                                       returnValue = cbObject.func.call(window, node);\r
+                                                               }\r
+                                                       }\r
+                                               }\r
+                                               if (returnValue) {\r
+                                                       // If any callbacks sets stopScanChildNodes to true, then don't scan child nodes.\r
+                                                       if (returnValue.stopScanChildNodes) {\r
+                                                               stopScanChildNodes = true;\r
+                                                       }\r
+                                                       // If returnValue says to cancel all further scanning, then break out of this loop.\r
+                                                       if (returnValue.stopScanThisNode) {\r
+                                                               stopScanThisNode = true;\r
+                                                               break;\r
+                                                       }\r
+                                               }\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+\r
+               if (!stopScanThisNode) {\r
+                       for (prefix in OpenAjax._CustomScannerCBs) {\r
+                               returnValue = OpenAjax._CustomScannerCBs[prefix].call(window, node);\r
+                               if (returnValue) {\r
+                                       // If any callbacks sets stopScanChildNodes to true, then don't scan child nodes.\r
+                                       if (returnValue.stopScanChildNodes) {\r
+                                               stopScanChildNodes = true;\r
+                                       }\r
+                                       // If returnValue says to cancel all further scanning, then break out of this loop.\r
+                                       if (returnValue.stopScanThisNode) {\r
+                                               stopScanThisNode = true;\r
+                                               break;\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+               if (!shallowScan && !stopScanChildNodes) {\r
+                       var childNode, i = 0, childNodes = node.childNodes;\r
+                       while(childNode = childNodes[i++]){\r
+                               if (childNode.nodeType!=1)\r
+                                       continue;\r
+                               OpenAjax.scanNode(childNode);\r
+                       }\r
+               }\r
+       }\r
diff --git a/WebContent/openajax/index.html b/WebContent/openajax/index.html
new file mode 100644 (file)
index 0000000..222d01b
--- /dev/null
@@ -0,0 +1,212 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" \r
+       "http://www.w3.org/TR/html4/loose.dtd">\r
+<!--\r
+/*******************************************************************************\r
+ * HubTest-BasicConformance.html:\r
+ *             Test case for Ajax libraries that verifies whether a given library\r
+ *             supports the most basic requirements from the OpenAjax Hub Specification.\r
+ *\r
+ *             To use this test case against a given Ajax library, this test case\r
+ *             needs to be customized. At a minimum, you will need to replace the\r
+ *             following line:\r
+ *\r
+ *                     <script language="JavaScript" type="text/javascript" src="SampleAjaxLibrary.js"></script>\r
+ *\r
+ *             with a <script> element that loads your Ajax library instead of SampleAjaxLibrary.js.\r
+ *\r
+ *             Libraries can make other modifications, but the <div> block\r
+ *             with id=HubTest_BasicConformance" must be left intact.\r
+ *\r
+ *             Other customization instructions are included within the comments in the\r
+ *             various files.\r
+ *\r
+ * Copyright 2007 OpenAjax Alliance\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not \r
+ * use this file except in compliance with the License. You may obtain a copy \r
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless \r
+ * required by applicable law or agreed to in writing, software distributed \r
+ * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR \r
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the \r
+ * specific language governing permissions and limitations under the License.\r
+ *\r
+ ******************************************************************************/\r
+-->\r
+\r
+<!--   ****************************************************************************\r
+                       The xmlns declarations are included in this test case below because they are required\r
+                       by the OpenAjax Hub Specification which is forward looking to when browsers\r
+                       support XML/XHTML properly. Note, however, that xmlns declarations generally have \r
+                       no effect with browsers shipping at the time this test case was developed (early 2007).\r
+\r
+                       The xmlns:SampleAjaxLibrary declaration should be changed such that\r
+                               - "SampleAjaxLibrary" is changed to the prefix used by the given library\r
+                               - "http://example.com/SampleAjaxLibrary" is changed to the namespaceURI for the library\r
+                       (See documentation on OpenAjax.registerLibrary() for more about prefix and namespaceURI.)\r
+                       **************************************************************************** -->\r
+\r
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ITMillToolkit40="http://itmill.com/toolkit">\r
+<head>\r
+       <!--    ****************************************************************************\r
+                               THE CONTENTS OF THE FOLLOWING HEAD ELEMENTS MUST NOT BE CHANGED\r
+                               (except it  is OK to change the location of the referenced files). \r
+                               **************************************************************************** -->\r
+       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
+       <title>OpenAjax Hub Basic Conformance Test: IT Mill Toolkit 4</title>\r
+       <link rel="StyleSheet" href="stylesheets/hubtest.css" type="text/css" />\r
+\r
+       <!--    ****************************************************************************\r
+                               THE FOLLOWING SCRIPT ELEMENTS USUALLY NEED TO BE AT THE TOP OF THE HTML FILE.\r
+                               HERE IS THE LIST OF CUSTOMIZATIONS YOU MUST OR MAY DO TO THIS SECTION:\r
+\r
+                               YOU MUST CUSTOMIZE IT AS FOLLOWS.\r
+                                       - You must change HubTest-BasicConformance-MyPrefix from "SampleAjaxLibrary"\r
+                                                       to the prefix used by your library.\r
+\r
+                               YOU MAY CUSTOMIZE THE FOLLOWING LOGIC AS FOLLOWS.\r
+                                       - Your toolkit might include the OpenAjax Hub (i.e., ../../release/OpenAjax.js)\r
+                                               within your toolkit distribution or might put the Hub source code in a different\r
+                                               location than ../../release/OpenAjax.js. Therefore, it is OK to change\r
+                                               the 'src' attribute or remove the SCRIPT tag for OpenAjax.js entirely\r
+                                               (if you include the Hub within your toolkit).\r
+                                               (But be aware that if the Hub is part of your toolkit, you probably have to move\r
+                                               the SCRIPT tag for HubTest-BasicConformance.js such that it is loaded\r
+                                               after your toolkit because it makes calls into various OpenAjax.* functions.)\r
+\r
+                                       - If you are using a different implementation of the Hub than the \r
+                                               Alliance's reference implementation at http://openajaxallianc.sourceforge.net,\r
+                                               and your library register load event handlers with the Hub,\r
+                                               you probably need to change the logic within function HubTest_BasicConformance_Verify_Load()\r
+                                               to look at your implementation's private variables.\r
+                               **************************************************************************** -->\r
+       <script language="JavaScript" type="text/javascript" src="OpenAjax.js"></script>\r
+\r
+       <script language="JavaScript" type="text/javascript">\r
+                       var HubTest_BasicConformance_MyPrefix = "ITMillToolkit40";\r
+\r
+                       function HubTest_BasicConformance_Verify_Load() {\r
+                               if ((OpenAjax._callbacks.load.library && OpenAjax._callbacks.load.library.length) || \r
+                                               (OpenAjax._callbacks.load.component && OpenAjax._callbacks.load.component.length)) {\r
+                                       loadHandlerWorking = true;\r
+                               }\r
+                       }\r
+\r
+                       // Invoke HubTest_BasicConformance_Verify_Load as the first thing that happens\r
+                       // during OnLoad event processing. (Determine if callback arrays have been set properly.)\r
+                       OpenAjax.addOnLoad("HubTest_BasicConformance_Verify_Load", null, "library");\r
+       </script>\r
+\r
+       <script language="JavaScript" type="text/javascript" src="HubTest-BasicConformance.js"></script>\r
+\r
+       <!--    ****************************************************************************\r
+                               YOU MUST REMOVE/REPLACE THE FOLLOWING SCRIPT ELEMENT.\r
+                               The <script> tag below that references SampleAjaxLibrary.js must be removed and \r
+                               instead you will need to have your own Ajax library loaded instead.\r
+                               **************************************************************************** -->\r
+       <link rel="stylesheet" href="../features/RES/base/css/base-ajax.css" type="text/css" />\r
+       <link rel="stylesheet" href="../features/RES/base/css/calendar-default.css" type="text/css" />\r
+       <script src="../features/RES/base/script/ajax-client.js" type="text/javascript"></script>\r
+       <script src="../features/RES/base/script/base-ajax-components.js" type="text/javascript"></script>\r
+       <script src="../features/RES/base/ext/jscalendar/calendar.js" type="text/javascript"></script>\r
+       <script src="../features/RES/base/ext/jscalendar/lang/calendar-en.js" type="text/javascript"></script>\r
+       <script src="../features/RES/base/ext/jscalendar/calendar-setup.js" type="text/javascript"></script>\r
+       <script src="../features/RES/base/ext/firebug/firebug.js" type="text/javascript"></script>\r
+       <link rel="stylesheet" href="../features/RES/corporate/css/corporate-ajax.css" type="text/css" />\r
+       <script src="../features/RES/corporate/script/corporate-ajax-components.js" type="text/javascript"></script>\r
+       <script src="../features/RES/demo/featurebrowser/components.js" type="text/javascript"></script>\r
+       <link rel="stylesheet" href="../features/RES/demo/featurebrowser/featurebrowser.css" type="text/css" />\r
+\r
+       <!--    ****************************************************************************\r
+                               YOU MAY CUSTOMIZE THE FOLLOWING LOGIC.\r
+                                       - Instead of having the ConformanceChecks() happen at the end of OnLoad processing\r
+                                               (as the code below does),\r
+                                               you might want instead to invoke ConformanaceChecks() manually, particularly if your toolkit\r
+                                               performs some of its initialization after the OnLoad event has completed.\r
+                               **************************************************************************** -->\r
+       <script language="JavaScript" type="text/javascript">\r
+                       // Invoke ConformanceChecks so that they happen at the end of OnLoad processing.\r
+                       OpenAjax.addOnLoad("ConformanceChecks");\r
+       </script>\r
+\r
+\r
+</head>\r
+\r
+<body class="itmtk">\r
+       <div id="hubtestwin"  style="position:absolute; z-index: 40000; background-color: white; border: 4px ridge gray; margin: 80px;">\r
+       <div style="position: absolute; width: 16px; height: 16px; padding-top: 4px; text-align: center; top: 0; right: 0; background-color: red; border: 1px outset red; cursor: pointer; " onclick="document.getElementById('hubtestwin').style.display='none';">X</div>\r
+\r
+\r
+       <!--    ****************************************************************************\r
+                               THE CONTENTS OF THE FOLLOWING DIV BLOCK MUST NOT BE CHANGED.\r
+                               (But it's OK if your library needs to move this block elsewhere\r
+                               within the document hierarchy and OK if you need to add other\r
+                               elements to the BODY.)\r
+                               **************************************************************************** -->\r
+       <div id="HubTest_BasicConformance">\r
+               <p id="OpenAjaxBanner" class="imageContainer">\r
+                       <a href="http://www.openajax.org">\r
+                               <img id="OpenAjaxBanner" src="images/OpenAjaxAllianceBanner.jpg" border="0" width="846px" alt="OpenAjax Alliance banner"/>\r
+                       </a>\r
+               </p>\r
+               <h1 class="HubTestTitle">OpenAjax Hub Basic Conformance Test</h1>\r
+               <p id="LibraryName">For library: (unknown)</p>\r
+               <table id="HubTestResults" class="HubTestResults">\r
+                       <tbody>\r
+                               <tr>\r
+                                       <td class="HubTestNumber">1</td>\r
+                                       <td class="HubTestLabel">OpenAjax Conformance Requirement (Libraries): Library Registration</td>\r
+                                       <td class="HubTestResult" id="registerLibraryResult"><span style="color:red">TEST NOT SUCCESSFUL</span></td>\r
+                               </tr>\r
+                               <tr>\r
+                                       <td class="HubTestNumber">2</td>\r
+                                       <td class="HubTestLabel">OpenAjax Conformance Requirement (Libraries): Globals Registration</td>\r
+                                       <td class="HubTestResult" id="registerGlobalsResult"><span style="color:red">TEST NOT SUCCESSFUL</span></td>\r
+                               </tr>\r
+                               <tr>\r
+                                       <td class="HubTestNumber">3</td>\r
+                                       <td class="HubTestLabel">OpenAjax Conformance Requirement (Libraries): Load/Unload Handlers Registered Indirectly Through the Hub</td>\r
+                                       <td class="HubTestResult" id="addOnLoadResult"><span style="color:blue">TEST NOT APPLICABLE</span></td>\r
+                               </tr>\r
+                               <tr>\r
+                                       <td class="HubTestNumber">4</td>\r
+                                       <td class="HubTestLabel">OpenAjax Hub Publish/Subscribe Test</td>\r
+                                       <td class="HubTestResult" id="PublishSubscribeResult"><span style="color:red">TEST NOT SUCCESSFUL</span></td>\r
+                               </tr>\r
+                               <tr>\r
+                                       <td class="HubTestNumber">5</td>\r
+                                       <td class="HubTestLabel">OpenAjax Hub Markup Scanner Test</td>\r
+                                       <td class="HubTestResult" id="MarkupScannerResult"><span style="color:red">TEST NOT SUCCESSFUL</span></td>\r
+                               </tr>\r
+                       </tbody>\r
+               </table>\r
+               <p>Notes:</p>\r
+               <ul>\r
+                       <li>A library completely passes this test if all boxes say TEST SUCCEEDED.</li>\r
+                       <li>Some toolkits do not initialize themselves during 'load' event processing.\r
+                                       Because of these situations, it is OK if the load/unload test case says TEST NOT APPLICABLE.</li>\r
+               </ul>\r
+       </div>\r
+       \r
+       \r
+       </div>\r
+\r
+       <!--    ****************************************************************************\r
+                               Extra credit: A library developer might want to include a snippet of content that uses\r
+                               his Ajax library to include extra graphical content in order spice up the \r
+                               visual result from the test.\r
+                               **************************************************************************** -->\r
+\r
+<div id="ajax-wait">Loading...</div>\r
+<div id="ajax-window"></div>\r
+<script language="JavaScript">\r
+       // Initialize client part of the IT Mill Toolkit and start it\r
+       function ITMillToolkit_Start () {\r
+               var client = new itmill.Client(document.getElementById('ajax-window'),"../features/UIDL/","../features/RES/base/client/",document.getElementById('ajax-wait'));\r
+               (new itmill.themes.Demo("../features/RES/demo/")).registerTo(client);\r
+               client.start();\r
+       }\r
+       OpenAjax.addOnLoad("ITMillToolkit_Start", null, "library");\r
+</script>\r
+\r
+</body>\r
+</html>
\ No newline at end of file
index fc4f082d2fd635a0cd91dde80e8cdd4585f61015..c0501a5aec30d2a6c6eedde1d330656253a47f64 100644 (file)
-/* Basic styles */\r
-\r
-body {\r
-       background-color: #c7e4ff;\r
-       font-family: Georgia, Arial, Tahoma, Verdana, sans-serif;\r
-       margin: 0;\r
-       padding: 0;\r
-       letter-spacing: 0.01em;\r
-       color: #4c4c4c;\r
-       font-size: 62.5%;\r
-}\r
-\r
-h1,h2,h3,h4,h5,h6 {\r
-       font-family: Arial, Tahoma, Verdana, sans-serif;\r
-       color: #ee4411;\r
-       font-weight: normal;\r
-}\r
-h1 {\r
-       font-size: 3em;\r
-}\r
-h2 {\r
-       font-size: 2.4em;\r
-}\r
-h3 {\r
-       font-size: 2em;\r
-}\r
-h4 {\r
-       font-size: 1.8em;\r
-       color: #3798f3;\r
-       margin-bottom: 0.4em;\r
-}\r
-h5 {\r
-       font-size: 1.5em;\r
-}\r
-h6 {\r
-       font-size: 1.2em;\r
-       font-weight: bold;\r
-}\r
-\r
-a:link {\r
-       color: #ee4411;\r
-       text-decoration: none;\r
-       border-bottom: dotted 1px #539dc9;\r
-}\r
-a:visited {\r
-       color: #5d7178;\r
-       text-decoration: none;\r
-       border-bottom: dotted 1px #539dc9;\r
-}\r
-a:active {\r
-       color: #3a9bff;\r
-       text-decoration: none;\r
-}\r
-a:hover {\r
-       color: #3b62b1;\r
-       background-color: #e7f3fa;\r
-       border-bottom: solid 1px #ee4411;\r
-       text-decoration: none;\r
-}\r
-\r
-ul {\r
-       list-style-type: square;\r
-}\r
-\r
-/* Layout */\r
-\r
-#container {\r
-       margin: 30px 30px;\r
-       text-align: left;\r
-       padding: 35px 30px 30px 30px;\r
-       overflow: hidden;\r
-       margin-right: 30px;\r
-       background-color: #fff;\r
-}\r
-\r
-#itmilllogo {\r
-       background-image: url(itmill-logo-small.gif);\r
-       width: 195px;\r
-       height: 32px;\r
-       overflow: hidden;\r
-       text-indent: -90000px;\r
-       float: left;\r
-}\r
-\r
-#toolkit {\r
-       float: left;\r
-       width: 100px;\r
-       height: 25px;\r
-       background: transparent url(frontpage_logo.png) no-repeat;\r
-       margin: 3px 0 30px 10px;\r
-}\r
-\r
-pre {\r
-       background-color: #f7f7f7;\r
-       border: solid 2px #e6e6e6;\r
-       font-family: monospace;\r
-       font-size: 1.1em;\r
-       padding: 0.5em 1em;\r
-}\r
-\r
-hr {\r
-       height: 1px;\r
-       overflow: hidden;\r
-       color: #b2d2e5;\r
-       background-color: #b2d2e5;\r
-       border: none;\r
-}\r
-\r
-#feature-browser,\r
-#sample-code {\r
-       clear: both;\r
-       padding: 10px 10px 20px 50px;\r
-       background-color: #f7f7f7;\r
-       border: solid 2px #e6e6e6;\r
-       font-size: 1.2em;\r
-       line-height: 1.6em;\r
-       margin: 30px 0;\r
-}\r
-\r
-#feature-browser {\r
-       background: #f7f7f7 url(feature_browser_bg.gif) no-repeat top right;\r
-}\r
-\r
-#sample-code {\r
-       background: #f7f7f7 url(sample_code_bg.gif) no-repeat top right;\r
-}\r
-\r
-.option {\r
-       clear: both;\r
-       height: 2em;\r
-       overflow: hidden;\r
-}\r
-\r
-.option .link {\r
-       float: left;\r
-       width: 15em;\r
-}\r
-.option .desc {\r
-       float: left;\r
+/* Basic styles */
+
+body {
+       background-color: #c7e4ff;
+       font-family: Georgia, Arial, Tahoma, Verdana, sans-serif;
+       margin: 0;
+       padding: 0;
+       letter-spacing: 0.01em;
+       color: #4c4c4c;
+       font-size: 62.5%;
+}
+
+h1,h2,h3,h4,h5,h6 {
+       font-family: Arial, Tahoma, Verdana, sans-serif;
+       color: #ee4411;
+       font-weight: normal;
+}
+h3 a {
+       color: #ee4411;
+}
+h3 a:visited {
+       color: #ee4411;
+}
+h1 {
+       font-size: 3em;
+}
+h2 {
+       font-size: 2.4em;
+}
+h3 {
+       font-size: 2em;
+}
+h4 {
+       font-size: 1.8em;
+       color: #3798f3;
+       margin-bottom: 0.4em;
+}
+h5 {
+       font-size: 1.5em;
+}
+h6 {
+       font-size: 1.2em;
+       font-weight: bold;
+}
+
+a:link {
+       color: #ee4411;
+       text-decoration: none;
+       border-bottom: dotted 1px #539dc9;
+}
+a:visited {
+       color: #5d7178;
+       text-decoration: none;
+       border-bottom: dotted 1px #539dc9;
+}
+a:active {
+       color: #3a9bff;
+       text-decoration: none;
+}
+a:hover {
+       color: #3b62b1;
+       background-color: #e7f3fa;
+       border-bottom: solid 1px #ee4411;
+       text-decoration: none;
+}
+
+ul {
+       list-style-type: square;
+}
+
+/* Layout */
+
+#container {
+       margin: 30px 30px;
+       text-align: left;
+       padding: 35px 30px 30px 30px;
+       overflow: hidden;
+       margin-right: 30px;
+       background-color: #fff;
+}
+
+#itmilllogo {
+       background-image: url(itmill-logo-small.gif);
+       width: 195px;
+       height: 32px;
+       overflow: hidden;
+       text-indent: -90000px;
+       float: left;
+}
+
+#toolkit {
+       float: left;
+       width: 100px;
+       height: 25px;
+       background: transparent url(frontpage_logo.png) no-repeat;
+       margin: 3px 0 30px 10px;
+}
+
+pre {
+       background-color: #f7f7f7;
+       border: solid 2px #e6e6e6;
+       font-family: monospace;
+       font-size: 1.1em;
+       padding: 0.5em 1em;
+}
+
+hr {
+       height: 1px;
+       overflow: hidden;
+       color: #b2d2e5;
+       background-color: #b2d2e5;
+       border: none;
+}
+
+#feature-browser,
+#sample-code {
+       clear: both;
+       padding: 10px 10px 20px 50px;
+       background-color: #f7f7f7;
+       border: solid 2px #e6e6e6;
+       font-size: 1.2em;
+       line-height: 1.6em;
+       margin: 30px 0;
+}
+
+#feature-browser {
+       background: #f7f7f7 url(feature_browser_bg.gif) no-repeat top right;
+}
+
+#sample-code {
+       background: #f7f7f7 url(sample_code_bg.gif) no-repeat top right;
+}
+
+.option {
+       clear: both;
+}
+
+.option .link {
+       float: left;
+       width: 15em;
+}
+.option .desc {
+       float: left;
 }
\ No newline at end of file