cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jer...@apache.org
Subject svn commit: r491930 [2/2] - in /cocoon/trunk/blocks: cocoon-ajax/cocoon-ajax-impl/src/main/resources/org/apache/cocoon/ajax/resources/ cocoon-ajax/cocoon-ajax-impl/src/main/resources/org/apache/cocoon/ajax/resources/js/ cocoon-ajax/cocoon-ajax-impl/src...
Date Tue, 02 Jan 2007 20:44:32 GMT
Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/forms-lib.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/forms-lib.js?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/forms-lib.js (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/forms-lib.js Tue Jan  2 12:44:30 2007
@@ -20,80 +20,83 @@
  *       features for dynamic behaviour on non Ajax-capable browsers.
  *       Advanced widgets such as double selection list and multivalue
  *       field will be refactored as Dojo widgets.
+ * NOTE: (2.1.11) moving support for non-ajax forms to cocoon.forms.common and the SimpleForm Widget.
+ *
+ * This file has dependencies on cocoon.forms.common
+ *    /_cocoon/resources/forms/js/common.js
  *
  * @version $Id$
  */
 
-// Handlers that are to be called in the document's "onload" event
-var forms_onloadHandlers = new Array();
 
-function forms_onload() {
-    for (var i = 0; i < forms_onloadHandlers.length; i++) {
-        forms_onloadHandlers[i].forms_onload();
+/**
+  * Deprecated legacy functions
+  * To be removed in 2.1.12(?) release
+  */
+forms_submitForm = function() { 
+    if (dojo) dojo.debug("DEPRECATED: forms_submitForm(), use cocoon.forms.submitForm(element[, name, params]) instead");
+    // we do not know which form is being submitted, let's at least try to find it.
+    var form = document.getElementById("_cforms_default_form_"); // maybe forms_onsubmitHandlers.push has been called
+    if (!form) {
+        for (var i = 0; i < document.forms.length; i++) {
+            if (document.forms[i].getAttribute("dojoWidgetId") != "") {
+                form = document.forms[i];
+                form.setAttribute("id", "_cforms_default_form_"); // just in case we get here again ...
+            }
+            if (form) break;
+        }
+    }
+    if (!form) { // last ditch attempt, maybe dojo is not being used
+        form = document.forms[0];
     }
-    // Reset it (we no more need them)
-    forms_onloadHandlers = new Array();
+    cocoon.forms.submitForm.apply(cocoon.forms, [form]); 
 }
 
-// Handlers that are to be called in form's "onsubmit" event
-// FIXME: this single var implies only one form per page, and needs to be
-//       visited if we decide to support several forms per page.
-var forms_onsubmitHandlers = new Array();
+forms_getForm = function(element) { 
+    if (dojo) dojo.debug("DEPRECATED: forms_getForm(element), use cocoon.forms.getForm(element) instead");
+    cocoon.forms.getForm.apply(cocoon.forms, arguments); 
+}
 
-function forms_onsubmit() {
-    if (forms_onsubmitHandlers == null) {
-        // Form already submited, but the new page is not yet loaded. This can happen when
-        // the focus is in an input with an "onchange" and the user clicks on a submit button.
-        return false;
-    }
-
-    for (var i = 0; i < forms_onsubmitHandlers.length; i++) {
-        if (forms_onsubmitHandlers[i].forms_onsubmit() == false) {
-            // handler cancels the submit
-            return false;
-        	}
-    }
-    // clear it
-    forms_onsubmitHandlers = null;
-    return true;
+forms_onsubmit = function() { 
+    if (dojo) dojo.debug("DEPRECATED: forms_onsubmit(), use cocoon.forms.callOnSubmitHandlers(form) instead");
+    var form = document.getElementById("_cforms_default_form_");
+    cocoon.forms.callOnSubmitHandlers.apply(cocoon.forms, [form]); 
 }
 
-/**
- * Submit the form containing an element, also storing in the hidden
- * 'forms_submit_id' field the name of the element which triggered the submit.
- */
-function oldforms_submitForm(element, name) {
-    name = name || element.name;
-    
-    var form = forms_getForm(element);
-    if (form == null) {
-        alert("Cannot find form for " + element);
-    } else {
-        form["forms_submit_id"].value = name;
-        if (!form.onsubmit || form.onsubmit() != false) {
-            form.submit();
-        }
-    }
+forms_onload = function() { 
+    if (dojo) dojo.debug("DEPRECATED: forms_onload(), use cocoon.forms.callOnLoadHandlers() instead");
+    cocoon.forms.callOnLoadHandlers.apply(cocoon.forms, arguments);
 }
 
-/**
- * Crawl the parents of an element up to finding a form.
- */
-function forms_getForm(element) {
-    while(element != null && element.tagName != null && element.tagName.toLowerCase() != "form") {
-        element = element.parentNode;
+var forms_onloadHandlers = new Array();
+forms_onloadHandlers.push = function(handler) {
+    if (dojo) dojo.debug("DEPRECATED: forms_onloadHandlers.push(handler), use cocoon.forms.addOnLoadHandler(handler) instead");
+    cocoon.forms.addOnLoadHandler.apply(cocoon.forms, arguments) 
+}
+
+var forms_onsubmitHandlers = new Array();
+forms_onsubmitHandlers.push = function(handler) {
+    if (dojo) dojo.debug("DEPRECATED: forms_onsubmitHandlers.push(handler), use cocoon.forms.addOnSubmitHandler(form, handler) instead");
+    // we do not know which form the handler is from, let's at least try to find it.
+    var form = document.getElementById("_cforms_default_form_"); // maybe we did this before
+    if (!form) {
+        for (var i = 0; i < document.forms.length; i++) {
+            if (document.forms[i].getAttribute("dojoWidgetId") != "") {
+                form = document.forms[i];
+                form.setAttribute("id", "_cforms_default_form_"); // make it easier to find is there are more submit handlers
+            }
+            if (form) break;
+        }
     }
-    return element;
+    if (!form) { // last ditch attempt, maybe dojo is not being used
+        form = document.forms[0];
+        if (form) form.setAttribute("id", "_cforms_default_form_");
+    }
+    cocoon.forms.addOnSubmitHandler.apply(cocoon.forms, [form, handler]); 
 }
 
-/**
- * Move a named element as an immediate child of the <body> element.
- * This is required for help popups inside <wi:group> tabs. The reason is that CSS positioning
- * properties ("left" and "top") on a block with a "position: absolute" are actually relative to
- * the nearest ancestor that has a position of "absolute", "relative" or "fixed".
- * See http://www.w3.org/TR/CSS21/visudet.html#containing-block-details $4
- */
 
+// TODO: Not called
 function forms_moveInBody(element) {
     element.parentNode.removeChild(element);
     document.body.appendChild(element);
@@ -109,10 +112,11 @@
     result.autoHide();
     // add to onload handlers
     result.forms_id = id;
+    // TODO: This onLoad handler never would get called
     result.forms_onload = function() {
         forms_moveInBody(document.getElementById(this.forms_id));
     }
-    forms_onloadHandlers.push(result);
+    cocoon.forms.addOnLoadHandler(result);
     return result;
 }
 
@@ -123,7 +127,7 @@
     // add to onload handlers
     result.forms_id = id + ":input";
     result.forms_onload = function() {
-        var form = forms_getForm(document.getElementById(this.forms_id));
+        var form = cocoon.forms.getForm(document.getElementById(this.forms_id));
         this.init(form);
         sortSelect(this.left);
         sortSelect(this.right);
@@ -132,28 +136,28 @@
     result.forms_transferLeft = function() {
         this.transferLeft();
         if (this.submitOnChange) {
-            forms_submitForm(document.getElementById(this.forms_id));
+            cocoon.forms.submitForm(document.getElementById(this.forms_id));
         }
     }
     result.forms_transferRight = function() {
         this.transferRight();
         if (this.submitOnChange) {
-            forms_submitForm(document.getElementById(this.forms_id));
+            cocoon.forms.submitForm(document.getElementById(this.forms_id));
         }
     }
     result.forms_transferAllLeft = function() {
         this.transferAllLeft();
         if (this.submitOnChange) {
-            forms_submitForm(document.getElementById(this.forms_id));
+            cocoon.forms.submitForm(document.getElementById(this.forms_id));
         }
     };
     result.forms_transferAllRight = function() {
         this.transferAllRight();
         if (this.submitOnChange) {
-            forms_submitForm(document.getElementById(this.forms_id));
+            cocoon.forms.submitForm(document.getElementById(this.forms_id));
         }
     };
-    forms_onloadHandlers.push(result);
+    cocoon.forms.addOnLoadHandler(result);
     
     // add to onsubmit handlers
     result.forms_onsubmit = function() {
@@ -161,7 +165,7 @@
         // its values are sent.
         selectAllOptions(this.right);
     }
-    forms_onsubmitHandlers.push(result);
+    cocoon.forms.addOnSubmitHandler(document.getElementById(id), result);
     return result;
 }
 
@@ -226,7 +230,7 @@
     onsubmitHandler.forms_onsubmit = function () {
         self.selectAll();
     }
-    forms_onsubmitHandlers.push(onsubmitHandler);
+    cocoon.forms.addOnSubmitHandler(document.getElementById(id), onsubmitHandler);
 }
 
 /**

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/manifest.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/manifest.js?view=auto&rev=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/manifest.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/manifest.js Tue Jan  2 12:44:30 2007
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *          http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+ 
+ /*
+  * Mapping of all widget short names to their full package names
+  * This is used for widget autoloading - no dojo.require() is necessary.
+  * If you use a widget in markup or create one dynamically, then this
+  * mapping is used to find and load any dependencies not already loaded.
+  * You should use your own namespace for any custom widgets (remember to register it).
+  * For extra widgets you use, dojo.require() may still be used to explicitly load them.
+  *
+  * NOTE: Introduced in 2.1.11, replaces functionality in cocoon.js
+  *
+  * @version $Id$
+  */
+  
+dojo.provide("cocoon.forms.manifest");
+
+(function(){
+	var map = {
+		html: {
+			"cformsdraganddroprepeater" : "cocoon.forms.CFormsDragAndDropRepeater",
+			"cformsform"                : "cocoon.forms.CFormsForm",
+			"simpleform"                : "cocoon.forms.SimpleForm",
+			"ajaxform"                  : "cocoon.forms.AjaxForm",
+			"cformsrepeater"            : "cocoon.forms.CFormsRepeater",
+			"cformssuggest"             : "cocoon.forms.CFormsSuggest"
+            // register new Widgets in the cocoon.forms namespace here
+		},
+		svg: {
+		    // register svg widgets here
+		},
+		vml: {
+		    // register vml widgets here
+		}
+	};
+	
+	function formsResolver(name, domain){
+		if(!domain){ domain="html"; }
+		if(!map[domain]){ return null; }
+		return map[domain][name];    
+	};
+	
+    
+    dojo.registerModulePath("cocoon.ajax", "../ajax/js"); // cocoon.forms has a dependency on the cocoon.ajax module libraries
+    
+    dojo.registerModulePath("cocoon.forms", "../forms/js");
+	dojo.registerNamespace("forms", "cocoon.forms", formsResolver);
+    
+})();

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/manifest.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/manifest.js
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/captcha/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/captcha/sitemap.xmap?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/captcha/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/captcha/sitemap.xmap Tue Jan  2 12:44:30 2007
@@ -87,7 +87,7 @@
          <map:parameter name="file" value="forms/{1}.tpl.xml"/>
        </map:call>
        <map:transform src="../resources/forms-samples-styling.xsl">
-         <map:parameter name="resources-uri" value="../resources"/>
+          <map:parameter name="resources-uri" value="{request:contextPath}/_cocoon/resources"/>
        </map:transform>
        <map:transform type="i18n">
        </map:transform>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/dreamteam/content/showTeam.jx
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/dreamteam/content/showTeam.jx?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/dreamteam/content/showTeam.jx (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/dreamteam/content/showTeam.jx Tue Jan  2 12:44:30 2007
@@ -53,7 +53,7 @@
         </thead>
         <tbody>
           <jx:choose>
-            <jx:when test="size &lt; 1">
+            <jx:when test="${teamsize &lt; 1}"><!--  -->
               <tr>
                 <td colspan="4" align="center">
                   <strong>No team selected</strong>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/dreamteam/flow/team.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/dreamteam/flow/team.js?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/dreamteam/flow/team.js (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/dreamteam/flow/team.js Tue Jan  2 12:44:30 2007
@@ -40,7 +40,7 @@
   }
   var viewData = {
      list : persons,
-     size : size
+     teamsize : size
   };
   cocoon.sendPage("showTeam.form", viewData);
 } // showTeam

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/dreamteam/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/dreamteam/sitemap.xmap?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/dreamteam/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/dreamteam/sitemap.xmap Tue Jan  2 12:44:30 2007
@@ -92,8 +92,8 @@
         <map:generate type="jx" src="content/teamTemplate.jx"/>
         <map:transform type="browser-update"/>
         <map:transform src="../resources/forms-samples-styling.xsl">
-          <map:parameter name="resources-uri" value="resources"/>
-        </map:transform>
+          <map:parameter name="resources-uri" value="{request:contextPath}/_cocoon/resources"/>
+        </map:transform>        
         <map:select type="ajax-request">
           <map:when test="true">
             <map:transform type="i18n"/>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/ajax_suggest_form.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/ajax_suggest_form.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/ajax_suggest_form.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/ajax_suggest_form.xml Tue Jan  2 12:44:30 2007
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="utf-8"?>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -91,20 +91,20 @@
                   {value: 12, label: "Antonio Gallardo"},
                   {value: 13, label: "Ugo Cei"},
                   {value: 14, label: "David Crossley"},
-                  {value: 15, label: "Bertrand Delacr&#233;taz"},
+                  {value: 15, label: "Bertrand Delacrétaz"},
                   {value: 16, label: "Bruno Dumon"},
                   {value: 17, label: "Daniel Fagerstrom"},
                   {value: 18, label: "Leszek Gawron"},
                   {value: 19, label: "Ralph Goers"},
                   {value: 20, label: "Vadim Gritsenko"},
                   {value: 21, label: "Jorg Heymans"},
-                  {value: 22, label: "J&#246;rg Heinicke"},
+                  {value: 22, label: "Jörg Heinicke"},
                   {value: 23, label: "Jean-Baptiste Quenot"}
                 ];
         }
 
         function startsWith(string1, string2) {
-          return (new java.lang.String(string1)).startsWith(string2);
+          return (new java.lang.String(string1.toLowerCase())).startsWith(string2.toLowerCase());
         }
         
         function searchByString() {

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/ajax_suggest_template.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/ajax_suggest_template.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/ajax_suggest_template.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/ajax_suggest_template.xml Tue Jan  2 12:44:30 2007
@@ -18,12 +18,6 @@
 <page xmlns:ft="http://apache.org/cocoon/forms/1.0#template" xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
    <!-- Import the macros that define CForms template elements -->
    <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
-  <fi:init>
-	<script type="text/javascript">
-	  // Uncomment this to see Dojo debug
-	  // var djConfig = { isDebug: true };
-    </script>	
-  </fi:init>
   <h4 class="samplesGroup">AJAX sample</h4>
   <title>Cocoon suggests</title>
   <content>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/calculatedfields_template.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/calculatedfields_template.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/calculatedfields_template.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/calculatedfields_template.xml Tue Jan  2 12:44:30 2007
@@ -18,10 +18,6 @@
 <page xmlns:ft="http://apache.org/cocoon/forms/1.0#template" xmlns:fi="http://apache.org/cocoon/forms/1.0#instance" xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
   <!-- Import the macros that define CForms template elements -->
   <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
-  <fi:init>
-    <script type="text/javascript"> // Uncomment this to see Dojo debug // var djConfig = { isDebug: true };
-    </script>
-  </fi:init>
   <h4 class="samplesGroup">Calculated widgets sample</h4>
   <title>Sample form</title>
   <content>
@@ -42,7 +38,7 @@
       <!-- manual layout of fields, without use of a fi:group -->
       <ft:widget-label id="articles"/><br/>
       <ft:repeater id="articles">
-        <div dojoType="CFormsRepeater" orderable="true">
+        <div dojoType="forms:CFormsRepeater" orderable="true">
           <table border="1">
             <thead>
               <tr>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/carselector_template.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/carselector_template.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/carselector_template.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/carselector_template.xml Tue Jan  2 12:44:30 2007
@@ -36,6 +36,37 @@
     See "carselector_form.xml" and "carselector_template.xml" to see how this is done.
   </para>
   <content>
+    <script type="text/javascript">
+       // avoid doing this before everything is loaded
+       dojo.addOnLoad(function(){cocoon.ajax.BUHandler.highlight = cocoon.ajax.effects.highlight.blue});
+       var currentEffect = "blue";
+       function setEffect(effect) {
+           if (effect == "none") {
+               cocoon.ajax.BUHandler.highlight = null;
+           } else if (effect == "blink") {
+               cocoon.ajax.BUHandler.highlight = cocoon.ajax.effects.blink;
+           } else if (cocoon.ajax.effects.highlight[effect]) {
+               cocoon.ajax.BUHandler.highlight = cocoon.ajax.effects.highlight[effect];
+           }
+           
+           document.getElementById(currentEffect).style.fontWeight = "";
+           document.getElementById(effect).style.fontWeight = "bold";
+           currentEffect = effect;
+           return false;
+       }
+    </script>
+    <para>
+      Page update effect:
+      <a id="none" href="#" onclick="return setEffect('none')">None</a> - 
+      <a id="yellow" href="#" onclick="return setEffect('yellow')">Yellow</a> - 
+      <a id="blue" href="#" onclick="return setEffect('blue')" style="font-weight: bold">Blue</a> - 
+      <a id="red" href="#" onclick="return setEffect('red')">Red</a> - 
+      <a id="green" href="#" onclick="return setEffect('green')">Green</a> - 
+      <a id="orange" href="#" onclick="return setEffect('orange')">Orange</a> - 
+      <a id="purple" href="#" onclick="return setEffect('purple')">Purple</a> - 
+      <a id="grey" href="#" onclick="return setEffect('grey')">Grey</a> - 
+      <a id="blink" href="#" onclick="return setEffect('blink')">Blink</a>
+    </para>
       
     <ft:form-template action="continue" method="POST" ajax="true">
       <ft:continuation-id/>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/datasource_chooser_template.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/datasource_chooser_template.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/datasource_chooser_template.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/datasource_chooser_template.xml Tue Jan  2 12:44:30 2007
@@ -24,7 +24,7 @@
   <h4 class="samplesGroup">Union widget sample (with AJAX)</h4>
   <title>Datasource chooser</title>
   <script type="text/javascript">
-     //cocoon.ajax.BrowserUpdater.highlight = cocoon.ajax.Fader.fade;
+      dojo.addOnLoad(function(){cocoon.ajax.BUHandler.highlight = cocoon.ajax.effects.highlight.green});
   </script>
   <content>
     <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST" ajax="true">

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/dynamicrepeater_dojo_template.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/dynamicrepeater_dojo_template.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/dynamicrepeater_dojo_template.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/dynamicrepeater_dojo_template.xml Tue Jan  2 12:44:30 2007
@@ -24,13 +24,6 @@
       
   <!-- Import the macros that define CForms template elements -->
   <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
-  <fi:init>
-	<script type="text/javascript">
-	  // Uncomment this to see Dojo debug
-	  var djConfig = { isDebug: true };
-	
-    </script>	
-  </fi:init>
   <h4 class="samplesGroup">Repeater widget with advanced interaction</h4>
   <title>Repeater widget with advanced interaction</title>
   <style type="text/css">
@@ -56,7 +49,7 @@
       <li>use in-place editing (an input appears when you click on the text).</li>
     </ul>
       <ft:repeater id="contacts">
-        <div dojoType="CFormsRepeater" orderable="true" select="select">
+        <div dojoType="forms:CFormsRepeater" orderable="true" select="select">
         <jx:choose>
           <jx:when test="${repeater.getSize() == 0}">
             <p><strong><em>There are no contacts to display</em></strong></p>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/dynamicrepeater_template.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/dynamicrepeater_template.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/dynamicrepeater_template.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/dynamicrepeater_template.xml Tue Jan  2 12:44:30 2007
@@ -24,12 +24,6 @@
       
   <!-- Import the macros that define CForms template elements -->
   <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
-  <fi:init>
-	<script type="text/javascript">
-	  // Uncomment this to see Dojo debug
-	  // var djConfig = { isDebug: true };
-    </script>	
-  </fi:init>
   <h4 class="samplesGroup">Repeater widget</h4>
   <title>Dynamic template</title>
   <style type="text/css">

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/dynamicrepeaters_dojo_template.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/dynamicrepeaters_dojo_template.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/dynamicrepeaters_dojo_template.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/dynamicrepeaters_dojo_template.xml Tue Jan  2 12:44:30 2007
@@ -24,12 +24,6 @@
       
   <!-- Import the macros that define CForms template elements -->
   <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
-  <fi:init>
-	<script type="text/javascript">
-	  // Uncomment next line to see Dojo debug
-	  // var djConfig = { isDebug: true };
-  </script>
-  </fi:init>
   <h4 class="samplesGroup">Repeater widget with advanced interaction</h4>
   <title>Repeater widget with advanced interaction</title>
   <style type="text/css">
@@ -56,7 +50,7 @@
       <li>use in-place editing (an input appears when you click on the text) in the third repeater.</li>
     </ul>
       <ft:repeater id="contacts1">
-        <div dojoType="CFormsDragAndDropRepeater" dnd-id="contacto" dnd-action="dnd" orderable="true" select="select">
+        <div dojoType="forms:CFormsDragAndDropRepeater" dnd-id="contacto" dnd-action="dnd" orderable="true" select="select">
         <jx:choose>
           <jx:when test="${repeater.getSize() == 0}">
             <p><strong><em>There are no contacts to display</em></strong></p>
@@ -97,7 +91,7 @@
     </ft:repeater>
     <!-- 2nd repeater -->
     <ft:repeater id="contacts2">
-        <div dojoType="CFormsDragAndDropRepeater" dnd-id="contacto" dnd-action="dnd" orderable="true" select="select">
+        <div dojoType="forms:CFormsDragAndDropRepeater" dnd-id="contacto" dnd-action="dnd" orderable="true" select="select">
         <jx:choose>
           <jx:when test="${repeater.getSize() == 0}">
             <p><strong><em>There are no contacts to display</em></strong></p>
@@ -139,7 +133,7 @@
             </ft:repeater>
      <!-- 3rd repeater -->
      <ft:repeater id="contacts3">
-        <div dojoType="CFormsDragAndDropRepeater" dnd-id="contacto" dnd-action="dnd" orderable="true" select="select">
+        <div dojoType="forms:CFormsDragAndDropRepeater" dnd-id="contacto" dnd-action="dnd" orderable="true" select="select">
         <jx:choose>
           <jx:when test="${repeater.getSize() == 0}">
             <p><strong><em>There are no contacts to display</em></strong></p>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/file_explorer_template.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/file_explorer_template.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/file_explorer_template.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/file_explorer_template.xml Tue Jan  2 12:44:30 2007
@@ -48,12 +48,12 @@
             alert("Error: cannot find element with id '" + id + "'");
             return;
         }
-        var form = forms_getForm(elt);
+        var form = cocoon.forms.getForm(elt);
         var actInput = id + ":action";
         var pathInput = id + ":path";
         form[actInput].value = act
         form[pathInput].value = path;
-        forms_submitForm(elt, id);
+        cocoon.forms.submitForm(elt, id);
         // Reset fields (this form may be reposted later when in Ajax mode)
         form[actInput].value = "";
         form[pathInput].value = "";

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/form1_success_jx.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/form1_success_jx.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/form1_success_jx.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/form1_success_jx.xml Tue Jan  2 12:44:30 2007
@@ -34,13 +34,13 @@
       </xsp:logic>
     -->
     email has the following value:
-    ${request.getAttribute("form1").lookupWidget("email").getValue()}
+    ${cocoon.request.getAttribute("form1").lookupWidget("email").getValue()}
     <br/>
     Second person has this firstname:
-    ${request.getAttribute("form1").lookupWidget("contacts").getWidget(1, "firstname").getValue()}
+    ${cocoon.request.getAttribute("form1").lookupWidget("contacts").getWidget(1, "firstname").getValue()}
     <br/>
     The value of the checkbox is:
-    ${request.getAttribute("form1").lookupWidget("somebool").getValue()}
+    ${cocoon.request.getAttribute("form1").lookupWidget("somebool").getValue()}
     <p>
       <a href="./">Back to Forms samples</a>
     </p>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/inplace_edit_template.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/inplace_edit_template.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/inplace_edit_template.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/inplace_edit_template.xml Tue Jan  2 12:44:30 2007
@@ -24,7 +24,7 @@
   <h4 class="samplesGroup">Inline editing</h4>
   <title>Inline editing</title>
   <script type="text/javascript">
-     //cocoon.ajax.BrowserUpdater.highlight = cocoon.ajax.Fader.fade;
+      dojo.addOnLoad(function(){cocoon.ajax.BUHandler.highlight = cocoon.ajax.effects.highlight.red});
   </script>
   <content>
     <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST" ajax="true">

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/multipage_template.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/multipage_template.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/multipage_template.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/multipage_template.xml Tue Jan  2 12:44:30 2007
@@ -27,7 +27,7 @@
   <h4 class="samplesGroup">Widget sampler: one form divided in multiple pages</h4>
   <title>Sample multipage form with Ajax updates</title>
   <script type="text/javascript">
-	  //cocoon.ajax.BrowserUpdater.highlight = cocoon.ajax.Fader.fade;
+      dojo.addOnLoad(function(){cocoon.ajax.BUHandler.highlight = cocoon.ajax.effects.highlight.yellow});
   </script>
   <content>
     <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST" ajax="true">

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/sampletree_template.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/sampletree_template.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/sampletree_template.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/sampletree_template.xml Tue Jan  2 12:44:30 2007
@@ -49,12 +49,12 @@
             alert("Error: cannot find element with id '" + id + "'");
             return;
         }
-        var form = forms_getForm(elt);
+        var form = cocoon.forms.getForm(elt);
         var actInput = id + ":action";
         var pathInput = id + ":path";
         form[actInput].value = act
         form[pathInput].value = path;
-        forms_submitForm(elt, id);
+        cocoon.forms.submitForm(elt, id);
         // Reset fields (this form may be reposted later when in Ajax mode)
         form[actInput].value = "";
         form[pathInput].value = "";

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/upload_model.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/upload_model.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/upload_model.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/upload_model.xml Tue Jan  2 12:44:30 2007
@@ -23,7 +23,7 @@
       <fd:label>User name</fd:label>
     </fd:field>
     
-    <fd:upload id="upload" mime-types="text/plain" required="true">
+    <fd:upload id="upload" mime-types="text/plain application/text" required="true">
       <fd:label>Upload a text file</fd:label>
       <fd:hint>You must choose a text file</fd:hint>
       <fd:on-value-changed>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/upload_template.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/upload_template.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/upload_template.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/upload_template.xml Tue Jan  2 12:44:30 2007
@@ -24,13 +24,20 @@
     <para>
     For this example to work, you must enable uploads in your web.xml file.
     </para>
+    <para>
+    If your browser supports it, the upload happens via Ajax, using dojo.io.IframeIO.
+    </para>
+    <para>
+    This sample uses an on-value-changed handler on the upload field, meaning the form will be submitted as soon as you have selected a file.<br/>
+    There is another upload sample with a <a href="uploadprogress">progress bar</a>.
+    </para>
     <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST" enctype="multipart/form-data" ajax="true">
       <fi:group>
         <fi:styling layout="columns"/>
         <fi:items>
           <ft:widget id="user"/>
           <ft:widget id="upload"/>
-	  <ft:widget id="message"/>
+	      <ft:widget id="message"/>
           <input type="submit"/>
         </fi:items>
       </fi:group>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/uploadprogress_template.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/uploadprogress_template.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/uploadprogress_template.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/uploadprogress_template.xml Tue Jan  2 12:44:30 2007
@@ -29,14 +29,13 @@
     
     Place the Widget inside the form which is doing the upload.
     eg. 
-        <script type="text/javascript">dojo.require("cocoon.ajax.FormUploadProgress");</script>
-        <div class="dojo-FormUploadProgress">Upload Progress:</div>
+        <div dojoType="ajax:FormUploadProgress">Upload Progress:</div>
  
     It should be possible to use this widget outside the context of a CForm.
  
     There are several parameters that may be optionally configured:
     eg.
-        <div class="dojo-FormUploadProgress"
+        <div dojoType="ajax:FormUploadProgress"
             background="#333"
             color="#ccc"
             ready="upload:progress.ready"
@@ -68,7 +67,14 @@
     <title>Upload Progress Sample</title>
     <content>
     
-        <para>For this example to work, you must enable uploads in your web.xml file.</para>
+        <para>
+            For this example to work, you must enable uploads in your web.xml file.<br/>
+            It would also be a good idea to up the limit on file-size a bit, so you can upload larger files to see the effect ....
+        </para>
+        <para>
+            This samples shows uploads in a repeater. Notice how your first click to add an upload row is submitted via XHR, while subsequent clicks are submitted via IframeIO (on supported browsers), as there are now file fields in the form.<br/>
+            There is another upload sample with <a href="upload">on-value-changed handler</a> that submits the form as soon as a file is chosen.
+        </para>
         
         <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST" enctype="multipart/form-data" ajax="true">
             <table border="0">
@@ -99,8 +105,7 @@
                 <ft:widget id="addupload"/> <ft:widget id="ok"/><br/>
             </p>
             <p>
-                <script type="text/javascript">dojo.require("cocoon.ajax.FormUploadProgress");</script>
-                <div class="dojo-FormUploadProgress">
+                <div dojoType="ajax:FormUploadProgress">
                     <div>Upload Progress Sample</div>
                 </div>
             </p>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/sitemap.xmap?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/sitemap.xmap Tue Jan  2 12:44:30 2007
@@ -111,7 +111,9 @@
         <map:call resource="simple-page2html">
           <map:parameter name="file" value="forms/{1}_template.xml"/>
         </map:call>
-        <map:transform src="../resources/forms-samples-styling.xsl"/>
+        <map:transform src="../resources/forms-samples-styling.xsl">
+          <map:parameter name="resources-uri" value="{request:contextPath}/_cocoon/resources"/>
+        </map:transform>
         <map:serialize/>
       </map:match>
       

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/sitemap.xmap?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/sitemap.xmap Tue Jan  2 12:44:30 2007
@@ -36,6 +36,12 @@
     </map:transformer>
   </map:transformers>
 
+  <map:serializers default="html">
+    <map:serializer logger="sitemap.serializer.json" mime-type="text/javascript" name="json" src="org.apache.cocoon.serialization.TextSerializer">
+      <encoding>UTF-8</encoding><!-- JSON responses are expected to be in UTF-8 -->
+    </map:serializer>
+  </map:serializers>
+
   <map:actions>
     <map:action name="make-form" src="org.apache.cocoon.forms.acting.MakeFormAction" logger="forms"/>
     <map:action name="init-form" src="org.apache.cocoon.forms.samples.InitForm1Action" logger="forms"/>
@@ -140,7 +146,7 @@
 
        <!-- pipeline to show the form -->
        <map:generate src="forms/form1_template_action.xml">
-	     <map:parameter name="attribute-name" value="form1"/>       	
+         <map:parameter name="attribute-name" value="form1"/>           
        </map:generate>
 <!-- <map:serialize type="xml"/> -->
        <map:transform type="forms" label="content1">
@@ -167,7 +173,7 @@
      <map:match pattern="form1.flow">
        <map:call function="handleForm">
          <map:parameter name="function" value="form1"/>
-		 <map:parameter name="renderMode" value="jx"/>
+         <map:parameter name="renderMode" value="jx"/>
          <map:parameter name="definitionURI" value="forms/form1.xml"/>
        </map:call>
      </map:match>
@@ -196,7 +202,7 @@
         <map:generate type="suggestion-list"/>
         <map:transform type="i18n"/>
         <map:transform src="resource://org/apache/cocoon/forms/resources/selection-list2json.xsl"/>
-        <map:serialize type="text"/>
+        <map:serialize type="json"/>
      </map:match>
      <!--
         | Show a form, using the forms transformer
@@ -225,7 +231,7 @@
        <map:generate type="jx" src="forms/{1}_template.xml" label="content1">
          <map:parameter name="locale" value="{flow-attribute:locale}"/>
        </map:generate>
-       <map:transform type="browser-update"/>
+       <map:transform type="browser-update"/><!-- AJAX-style form update -->
        <map:transform type="i18n">
          <map:parameter name="locale" value="{flow-attribute:locale}"/>
        </map:transform>
@@ -234,28 +240,25 @@
        </map:call>
        <map:transform src="resources/forms-samples-styling.xsl">
          <map:parameter name="resources-uri" value="{request:contextPath}/_cocoon/resources"/>
+         <map:parameter name="dojo-debug" value="false"/><!-- set to true to turn on dojo debugging in the Browser -->
        </map:transform>
        <map:transform type="i18n">
          <map:parameter name="locale" value="{flow-attribute:locale}"/>
        </map:transform>
        <map:select type="ajax-request">
-         <map:when test="true">
-                <map:select type="request-parameter">
-                        <map:parameter name="parameter-name" value="dojo.transport"/>
-                    <map:when test="iframe">
-                        <map:transform src="resource://org/apache/cocoon/forms/resources/IframeTransport-bu-styling.xsl"/><!---->
-                        <map:serialize type="xhtml"/><!-- this is REALLY important -->
-                    </map:when>
-                    <map:otherwise>
-                                <map:serialize type="xml"/>
-                    </map:otherwise>
-                </map:select>
+         <map:when test="true"><!-- sending a partial Browser Update -->
+            <map:select type="request-parameter">
+              <map:parameter name="parameter-name" value="dojo.transport"/>
+              <map:when test="iframe"><!-- sending BU via iFrameIO -->
+                <map:transform src="resource://org/apache/cocoon/forms/resources/IframeTransport-bu-styling.xsl"/>
+                <map:serialize type="xhtml"/><!-- this is REALLY important -->
+              </map:when>
+              <map:otherwise><!-- sending BU via XHR -->
+                <map:serialize type="xml"/>
+              </map:otherwise>
+            </map:select>
          </map:when>
-       <!--<map:select type="ajax-request">
-         <map:when test="true">
-           <map:serialize type="xml"/>
-         </map:when>-->
-         <map:otherwise>
+         <map:otherwise><!-- sending a complete page -->
            <map:serialize type="html"/>
          </map:otherwise>
        </map:select>
@@ -495,9 +498,9 @@
           If needed, you can override them with your own pipelines before -->
 
      <!-- for developers: load directly from the source tree, rather than from the jars
- 	  <map:match pattern="resources/*/**">
-	    <map:read src="file://{realpath:}/../../src/blocks/{1}/trunk/java/org/apache/cocoon/{1}/resources/{2}"/>
-	  </map:match>
+      <map:match pattern="resources/*/**">
+        <map:read src="file://{realpath:}/../../src/blocks/{1}/trunk/java/org/apache/cocoon/{1}/resources/{2}"/>
+      </map:match>
        -->
      <map:match pattern="resources/*/**">
        <map:read src="resource://org/apache/cocoon/{1}/resources/{2}"/>
@@ -593,7 +596,7 @@
          <map:parameter name="attribute-name" value="form1"/>
        </map:act>       
        <map:generate src="forms/form1_template_action_jx-macro.xml" type="jx">
-         <map:parameter name="attribute-name" value="form1"/>       	
+         <map:parameter name="attribute-name" value="form1"/>           
        </map:generate>
        <map:serialize type="xml"/>
      </map:match>     

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/welcome.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/welcome.xml?view=diff&rev=491930&r1=491929&r2=491930
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/welcome.xml (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/welcome.xml Tue Jan  2 12:44:30 2007
@@ -128,6 +128,10 @@
      (Ajax) The dynamic repeater sample revisited, featuring drag and drop reordering of rows,
      selecting rows by clicking anywhere in the row, and in-place editing of values.
    </sample>
+   <sample name="Multi drag and drop reordering" href="do-dojoRepeaters.flow">
+     (Ajax) The dynamic repeater sample revisited again, this time featuring drag and drop reordering of rows,
+     with the ability to drag and drop from one repeater to another.
+   </sample>
    <sample name="Cocoon suggests" href="do-suggest.flow">
      (Ajax) Very simple demo of the &lt;fd:suggestion-list&gt; feature.
    </sample>
@@ -142,7 +146,7 @@
  
  <group name="Dynamic repeater template and event handling">
     <sample name="Dynamic repeater template" href="dreamteam">
-      <b>Currently broken!</b> Create your Euro 2004 soccer dream team
+      Create your Euro 2004 soccer dream team
     </sample>
  </group>
 



Mime
View raw message