cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jer...@apache.org
Subject svn commit: r694391 [1/2] - /cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/
Date Thu, 11 Sep 2008 18:14:26 GMT
Author: jeremy
Date: Thu Sep 11 11:14:22 2008
New Revision: 694391

URL: http://svn.apache.org/viewvc?rev=694391&view=rev
Log:
adding new samples, updating old ones to work in the updated cforms (lots still to do)

Added:
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calendars.xml   (with props)
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calendars_template.xml   (with props)
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/group_styles.xml   (with props)
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/group_styles_template.xml   (with props)
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/lists.xml   (with props)
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/lists_template.xml   (with props)
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/numbers.xml   (with props)
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/numbers_template.xml   (with props)
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/textareas.xml   (with props)
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/textareas_template.xml   (with props)
Modified:
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/ajax_suggest_form.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calculatedfields_template.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/datasource_chooser.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/datasource_chooser_template.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeater.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeater_dojo_template.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeater_template.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeaters.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeaters_dojo_template.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/form1_template.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/form1_template_action_jx-macro.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/htmlarea_template.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/inplace_edit_template.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/multipage_template.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/tasktree.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/upload_model.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/upload_template.xml
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/uploadprogress_template.xml

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/ajax_suggest_form.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/ajax_suggest_form.xml?rev=694391&r1=694390&r2=694391&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/ajax_suggest_form.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/ajax_suggest_form.xml Thu Sep 11 11:14:22 2008
@@ -35,6 +35,9 @@
 	    }
 	
 	    var resolver = cocoon.getComponent(org.apache.excalibur.source.SourceResolver.ROLE);
+	    
+	    // TODO: filter may now contain "*term" (match end), "term*" (match start) or "term" (match whole)
+	    
         var filename = filter;
 	    var src = resolver.resolveURI("context://samples/" + filename);
 	    var suggestions = [];
@@ -122,6 +125,8 @@
             }
           }
         }
+
+	    // TODO: filter may now contain "*term" (match end), "term*" (match start) or "term" (match whole)
         
         var suggestions = [];
         var list = personList();

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calculatedfields_template.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calculatedfields_template.xml?rev=694391&r1=694390&r2=694391&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calculatedfields_template.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calculatedfields_template.xml Thu Sep 11 11:14:22 2008
@@ -37,8 +37,8 @@
     <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST" ajax="true">
       <!-- manual layout of fields, without use of a fi:group -->
       <ft:widget-label id="articles"/><br/>
-      <ft:repeater id="articles">
-        <div dojoType="forms:CFormsRepeater" orderable="true">
+      <ft:repeater id="articles" select="select">
+        <div>
           <table border="1">
             <thead>
               <tr>

Added: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calendars.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calendars.xml?rev=694391&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calendars.xml (added)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calendars.xml Thu Sep 11 11:14:22 2008
@@ -0,0 +1,112 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+
+<!--
+  @version $Id: form1.xml 497900 2007-01-19 18:39:48Z bruno $
+-->
+
+<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+         xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+
+
+  <fd:widgets>
+    <!-- group state holders
+    <fd:field id="tab-state">
+      <fd:datatype base="string"/>
+    </fd:field> -->
+
+ 
+    <!-- Dates -->
+    <fd:field id="date0" required="true">
+      <fd:label>icu4j date</fd:label>
+      <fd:datatype base="date">
+        <fd:convertor type="icu4j" variant="date"/>
+      </fd:datatype>
+    </fd:field>
+    <fd:field id="date1" required="true">
+      <fd:label>icu4j date full</fd:label>
+      <fd:datatype base="date">
+        <fd:convertor type="icu4j" style="full" variant="date"/>
+      </fd:datatype>
+    </fd:field>
+    <fd:field id="date2" required="true">
+      <fd:label>icu4j date - yyyy MM dd</fd:label>
+      <fd:datatype base="date">
+        <fd:convertor type="icu4j" variant="date">
+          <fd:patterns>
+            <fd:pattern>yyyy MM dd</fd:pattern>
+          </fd:patterns>
+        </fd:convertor>
+      </fd:datatype>
+    </fd:field>
+  
+    <!-- Times -->
+    <fd:field id="time0">
+      <fd:label>icu4j time</fd:label>
+      <fd:datatype base="date">
+        <fd:convertor type="icu4j" variant="time"/>
+      </fd:datatype>
+    </fd:field>
+    <fd:field id="time1">
+      <fd:label>icu4j time medium</fd:label>
+      <fd:datatype base="date">
+        <fd:convertor type="icu4j" variant="time" timeStyle="medium"/>
+      </fd:datatype>
+    </fd:field>
+    <fd:field id="time2">
+      <fd:label>icu4j time - HH:mm:ss</fd:label>
+      <fd:datatype base="date">
+        <fd:convertor type="icu4j" variant="time">
+          <fd:patterns>
+            <fd:pattern>HH:mm:ss</fd:pattern>
+          </fd:patterns>
+        </fd:convertor>
+      </fd:datatype>
+    </fd:field>
+
+    <!-- DateTimes -->
+    <fd:field id="datetime0">
+      <fd:label>icu4j datetime</fd:label>
+      <fd:datatype base="date">
+        <fd:convertor type="icu4j" variant="datetime"/>
+      </fd:datatype>
+    </fd:field>
+    <fd:field id="datetime1">
+      <fd:label>icu4j datetime medium</fd:label>
+      <fd:datatype base="date">
+        <fd:convertor type="icu4j" variant="datetime" style="medium" timeStyle="medium"/>
+      </fd:datatype>
+    </fd:field>
+    <fd:field id="datetime2">
+      <fd:label>icu4j time - yyyy-MM-dd HH-mm-ss</fd:label>
+      <fd:datatype base="date">
+        <fd:convertor type="icu4j" variant="datetime">
+          <fd:patterns>
+            <fd:pattern>yyyy-MM-dd HH-mm-ss</fd:pattern>
+          </fd:patterns>
+        </fd:convertor>
+      </fd:datatype>
+    </fd:field>
+
+    <fd:submit id="ok">
+      <fd:label>Submit</fd:label>
+    </fd:submit>
+
+  </fd:widgets>
+
+</fd:form>

Propchange: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calendars.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calendars_template.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calendars_template.xml?rev=694391&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calendars_template.xml (added)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calendars_template.xml Thu Sep 11 11:14:22 2008
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<!-- The only difference between this file and the form1_template_flow.xml
+     is the value of the action attribute on the ft:form-template element -->
+<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"/>
+  <jx:import uri="resources/samples-jx-macros.xml"/><!-- common macros for samples -->
+
+  <h4 class="samplesGroup">Validating Calendar Samples</h4>
+  <title>Calendar Samples (<jx:out value="${locale}"/>)</title>
+	<style type="text/css">
+
+		body {
+			margin:20px;
+		}
+
+		/* add padding to each contentpane inside the tab container, and scrollbar if necessary */
+		.dijitTabPane {
+			padding : 1em;
+		}
+		table.columns {
+		  width:100%;
+		}
+    table.columns > tbody > tr > td {
+      width:50%;
+    }
+
+	</style>
+		
+  <content>
+
+    <ft:form-template class="fadeIn" action="#{$cocoon/continuation/id}.continue" method="POST" ajax="true">
+      <div style="width: 90%; margin: 10px 50px 50px 50px;">
+        <p>
+          <sample-locale-display/><!-- a macro from samples-jx-macros.xml -->
+        </p>
+
+        <div>
+          <fi:group>
+            <fi:label>Formatted Dates</fi:label>
+            <fi:styling layout="columns"/>
+            <fi:items>
+              <ft:widget id="date0"/>
+              <ft:widget id="date1"/>
+              <ft:widget id="date2"/>
+            </fi:items>
+          </fi:group>
+          <fi:group>
+            <fi:label>Formatted Times</fi:label>
+            <fi:styling layout="columns"/>
+            <fi:items>
+              <ft:widget id="time0"/>
+              <ft:widget id="time1"/>
+              <ft:widget id="time2"/>
+            </fi:items>
+          </fi:group>
+          <!--<fi:group>
+            <fi:label>Formatted DateTimes</fi:label>
+            <fi:styling layout="columns"/>
+            <fi:items>
+              <ft:widget id="datetime0"/>
+              <ft:widget id="datetime1"/>
+              <ft:widget id="datetime2"/>
+            </fi:items>
+          </fi:group> TODO: complete implementation -->
+        </div>
+        
+        <p><ft:widget id="ok"/></p>
+      </div>
+      <p>Supported Locales: 
+          <sample-locale-chooser/><!-- a macro from samples-jx-macros.xml -->
+      </p>
+      <p>
+        <a href="./do-calendars.flow">Restart this sample</a> - <a href="./">Back to samples</a>
+      </p>
+      <p align="center">
+         <sample-theme-chooser/><!-- a macro from samples-jx-macros.xml -->
+      </p>
+    </ft:form-template>
+  </content>
+</page>
+

Propchange: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/calendars_template.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/datasource_chooser.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/datasource_chooser.xml?rev=694391&r1=694390&r2=694391&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/datasource_chooser.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/datasource_chooser.xml Thu Sep 11 11:14:22 2008
@@ -24,15 +24,22 @@
          xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
 
   <fd:widgets>
-    <fd:field id="name" required="true">
+    <fd:field id="name" required="true" whitespace="trim">
+	  <fd:hint>Please name your datasource</fd:hint>
+	  <fd:help><div>The name for your datasource.</div><div>The name should begin with <b>C</b></div></fd:help>
       <fd:datatype base="string"/>
+      <fd:validation>
+        <fd:regexp pattern="C.*">
+          <fd:failmessage>Sorry, the PMC really does insist the name should begin with the letter 'C'.</fd:failmessage>
+        </fd:regexp>
+      </fd:validation>
     </fd:field>
     
     <!-- The datasource type. This is the union's "case" widget -->
     <fd:field id="sourcetype">
       <fd:datatype base="string"/>
       <!-- If you uncomment the line below the union will initially be showing the "SQL" choice -->
-      <!-- <fd:initial-value>SQL</fd:initial-value> -->
+      <fd:initial-value>SQL</fd:initial-value>
       <fd:selection-list>
         <fd:item value=""/>
         <fd:item value="SQL"/>

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/datasource_chooser_template.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/datasource_chooser_template.xml?rev=694391&r1=694390&r2=694391&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/datasource_chooser_template.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/datasource_chooser_template.xml Thu Sep 11 11:14:22 2008
@@ -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
@@ -21,15 +21,24 @@
       
   <!-- Import the macros that define CForms template elements -->
   <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
+  <jx:import uri="resources/samples-jx-macros.xml"/><!-- common macros for samples -->
   <h4 class="samplesGroup">Union widget sample (with AJAX)</h4>
   <title>Datasource chooser</title>
+  
   <script type="text/javascript">
+      dojo.require("cocoon.ajax.BUHandler");
       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">
+    <ft:form-template class="fadeIn" action="#{$cocoon/continuation/id}.continue" method="POST" ajax="true">
       
-      <p>Datasource name: <ft:widget id="name"/></p>
+      <div>
+        Datasource name: 
+        <ft:widget id="name">
+          <!-- BTW. @regExp here is cheating and will be disallowed. It is hoped that most model validation rules will be translated to work on the browser as well. -->
+          <fi:styling textcase="proper" regExp="^C.*"/>
+        </ft:widget> <span style="font-size: 200%;">☜</span> TODO: Why is the help button so small in Safari?
+      </div>
       <fieldset>
         <legend>Type:
           <ft:widget id="sourcetype"/>
@@ -43,7 +52,7 @@
               <fi:group>
                 <fi:styling layout="columns"/>
                 <fi:items>
-                  <ft:widget id="jdbc-url"/>
+                  <ft:widget id="jdbc-url"><fi:styling size="30"/></ft:widget>
                   <ft:widget id="login"/>
                   <ft:widget id="password"><fi:styling type="password"/></ft:widget>
                 </fi:items>
@@ -63,6 +72,9 @@
       <ft:widget id="ok"/>
       <br/>
       <a href="./do-datasourceChooser.flow">Restart this sample</a> -  <a href="./">Back to Forms samples</a>
+      <p align="center">
+        <sample-theme-chooser/><!-- a macro from samples-jx-macros.xml -->
+      </p>
 
     </ft:form-template>
   </content>

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeater.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeater.xml?rev=694391&r1=694390&r2=694391&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeater.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeater.xml Thu Sep 11 11:14:22 2008
@@ -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
@@ -25,7 +25,7 @@
 
   <fd:widgets>
   
-    <fd:repeater id="contacts" orderable="true">
+    <fd:repeater id="contacts" orderable="true"><!-- NB. @orderable controls whether DnD is added to the Repeater. This needs to be enforced by the Model -->
       <fd:widgets>
         
         <!-- The ID is here to keep track of row creation order, which can
@@ -38,6 +38,7 @@
         <fd:field id="firstname">
           <fd:label>Firstname</fd:label>
           <fd:hint>First name</fd:hint>
+          <fd:help>Help ME! I am stuck inside this tiny icon!!<br/>Hey! I can have <b>markup</b>!!</fd:help>
           <fd:datatype base="string"/>
         </fd:field>
         
@@ -47,9 +48,12 @@
           <fd:datatype base="string"/>
         </fd:field>
         
-        <fd:row-action id="up" command="move-up"/>
-        
-        <fd:row-action id="down" command="move-down"/>
+        <fd:row-action id="up" command="move-up">
+          <fd:label>&#9650;</fd:label>
+        </fd:row-action>
+        <fd:row-action id="down" command="move-down">
+          <fd:label>&#9660;</fd:label>
+        </fd:row-action>
         
         <fd:booleanfield id="select">
           <fd:label>Select</fd:label>
@@ -60,6 +64,7 @@
   
     <fd:repeater-action id="addcontact" command="add-row" repeater="contacts">
       <fd:label>Add contact</fd:label>
+      <fd:hint>Add a new contact to the list</fd:hint>
       <fd:on-action>
         <fd:javascript>
           // Increment the row creation ID counter (it has been initialized in

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeater_dojo_template.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeater_dojo_template.xml?rev=694391&r1=694390&r2=694391&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeater_dojo_template.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeater_dojo_template.xml Thu Sep 11 11:14:22 2008
@@ -24,74 +24,89 @@
       
   <!-- Import the macros that define CForms template elements -->
   <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
-  <h4 class="samplesGroup">Repeater widget with advanced interaction</h4>
-  <title>Repeater widget with advanced interaction</title>
+  <jx:import uri="resources/samples-jx-macros.xml"/><!-- common macros for samples -->
+
+  <h4 class="samplesGroup">Repeater widget with simple Drag &amp; Drop</h4>
+  <title>Repeater widget with simple Drag &amp; Drop</title>
+
   <style type="text/css">
-    .forms-row td {
-       padding: 5px;
-    }
+    @import "/_cocoon/resources/dojotoolkit/dojo/resources/dnd.css"
+    
 
-    /* Ensure the inline edit is visible on selected rows */
-    .forms-row-selected .editableRegion {
-       color: black;
+    body {
+        margin:20px;
+    }
+    .container {
+        border:3px solid #ccc;
+        padding: 1em 3em; 
+        cursor: default;
+        radius:8pt;
+        background:#ddd;
+        -moz-border-radius:8pt 8pt;
+        -webkit-border-radius:8pt 8pt;
     }
   </style>
   
-  <content>
-    <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST" ajax="true">
-    
-    <p>This example expands on the <a href="do-dynaRepeater.flow">dynamic repeater sample</a> and uses
-       <a href="http://dojotoolkit.org">Dojo</a> to provide additional interaction features.
-       After adding rows in the repeater below you will be able to:</p>
-    <ul>
-      <li>reorder rows using drag-and-drop,</li>
-      <li>select and deselect rows by clicking anywhere rather than in a checkbox,</li>
-      <li>use in-place editing (an input appears when you click on the text).</li>
-    </ul>
-      <ft:repeater id="contacts">
-        <div dojoType="forms:CFormsRepeater" orderable="true" select="select">
+  <content>           <!-- NB. the optional class="fadeIn" makes the form display itself only after the visually messy dojo-fication has completed -->
+    <ft:form-template class="fadeIn" action="#{$cocoon/continuation/id}.continue" method="POST" ajax="true">
+      <p>This example expands on the <a href="do-dynaRepeater.flow">dynamic repeater sample</a> and uses
+         <a href="http://dojotoolkit.org">Dojo</a> to provide additional interaction features.
+         After adding rows in the repeater below you will be able to:</p>
+      <ul>
+        <li>reorder rows using drag-and-drop</li>
+        <li>see drag and drop feedback via an avatar</li>
+        <li>use meta-keys ot select and deselect multiple rows</li>
+        <li>select and deselect rows by clicking anywhere rather than in a checkbox, or in this case via a <b>special handle</b></li>
+        <li>use in-place editing (an input appears when you click on the text)</li>
+      </ul>
+      <ft:repeater id="contacts" select="select" handleClass="myHandle">
         <jx:choose>
           <jx:when test="${repeater.getSize() == 0}">
             <p><strong><em>There are no contacts to display</em></strong></p>
           </jx:when>
           <jx:otherwise>
 
-            <table border="1">
-              <tr>
+            <table border="0" cellspacing="0" cellpadding="0" class="container">
+              <tr><th></th>
                 <th width="300"><ft:repeater-widget-label widget-id="firstname"/></th>
                 <th width="300"><ft:repeater-widget-label widget-id="lastname"/></th>
                 <th><ft:repeater-widget-label widget-id="ID"/></th>
               </tr>
               <tbody>
-                  <!-- The contents of the repeater-widget element is a template that will
-                       be applied to each row in the repeater. -->
-                  <ft:repeater-rows>
-                    <tr class="forms-row">
-                      <td><ft:widget id="firstname" fi:type="inplace" fi:submit-on-change="true"/></td>
-                      <td><ft:widget id="lastname" fi:type="inplace"/>
-		              </td>
-                      <td><ft:widget id="ID"/>
-                        <ft:widget id="select">
-	                      <fi:styling style="display: none"/>
-	                    </ft:widget>
-                      </td>
-                    </tr>
-                  </ft:repeater-rows>
-                </tbody>
+                <!-- The contents of the repeater-widget element is a template that will
+                     be applied to each row in the repeater. -->
+                <ft:repeater-rows>
+                  <tr class="forms-row">
+                    <td class="myHandle"></td><!-- this becomes a drag handle -->
+                    <td><ft:widget id="firstname" fi:type="inplace" fi:submit-on-change="true"/></td>
+                    <td><ft:widget id="lastname" fi:type="inplace"/></td>
+                    <td>
+                      <ft:widget id="ID"/>
+                      <ft:widget id="select">
+                        <!--<fi:styling style="display: none"/>-->
+                      </ft:widget>
+                    </td>
+                    <td class="myHandle"></td><!-- this becomes another drag handle -->
+                  </tr>
+                </ft:repeater-rows>
+              </tbody>
             </table>
-                </jx:otherwise>
-              </jx:choose>
-             <p>
-                  <ft:widget id="../addcontact"/>
-                  <jx:if test="${widget.getSize() > 0}">
-                    <ft:widget id="../removecontacts"/>
-                  </jx:if>
-              </p>
-              </div>
-            </ft:repeater>
-            <ft:widget id="ok"/><br/>
-            <a href="./do-dojoRepeater.flow">Restart this sample</a> - <a href="./">Back to samples</a>
-
+          </jx:otherwise>
+        </jx:choose>
+        <p>
+          <ft:widget id="../addcontact" iconClass="plusIcon"/>
+          <jx:if test="${widget.getSize() > 0}">
+            <ft:widget id="../removecontacts" iconClass="minusIcon"/><!-- TODO: get css-based iconClass working -->
+          </jx:if>
+        </p>
+      </ft:repeater>
+      <p><ft:widget id="ok"/></p>
+      <p>
+        <a href="./do-dojoRepeater.flow">Restart this sample</a> - <a href="./">Back to samples</a>
+      </p>
+      <p align="center">
+         <sample-theme-chooser/><!-- a macro from samples-jx-macros.xml -->
+      </p>
     </ft:form-template>
   </content>
 </page>

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeater_template.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeater_template.xml?rev=694391&r1=694390&r2=694391&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeater_template.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeater_template.xml Thu Sep 11 11:14:22 2008
@@ -36,6 +36,7 @@
     .forms-row-1 td {
        padding: 5px;
     }
+    .forms.action {font-size: 60%;}
   </style>
   
   <content>
@@ -52,7 +53,7 @@
        of rows and clicking anywhere in a row to select it.</p>
     <p>Here is another <a href="do-dojoRepeaters.flow">Dojo sample</a> that extends the above dojo sample by
     allowing drag-and-drop support between different repeaters.</p>
-      <ft:repeater id="contacts">
+      <ft:repeater id="contacts" select="select">
         <div>
         <jx:choose>
           <jx:when test="${repeater.getSize() == 0}">
@@ -83,7 +84,7 @@
                           </jx:when>
                           <jx:otherwise>
                             <ft:widget id="up">
-                              <fi:styling type="image" src="resources/forms/img/move_up.gif"/>
+                              <fi:styling type="image" src="resources/forms/img/move_up.gif"/><!-- TODO: deprecate @src, replace with @class - i.e. use CSS instead -->
                             </ft:widget>
                           </jx:otherwise>
                         </jx:choose>

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeaters.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeaters.xml?rev=694391&r1=694390&r2=694391&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeaters.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeaters.xml Thu Sep 11 11:14:22 2008
@@ -21,14 +21,23 @@
 -->
 
 <fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
-         xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+         xmlns:i18n="http://apache.org/cocoon/i18n/2.1" id="form">
 
   <fd:widgets>
-    <fd:repeater id="contacts1" orderable="true">
+
+    <!-- 1st repeater, a DND Source  
+          orderable="true" - this repeater may have it's rows rearranged via DnD
+          dndAllow - missing, using default value, meta-keys will be used to determine copy/move behaviour
+          rowType="family" - rows from the repeater may be droped on another repeater that declares eg. acceptType="family"
+          acceptType - missing, you cannot drop anything on this repeater from another one
+    -->
+    <fd:repeater id="contacts1" orderable="true" rowType="family">
       <fd:widgets>
 
         <!-- The ID is here to keep track of row creation order, which can
-            have no relation with row index when the users used move up/down -->
+            have no relation with row index when the users used move up/down
+            and even less if they clone a row
+         -->
         <fd:output id="ID">
           <fd:label>ID</fd:label>
           <fd:datatype base="integer"/>
@@ -36,19 +45,16 @@
 
         <fd:field id="firstname">
           <fd:label>Firstname</fd:label>
-          <fd:hint>First name</fd:hint>
+          <fd:hint>Your family member's first name</fd:hint>
           <fd:datatype base="string"/>
         </fd:field>
 
         <fd:field id="lastname">
           <fd:label>Lastname</fd:label>
-          <fd:hint>Last name</fd:hint>
+          <fd:hint>Your family member's last name</fd:hint>
           <fd:datatype base="string"/>
         </fd:field>
 
-        <fd:row-action id="up" command="move-up"/>
-        <fd:row-action id="down" command="move-down"/>
-
         <fd:booleanfield id="select">
           <fd:label>Select</fd:label>
         </fd:booleanfield>
@@ -57,11 +63,11 @@
     </fd:repeater>
 
     <fd:repeater-action id="removecontacts1" command="delete-rows" repeater="contacts1" select="select">
-      <fd:label>Remove selected contacts</fd:label>
+      <fd:label>Remove selected</fd:label>
     </fd:repeater-action>
 
     <fd:repeater-action id="addcontact1" command="add-row" repeater="contacts1">
-      <fd:label>Add contact</fd:label>
+      <fd:label>Add Family</fd:label>
       <fd:on-action>
         <fd:javascript>
           // Increment the row creation ID counter (it has been initialized in
@@ -77,8 +83,13 @@
       </fd:on-action>
     </fd:repeater-action>
     
-    <!-- Second repeater -->
-        <fd:repeater id="contacts2" orderable="true">
+    <!-- 2nd repeater, a DND Source 
+          orderable="true" - this repeater may have it's rows rearranged via DnD
+          dndAllow="move, copy" - internal drags can only move, external drags can only copy (meta-keys ignored)
+          rowType="friends" - rows from the repeater may be droped on another repeater that declares eg. acceptType="friends"
+          acceptType - missing, you cannot drop anything on this repeater from another one
+    -->
+    <fd:repeater id="contacts2" orderable="true" dndAllow="move, copy" rowType="friends">
       <fd:widgets>
 
         <!-- The ID is here to keep track of row creation order, which can
@@ -90,19 +101,16 @@
 
         <fd:field id="firstname">
           <fd:label>Firstname</fd:label>
-          <fd:hint>First name</fd:hint>
+          <fd:hint>Your friend's first name</fd:hint>
           <fd:datatype base="string"/>
         </fd:field>
 
         <fd:field id="lastname">
           <fd:label>Lastname</fd:label>
-          <fd:hint>Last name</fd:hint>
+          <fd:hint>Your friend's last name</fd:hint>
           <fd:datatype base="string"/>
         </fd:field>
 
-        <fd:row-action id="up" command="move-up"/>
-        <fd:row-action id="down" command="move-down"/>
-
         <fd:booleanfield id="select">
           <fd:label>Select</fd:label>
         </fd:booleanfield>
@@ -110,11 +118,11 @@
     </fd:repeater>
 
     <fd:repeater-action id="removecontacts2" command="delete-rows" repeater="contacts2" select="select">
-      <fd:label>Remove selected contacts</fd:label>
+      <fd:label>Remove selected</fd:label>
     </fd:repeater-action>
 
     <fd:repeater-action id="addcontact2" command="add-row" repeater="contacts2">
-      <fd:label>Add contact</fd:label>
+      <fd:label>Add Friend</fd:label>
       <fd:on-action>
         <fd:javascript>
           // Increment the row creation ID counter (it has been initialized in
@@ -130,83 +138,39 @@
       </fd:on-action>
     </fd:repeater-action>
 
-    <!-- 3rd repeater -->
-        <fd:repeater id="contacts3" orderable="true">
+    <!-- 3rd repeater, the DND Target 
+          orderable="true" - this repeater may have it's row rearranged
+          dndAllow="move" - drags can only move (meta-keys ignored)
+          rowType - missing, no other repeater will accept rows from this repeater
+          acceptType="one, two" - you can drop rows from repeaters with a matching @rowType ("one" or "two") 
+    -->
+    <fd:repeater id="contacts3" orderable="true" dndAllow="move" acceptType="family, friends">
       <fd:widgets>
 
         <!-- The ID is here to keep track of row creation order, which can
             have no relation with row index when the users used move up/down -->
         <fd:output id="ID">
-          <fd:label>ID</fd:label>
           <fd:datatype base="integer"/>
         </fd:output>
 
-        <fd:field id="firstname">
-          <fd:label>Firstname</fd:label>
-          <fd:hint>First name</fd:hint>
+        <fd:output id="firstname">
           <fd:datatype base="string"/>
-        </fd:field>
+        </fd:output>
 
-        <fd:field id="lastname">
-          <fd:label>Lastname</fd:label>
-          <fd:hint>Last name</fd:hint>
+        <fd:output id="lastname">
           <fd:datatype base="string"/>
-        </fd:field>
-
-        <fd:row-action id="up" command="move-up"/>
-        <fd:row-action id="down" command="move-down"/>
+        </fd:output>
 
-        <fd:booleanfield id="select">
-          <fd:label>Select</fd:label>
-        </fd:booleanfield>
+        <fd:booleanfield id="select"/>
       </fd:widgets>
     </fd:repeater>
 
     <fd:repeater-action id="removecontacts3" command="delete-rows" repeater="contacts3" select="select">
-      <fd:label>Remove selected contacts</fd:label>
+      <fd:label>Remove selected</fd:label>
     </fd:repeater-action>
 
-    <fd:repeater-action id="addcontact3" command="add-row" repeater="contacts3">
-      <fd:label>Add contact</fd:label>
-      <fd:on-action>
-        <fd:javascript>
-          // Increment the row creation ID counter (it has been initialized in
-          // the flowscript when the form was created).
-          // This shows how attributes can be used as a communication means between
-          // application logic and widget event handlers.
-          var form = event.source.form;
-          var count = new java.lang.Integer(form.getAttribute("counter3").intValue() + 1);
-          form.setAttribute("counter3", count);
-          var repeater = form.getChild("contacts3");
-          repeater.getRow(repeater.getSize() - 1).getChild("ID").setValue(count);
-        </fd:javascript>
-      </fd:on-action>
-    </fd:repeater-action>
-    <fd:action id="dnd" status="invisible">
-      <fd:on-action>
-        <fd:javascript>
-          // Retrieve special action parameters
-          var targetRepeaterId = cocoon.request.getParameter("dndTarget.id");
-          
-          var sourceRepeaterId = cocoon.request.getParameter(targetRepeaterId + ".sourceRepeaterId");
-          var sourceRowIndex = cocoon.request.getParameter(targetRepeaterId + ".sourceRowIndex");
-          var targetRowIndex = cocoon.request.getParameter(targetRepeaterId + ".before");
-          // Processing: Copy the row from the source repeater to target
-          var form = event.source.form;
-          var sourceRepeater = form.getChild(sourceRepeaterId);
-          var sourceRow = sourceRepeater.getRow(sourceRowIndex);
-
-          var targetRepeater = form.getChild(targetRepeaterId);
-          var targetRow = targetRepeater.addRow(targetRowIndex);
-          targetRow.getChild("firstname").setValue(sourceRow.getChild("firstname").getValue());
-          targetRow.getChild("lastname").setValue(sourceRow.getChild("lastname").getValue());
-          targetRow.getChild("ID").setValue(sourceRow.getChild("ID").getValue());
-        </fd:javascript>
-        </fd:on-action>
-    </fd:action>
-
     <fd:submit id="ok">
-      <fd:label>Submit</fd:label>
+      <fd:label>Print</fd:label>
     </fd:submit>
   </fd:widgets>
 </fd:form>

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeaters_dojo_template.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeaters_dojo_template.xml?rev=694391&r1=694390&r2=694391&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeaters_dojo_template.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/dynamicrepeaters_dojo_template.xml Thu Sep 11 11:14:22 2008
@@ -15,167 +15,194 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<!-- This file is similar to form1_template_action.xml. They differ in group layout,
-     form's action attribute (to use continuations) and, this one is a dynamic form
-     template that changes the 'contacts' repeater layout depending on its size -->
+
 <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"/>
-  <h4 class="samplesGroup">Repeater widget with advanced interaction</h4>
-  <title>Repeater widget with advanced interaction</title>
+  <jx:import uri="resources/samples-jx-macros.xml"/><!-- common macros for samples -->
+  
+  <h4 class="samplesGroup">Repeater widget with multi Drag &amp; Drop</h4>
+  <title>Repeater widget with multi Drag &amp; Drop</title>
+  
   <style type="text/css">
-    .forms-row td {
-       padding: 5px;
+    @import "/_cocoon/resources/dojotoolkit/dojo/resources/dnd.css";
+    
+    .container {
+        border:3px solid #ccc;
+        padding: 1em 3em; 
+        margin: 1em 0;
+        cursor: default;
+        radius:8pt;
+        background:#ddd;
+        -moz-border-radius:8pt 8pt;
+        -webkit-border-radius:8pt 8pt;
     }
-
-    /* Ensure the inline edit is visible on selected rows */
-    .forms-row-selected .editableRegion {
-       color: black;
+    .soria .container {
+      border-color: #657c9c;
+      background: #e2ebfb;
+    }
+    .nihilo .container {
+      border-color: #ddd;
+      background: #eee;
+    }
+    div.dojoDndHorizontal > .dojoDndItem {
+        width: 100px;
+        overflow: hidden;
+        padding: 3px;
+    }
+    .small {
+      font-size:60%;
     }
   </style>
   
   <content>
-    <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST" ajax="true">
-    
-    <p>This example expands on the <a href="do-dynaRepeater.flow">dynamic repeater sample</a> and uses
-       <a href="http://dojotoolkit.org">Dojo</a> to provide additional interaction features.
-       After adding rows in any repeater below, you will be able to:</p>
-    <ul>
-      <li>move rows between repeaters using drag-and-drop,</li>
-      <li>reorder rows into the same repater using drag-and-drop,</li>
-      <li>select and deselect rows by clicking anywhere rather than in a checkbox,</li>
-      <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="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>
-          </jx:when>
-          <jx:otherwise>
-            <table border="1">
-              <tr>
-                <th width="300"><ft:repeater-widget-label widget-id="firstname"/></th>
-                <th width="300"><ft:repeater-widget-label widget-id="lastname"/></th>
-                <th><ft:repeater-widget-label widget-id="ID"/></th>
-              </tr>
-              <tbody>
-                  <!-- The contents of the repeater-widget element is a template that will
-                       be applied to each row in the repeater. -->
+    <ft:form-template class="fadeIn" action="#{$cocoon/continuation/id}.continue" method="POST" ajax="true">
+      <div style="width: 90%; margin: 10px 50px 50px 50px;">
+      
+        <p>This example expands on the <a href="do-dynaRepeater.flow">dynamic repeater sample</a> and uses
+           <a href="http://dojotoolkit.org">Dojo</a> to provide additional interaction features.
+           After adding rows in any repeater below, you will be able to:</p>
+        <ul>
+          <li>Move rows between repeaters using drag-and-drop.</li>
+          <li>Reorder rows into the same repater using drag-and-drop.</li>
+          <li>Use (OS specific) meta-keys to select/deselect multiple rows and change copy/move behaviour (if the Model allows it).</li>
+          <li>Select and deselect single or multiple rows by clicking the row or the checkbox, the checkbox may be hidden.</li>
+          <li>Repeater behaviours are controlled by settings on the Model and Template (look at the comments in source); there should be a lot of flexibility to do different things.</li>
+        </ul>
+        
+        <!-- 1st repeater -->
+        <ft:repeater id="contacts1" select="select">
+          <div><b>Family</b></div>
+          <jx:choose>
+            <jx:when test="${repeater.getSize() == 0}">
+              <div class="container small">
+                <strong><em>There are no family to display</em></strong>
+                <ft:widget id="../addcontact1"/>
+              </div>
+            </jx:when>
+            <jx:otherwise>
+              
+              <table border="0" cellspacing="0" cellpadding="0" class="container" width="100%">
+                <tr>
+                  <th width="45%"><ft:repeater-widget-label widget-id="firstname"/></th>
+                  <th width="45%"><ft:repeater-widget-label widget-id="lastname"/></th>
+                  <th width="10%"><ft:repeater-widget-label widget-id="ID"/></th>
+                </tr>
+                <tbody>
                   <ft:repeater-rows>
                     <tr class="forms-row">
                       <td><ft:widget id="firstname"/></td>
-                      <td><ft:widget id="lastname"/>
-		              </td>
-                      <td><ft:widget id="ID"/>
-                        <ft:widget id="select">
-	                      <fi:styling style="display: none"/>
-	                    </ft:widget>
-                      </td>
+                      <td><ft:widget id="lastname"/></td>
+                      <td><ft:widget id="ID"/> <ft:widget id="select"/></td>
                     </tr>
                   </ft:repeater-rows>
+                  <tr><td colspan="3">
+                    <div class="small">
+                      Source: You can re-arrange items, and drag them to the Target at the bottom. (But not to "Friends").<br/>
+                      You can move or copy out of this Repeater, depending on the meta key.
+                      <p>
+                        <ft:widget id="../addcontact1"/>
+                        <jx:if test="${widget.getSize() > 0}">
+                          <ft:widget id="../removecontacts1"/>
+                        </jx:if>
+                      </p>
+                    </div>
+                  </td></tr>
                 </tbody>
-            </table>
-          </jx:otherwise>
-        </jx:choose>
-        <p>
-          <ft:widget id="../addcontact1"/>
-          <jx:if test="${widget.getSize() > 0}">
-            <ft:widget id="../removecontacts1"/>
-          </jx:if>
-        </p>
-      </div>
-    </ft:repeater>
-    <!-- 2nd repeater -->
-    <ft:repeater id="contacts2">
-        <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>
-          </jx:when>
-          <jx:otherwise>
-
-            <table border="1">
-              <tr>
-                <th width="300"><ft:repeater-widget-label widget-id="firstname"/></th>
-                <th width="300"><ft:repeater-widget-label widget-id="lastname"/></th>
-                <th><ft:repeater-widget-label widget-id="ID"/></th>
-              </tr>
-              <tbody>
-                  <!-- The contents of the repeater-widget element is a template that will
-                       be applied to each row in the repeater. -->
+              </table>
+            </jx:otherwise>
+          </jx:choose>
+        </ft:repeater>
+        
+        <!-- 2nd repeater -->
+        <ft:repeater id="contacts2" select="select">
+          <div><b>Friends</b></div>
+          <jx:choose>
+            <jx:when test="${repeater.getSize() == 0}">
+              <div class="container small">
+                <strong><em>There are no friends to display</em></strong>
+                <ft:widget id="../addcontact2"/>
+              </div>
+            </jx:when>
+            <jx:otherwise>
+              <table border="0" cellspacing="0" cellpadding="0" class="container" width="100%">
+                <tr>
+                  <th width="45%"><ft:repeater-widget-label widget-id="firstname"/></th>
+                  <th width="45%"><ft:repeater-widget-label widget-id="lastname"/></th>
+                  <th width="10%"><ft:repeater-widget-label widget-id="ID"/></th>
+                </tr>
+                <tbody>
                   <ft:repeater-rows>
                     <tr class="forms-row">
                       <td><ft:widget id="firstname"/></td>
                       <td><ft:widget id="lastname"/>
-		              </td>
-                      <td><ft:widget id="ID"/>
-                        <ft:widget id="select">
-	                      <fi:styling style="display: none"/>
-	                    </ft:widget>
                       </td>
-                    </tr>
-                  </ft:repeater-rows>
-                </tbody>
-            </table>
-                </jx:otherwise>
-              </jx:choose>
-             <p>
-                  <ft:widget id="../addcontact2"/>
-                  <jx:if test="${widget.getSize() > 0}">
-                    <ft:widget id="../removecontacts2"/>
-                  </jx:if>
-              </p>
-              </div>
-            </ft:repeater>
-     <!-- 3rd repeater -->
-     <ft:repeater id="contacts3">
-        <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>
-          </jx:when>
-          <jx:otherwise>
-
-            <table border="1">
-              <tr>
-                <th width="300"><ft:repeater-widget-label widget-id="firstname"/></th>
-                <th width="300"><ft:repeater-widget-label widget-id="lastname"/></th>
-                <th><ft:repeater-widget-label widget-id="ID"/></th>
-              </tr>
-              <tbody>
-                  <!-- The contents of the repeater-widget element is a template that will
-                       be applied to each row in the repeater. -->
-                  <ft:repeater-rows>
-                    <tr class="forms-row">
-                      <td><ft:widget id="firstname" fi:type="inplace" fi:submit-on-change="true"/></td>
-                      <td><ft:widget id="lastname" fi:type="inplace"/>
-		              </td>
                       <td><ft:widget id="ID"/>
                         <ft:widget id="select">
-	                      <fi:styling style="display: none"/>
-	                    </ft:widget>
+                          <fi:styling style="display: none"/>
+                        </ft:widget>
                       </td>
                     </tr>
                   </ft:repeater-rows>
+                  <tr><td colspan="3">
+                    <div class="small">
+                      Source: You can re-arrange items, and drag them to the Target at the bottom. You can only copy out of this Repeater. (But not to "Family")
+                      <p>
+                        <ft:widget id="../addcontact2"/>
+                        <jx:if test="${widget.getSize() > 0}">
+                          <ft:widget id="../removecontacts2"/>
+                        </jx:if>
+                      </p>
+                    </div>
+                  </td></tr>
                 </tbody>
-            </table>
-                </jx:otherwise>
-              </jx:choose>
-             <p>
-                  <ft:widget id="../addcontact3"/>
-                  <jx:if test="${widget.getSize() > 0}">
-                    <ft:widget id="../removecontacts3"/>
-                  </jx:if>
-              </p>
+              </table>
+            </jx:otherwise>
+          </jx:choose>
+        </ft:repeater>
+        
+        <!-- 3rd repeater -->
+        <div><b>Invitation Labels</b></div>
+        <ft:repeater id="contacts3" select="select" horizontal="true">
+          <jx:choose>
+            <jx:when test="${repeater.getSize() == 0}">
+              <div class="container"><!-- temporary placeholder to drop onto -->
+                <div>Drag some contacts here</div>
+                <div class="small">Target: You can drag items to this Target and re-arrange them but cannot drag them out.</div>
               </div>
-            </ft:repeater>
-            <ft:widget id="ok"/><br/>
-            <a href="./do-dojoRepeaters.flow">Restart this sample</a> - <a href="./">Back to samples</a>
-
+            </jx:when>
+            <jx:otherwise>
+              <div class="container">
+                <ft:repeater-rows>
+                  <div>
+                    <span class="small">(<ft:widget id="ID"/>)</span><br/>
+                    <ft:widget id="firstname"/>,
+                    <ft:widget id="lastname"/>
+                    <ft:widget id="select">
+                      <fi:styling style="display: none"/>
+                    </ft:widget>
+                  </div>
+                </ft:repeater-rows>
+                <div class="small">
+                  Target: You can drag items to this Target and re-arrange them but cannot drag them out, or copy.
+                  <p><ft:widget id="../removecontacts3"/></p>
+                </div>
+              </div>
+            </jx:otherwise>
+          </jx:choose>
+        </ft:repeater>
+        
+        <ft:widget id="ok"/><br/>
+      </div>  
+      <p>
+        <a href="./do-dojoRepeaters.flow">Restart this sample</a> - <a href="./">Back to samples</a>
+      </p>
+      <p align="center">
+         <sample-theme-chooser/><!-- a macro from samples-jx-macros.xml -->
+      </p>
     </ft:form-template>
   </content>
 </page>

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/form1_template.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/form1_template.xml?rev=694391&r1=694390&r2=694391&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/form1_template.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/form1_template.xml Thu Sep 11 11:14:22 2008
@@ -74,7 +74,7 @@
               </fi:items>
             </fi:group>
 
-            <fi:group>
+            <!-- <fi:group>
               <fi:styling layout="columns"/>
               <fi:label>Multivalue fields</fi:label>
               <fi:items>
@@ -86,7 +86,7 @@
                 </ft:widget>
                 <ft:widget id="freemv"/>
               </fi:items>
-            </fi:group>
+            </fi:group> TODO: re-implement multivaluefield widget  -->
           </fi:items>
         </fi:group>
 

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/form1_template_action_jx-macro.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/form1_template_action_jx-macro.xml?rev=694391&r1=694390&r2=694391&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/form1_template_action_jx-macro.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/form1_template_action_jx-macro.xml Thu Sep 11 11:14:22 2008
@@ -72,7 +72,7 @@
               </fi:items>
             </fi:group>
 
-            <fi:group>
+            <!--<fi:group>
               <fi:styling layout="columns"/>
               <fi:label>Multivalue fields</fi:label>
               <fi:items>
@@ -84,7 +84,7 @@
                 </ft:widget>
                 <ft:widget id="freemv"/>
               </fi:items>
-            </fi:group>
+            </fi:group>-->
           </fi:items>
         </fi:group>
 

Added: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/group_styles.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/group_styles.xml?rev=694391&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/group_styles.xml (added)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/group_styles.xml Thu Sep 11 11:14:22 2008
@@ -0,0 +1,282 @@
+<?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
+  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.
+-->
+
+<!--
+  @version $Id: form1.xml 497900 2007-01-19 18:39:48Z bruno $
+-->
+
+<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+         xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+
+
+  <fd:widgets>
+    <!-- group state holders -->
+    <fd:field id="tab-state">
+      <fd:datatype base="string"/>
+    </fd:field>
+    <fd:field id="nav-state">
+      <fd:datatype base="string"/>
+    </fd:field>
+    <fd:field id="choice-state">
+      <fd:datatype base="string"/>
+    </fd:field>
+  
+    <fd:field id="email" required="true">
+      <fd:datatype base="string"/>
+      <!-- new-style validation, outside of the datatype -->
+      <fd:validation>
+        <fd:email>
+          <fd:failmessage>Not a valid email address.</fd:failmessage>
+        </fd:email>
+      </fd:validation>
+      <fd:label>Enter an <b>email</b> address</fd:label>
+      <fd:help>
+        An email address must be in <i>[name]@[domain].[tld]</i> format.
+        <br/>
+        And if you do not know what <b>email</b> address is, then well, chances are
+        that you do not have it. However, if you have access to the Internet,
+        you can easily get yourself one!
+        <br/>
+        Choose one of the following options:
+        <ul>
+          <li><a href='http://mail.yahoo.com/'>Yahoo! Mail</a></li>
+          <li><a href='http://www.hotmail.com/'>Hotmail</a></li>
+        </ul>
+        <small>Anyway, the point of all this was to show a popup help with mixed html content.</small>
+      </fd:help>
+    </fd:field>
+
+    <fd:field id="something">
+      <fd:datatype base="string"/>
+      <fd:label>Something stringy</fd:label>
+    </fd:field>
+  
+    <fd:booleanfield id="somebool">
+      <fd:label>Toggle me <em>on</em> or <em>off</em>.</fd:label>
+    </fd:booleanfield>
+    <fd:booleanfield id="someotherbool">
+      <fd:label>Toggle me <em>on</em> or <em>off</em>.</fd:label>
+    </fd:booleanfield>
+  
+    <fd:field id="fourchars" required="true">
+      <fd:label>Select something that's 4 characters long</fd:label>
+      <fd:help>Something Really Helpful</fd:help>
+      <fd:datatype base="string"/>
+      <fd:validation>
+        <fd:length exact='2*2'/>
+      </fd:validation>
+      <fd:selection-list src="forms/a-choices.xml"/>
+    </fd:field>
+  
+    <fd:field id="account">
+      <fd:label>Indicate the size of your bank account (in m<sup>3</sup>)</fd:label>
+      <fd:help>Something Helpful</fd:help>
+      <fd:datatype base="long"/>
+      <fd:selection-list>
+        <fd:item value="1"/>
+        <fd:item value="2"/>
+        <fd:item value="3">
+          <fd:label>three</fd:label>
+        </fd:item>
+        <fd:item value="4"/>
+        <fd:item value="5"/>
+      </fd:selection-list>
+    </fd:field>
+  
+    <fd:field id="cowheight">
+      <fd:label>Indicate your height (in cows)</fd:label>
+      <fd:help>Something Helpful</fd:help>
+      <fd:datatype base="long"/>
+      <fd:selection-list>
+        <fd:item value="1"/>
+        <fd:item value="2"/>
+        <fd:item value="3">
+          <fd:label>three</fd:label>
+        </fd:item>
+        <fd:item value="4"/>
+        <fd:item value="5"/>
+      </fd:selection-list>
+    </fd:field>
+  
+    <fd:field id="number1" required="true">
+      <fd:label>Please enter a number<br/><small>(will automatically set a correct value below if needed)</small></fd:label>
+      <fd:help>An integer</fd:help>
+      <fd:datatype base="long"/>
+      <fd:on-value-changed>
+        <javascript>
+          var newValue = event.source.value;
+          if (newValue != null) {
+            var number2 = event.source.parent.lookupWidget("number2");
+            print("number2 starts as " + number2.value);
+            if (number2.value == null || number2.value.longValue() &lt; newValue.longValue()) {
+              number2.setValue(new java.lang.Long(newValue.longValue() + 1));
+            }
+            print("number2 ends as " + number2.value);
+          }
+        </javascript>
+      </fd:on-value-changed>
+    </fd:field>
+  
+    <fd:field id="number2" required="true">
+      <fd:label>Enter another number, larger than the other number</fd:label>
+      <fd:datatype base="long"/>
+      <fd:validation>
+        <fd:range min="number1 + 1">
+          <fd:failmessage>This number should be larger than the first number.</fd:failmessage>
+        </fd:range>
+      </fd:validation>
+    </fd:field>
+  
+    <fd:multivaluefield id="drinks">
+      <fd:label>Indicate which 2 of the following drinks you'd like to receive</fd:label>
+      <fd:datatype base="string"/>
+      <fd:validation>
+        <fd:value-count exact="2"/>
+      </fd:validation>
+      <fd:selection-list>
+        <fd:item value="Maes"/>
+        <fd:item value="Jupiler"/>
+        <fd:item value="Leffe"/>
+        <fd:item value="Hoegaarden"/>
+        <fd:item value="Coca Cola"/>
+      </fd:selection-list>
+    </fd:multivaluefield>
+  
+    <fd:multivaluefield id="freemv">
+      <fd:label>Here you can enter values freely</fd:label>
+      <fd:datatype base="string"/>
+    </fd:multivaluefield>
+
+    <fd:aggregatefield id="visa" required="true">
+      <fd:label>Enter your (16-digit) visa number (without spaces)
+        <br/>Your credit card will be billed.
+        <br/><small>Valid test number is: 4111111111111111</small>
+      </fd:label>
+      <fd:help>Use a fake number if <a href="http://cocoon.apache.org">Cocoon</a> is not running on your local computer</fd:help>
+      <fd:datatype base="string"/>
+      <fd:split pattern="([0-9]{4})([0-9]{4})([0-9]{4})([0-9]{4})">
+        <fd:map group="1" field="part1"/>
+        <fd:map group="2" field="part2"/>
+        <fd:map group="3" field="part3"/>
+        <fd:map group="4" field="part4"/>
+        <fd:failmessage>Not a valid 16-digit visa number.</fd:failmessage>
+      </fd:split>
+      <fd:combine expression='Concat(part1,part2,part3,part4)'/>
+      <fd:widgets>
+        <fd:field id="part1">
+          <fd:datatype base="string"/>
+        </fd:field>
+        <fd:field id="part2">
+          <fd:datatype base="string"/>
+        </fd:field>
+        <fd:field id="part3">
+          <fd:datatype base="string"/>
+        </fd:field>
+        <fd:field id="part4">
+          <fd:datatype base="string"/>
+        </fd:field>
+      </fd:widgets>
+      <fd:validation>
+        <fd:mod10>
+          <fd:failmessage>Invalid credit card number.</fd:failmessage>
+        </fd:mod10>
+      </fd:validation>
+    </fd:aggregatefield>
+  
+    <fd:field id="ipaddress" required="true">
+      <fd:label>Please enter your IP address</fd:label>
+      <fd:help>Something like : 10.10.10.10</fd:help>
+      <fd:datatype base="string"/>
+      <fd:validation>
+        <fd:regexp pattern="^([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])$">
+          <fd:failmessage>Invalid IP address.</fd:failmessage>
+        </fd:regexp>
+      </fd:validation>
+    </fd:field>
+  
+    <fd:field id="birthdate" required="true">
+      <fd:label>Your birthdate (dd/MM/yyyy)</fd:label>
+      <fd:datatype base="date">
+        <fd:convertor>
+          <fd:patterns>
+            <fd:pattern>dd/MM/yyyy</fd:pattern>
+            <!-- The above pattern is a non-locale-specific pattern. You can
+            also add locale-specific patterns by adding more fd:pattern elements
+            here, with a locale attribute on them. -->
+          </fd:patterns>
+        </fd:convertor>
+      </fd:datatype>
+      <fd:validation>
+        <fd:range min="Date(1850, 1, 1)" max="Date(2150, 1, 1)">
+          <fd:failmessage>Those either dead or not born yet should not bother filling this form</fd:failmessage>
+        </fd:range>
+      </fd:validation>
+    </fd:field>
+  
+    <fd:field id="timestamp">
+      <fd:label>A timestamp</fd:label>
+      <fd:datatype base="date">
+        <fd:convertor type="formatting" variant="datetime" style="short" timeStyle="medium" lenient="false"/>
+      </fd:datatype>
+    </fd:field>
+
+    <fd:field id="altbirthdate" required="true">
+      <fd:label>Select a date on which you'd rather had been born</fd:label>
+      <fd:datatype base="date">
+        <fd:convertor variant="date" style="full"/>
+      </fd:datatype>
+      <fd:selection-list>
+        <!-- The convertor element here is used to specify how the values
+             in the value attributes of the fd:item elements should be
+             interpreted. -->
+        <fd:convertor type="formatting">
+          <fd:patterns>
+            <fd:pattern>yyyyMMdd</fd:pattern>
+          </fd:patterns>
+        </fd:convertor>
+        <fd:item value="13020711"/>
+        <fd:item value="19120623"/>
+        <fd:item value="19690721"/>
+        <fd:item value="19700506"/>
+        <fd:item value="19781014"/>
+        <fd:item value="20010911"/>
+      </fd:selection-list>
+    </fd:field>
+  
+    <fd:field id="altbirthdate2" required="true">
+      <fd:label>Select another date on which you'd rather had been born</fd:label>
+      <fd:datatype base="date">
+        <fd:convertor variant="date" style="full"/>
+      </fd:datatype>
+      <fd:selection-list type="java" class="org.apache.cocoon.forms.samples.DateTestJavaSelectionList" nullable="false"/>
+    </fd:field>
+
+    <fd:field id="dieselprice" required="true">
+      <fd:label>Price for a liter of diesel</fd:label>
+      <fd:datatype base="decimal">
+        <fd:convertor variant="currency" currency="GBP"/>
+      </fd:datatype>
+    </fd:field>
+
+    <fd:submit id="ok">
+      <fd:label>Submit</fd:label>
+    </fd:submit>
+
+  </fd:widgets>
+
+</fd:form>

Propchange: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/group_styles.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/group_styles_template.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/group_styles_template.xml?rev=694391&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/group_styles_template.xml (added)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/group_styles_template.xml Thu Sep 11 11:14:22 2008
@@ -0,0 +1,248 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<!-- The only difference between this file and the form1_template_flow.xml
+     is the value of the action attribute on the ft:form-template element -->
+<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"/>
+  <jx:import uri="resources/samples-jx-macros.xml"/><!-- common macros for samples -->
+
+  <!--+
+      | A Handler to dim left or right buttons if you are at the end of the list
+      | Used by the custom buttons for the 'myNavGroup' sample below
+      |
+      +-->
+<script type="text/javascript">dojo.require("dijit.form.Button");</script><!-- NB. By putting each require statement in a separate script tag, we can filter out duplicates -->
+<script type="text/javascript">
+function selected(page){
+  var widget = dijit.byId("myNavGroup");
+  dijit.byId("previous").setAttribute("disabled", page.isFirstChild);
+  dijit.byId("next").setAttribute("disabled", page.isLastChild);
+}
+dojo.subscribe("myNavGroup-selectChild", selected); // connect my handler to the 'myNavGroup-selectChild' event, published by the NavGroup 
+</script>
+  	
+  <h4 class="samplesGroup">Styled Groups</h4>
+  <title>Styled Groups</title>
+	<style type="text/css">
+
+		body {
+			margin:20px;
+		}
+
+		/* add padding to each contentpane inside the tab container, and scrollbar if necessary */
+		.dijitTabPane {
+			padding : 10px 10px 10px 10px;
+			overflow: auto;
+		}
+		
+		#myNavGroupButtons {
+		  margin-top: 2em;
+		  margin-bottom: .5em;
+		  text-align: center;
+		}
+		#myNavGroupButtons .dijitToggleButton {
+		  margin: 0 .2em;
+		}
+
+	</style>
+  <content>
+    <ft:form-template class="fadeIn" action="#{$cocoon/continuation/id}.continue" method="POST" ajax="true" accept-charset="UTF-8" >
+      <div style="width: 90%; margin: 10px 50px 50px 50px;">
+        <p>
+          <sample-locale-display/><!-- a macro from samples-jx-macros.xml -->
+        </p>
+
+        <div><!-- not sure this works with Ajax turned on (?) -->
+          <fi:validation-errors>
+            <header><p>Correct these errors please:</p></header>
+            <footer><p>And then resubmit the form.</p></footer>
+          </fi:validation-errors>               
+        </div>
+
+
+        <!-- group with tabs. Each of the children of <items> will constitute a tab -->
+        <fi:group>
+          <fi:styling type="tabs"/>
+          <fi:state>
+            <ft:widget id="tab-state"/>
+          </fi:state>
+
+          <fi:items>
+            <fi:group>
+              <fi:label>Description</fi:label>
+              <fi:items>
+                <h2>Tab Group</h2>
+                <p>Built using an outer group, with fi:styling/@type="tabs". <br/>Each inner group becomes a Tab, they must each have an fi:label.</p>
+                <p>When a tab is focussed, you can also use arrow keys to navigate.</p>
+              </fi:items>
+            </fi:group>
+            <!-- group with automatic two-column layout -->
+            <fi:group formsOnShow="console.info('Activated the Strings tab');">
+              <fi:label>String fields</fi:label>
+              <fi:styling layout="columns"/>
+              <fi:items>
+                <ft:widget id="email"/>
+                <ft:widget id="something"/>
+                <ft:widget id="fourchars">
+                  <!-- particular styling for the enumeration -->
+                  <fi:styling list-type="listbox" listbox-size="4"/>
+                </ft:widget>
+              </fi:items>
+            </fi:group>
+
+            <fi:group formsOnShow="console.info('Activated the Number Fields tab');">
+              <fi:label>Number fields</fi:label>
+              <fi:styling layout="columns"/>
+              <fi:items>
+                <ft:widget id="number1"/>
+                <ft:widget id="number2"/>
+                <ft:widget id="account"/>
+                <ft:widget id="cowheight">
+                  <fi:styling list-type="radio"/>
+                </ft:widget>
+              </fi:items>
+            </fi:group>
+
+            <fi:group>
+              <fi:styling layout="columns"/>
+              <fi:label>Boolean fields</fi:label>
+              <fi:items>
+                <ft:widget id="somebool"/>
+              </fi:items>
+            </fi:group>
+          </fi:items>
+        </fi:group>
+
+        <fi:group>
+          <fi:styling type="choice"/>
+          <fi:state>
+            <ft:widget id="choice-state"/>
+          </fi:state>
+          <fi:items>
+            <fi:group>
+              <fi:label>Description</fi:label>
+              <fi:items>
+                <h2>Choice Group</h2>
+                <p>Built using an outer group, with fi:styling/@type="choice". <br/>Each inner group becomes an item in a menu, they must each have an fi:label.</p>
+                <p>When the menu is focussed, you can also use arrow keys to navigate and return to choose.</p>
+              </fi:items>
+            </fi:group>
+            <fi:group>
+              <fi:styling layout="columns"/>
+              <fi:label>Boolean fields</fi:label>
+              <fi:items>
+                <ft:widget id="someotherbool"/>
+              </fi:items>
+            </fi:group>
+            <fi:group>
+              <fi:label>Other Stuff</fi:label>
+              <fi:styling layout="columns"/>
+              <fi:items>
+                <ft:widget id="altbirthdate"/>
+                <ft:widget id="altbirthdate2"/>
+              </fi:items>
+            </fi:group>
+          </fi:items>
+        </fi:group> 
+
+        <!-- buttons to control paging on myNavGroup -->
+        <div id="myNavGroupButtons">
+          <button dojoType="dijit.form.Button" id="previous" onClick="dijit.byId('myNavGroup').back()">&#9664;</button>
+          <span dojoType="cocoon.forms.NavController" id="myNavGroupController" containerId="myNavGroup"></span>
+          <button dojoType="dijit.form.Button" id="next" onClick="dijit.byId('myNavGroup').forward()">&#9654;</button>
+        </div>
+
+        <!-- Group of type 'nav' gives you responsibility for providing a controller -->
+        <fi:group id="myNavGroup">
+          <fi:styling type="nav"/>
+          <fi:state>
+            <ft:widget id="nav-state"/>
+          </fi:state>
+          <fi:label>Misc controls</fi:label>
+          <fi:items>
+            <fi:group>
+              <fi:label>Description</fi:label>
+              <fi:items>
+                <h2>Navigation Group</h2>
+                <p>Built using an outer group, with fi:styling/@type="nav". <br/>Each inner group becomes a pane you can navigate to, they must each have an fi:label.</p>
+                <p>Use this kind of group when you want to make your own custom controller, which may be placed anywhere in the template. See the template for a sample of how to do this.</p>
+                <p>When a button is focussed, you can also use arrow keys to navigate.</p>
+              </fi:items>
+            </fi:group>
+            <fi:group formsOnShow="console.info('Activated Stuff');">
+              <fi:label>Stuff</fi:label>
+              <fi:styling layout="columns"/>
+              <fi:items>
+                <ft:widget id="visa"/>
+                <ft:widget id="ipaddress"/>            
+                <ft:widget id="birthdate"/><!---->
+                <!--<ft:widget id="timestamp"/>-->
+              </fi:items>
+            </fi:group>
+            <fi:group>
+              <fi:label>More Stuff</fi:label>
+              <fi:styling layout="columns"/>
+              <fi:items>
+                <ft:widget id="dieselprice"/>
+              </fi:items>
+            </fi:group>
+          </fi:items>
+        </fi:group>
+
+        <fi:group>
+          <fi:label>Labelled Group Sample</fi:label>
+          <fi:items>
+            this is a sample of a group with an fi:label, but no fi:styling/@type
+          </fi:items>
+        </fi:group>
+
+        <fi:group>
+          <fi:styling collapsable="true"/>
+          <fi:label>Collapsable Group Sample</fi:label>
+          <fi:items>
+            this is a sample of a group with an fi:label, fi:styling/@collapsable, but no fi:styling/@type
+          </fi:items>
+        </fi:group>
+
+        <fi:group>
+          <fi:styling type="fieldset"/>
+          <fi:label>FieldSet Group Sample</fi:label>
+          <fi:items>
+            this is a sample of a group with fi:styling/@type="fieldset"
+          </fi:items>
+        </fi:group>
+        
+        <p><ft:widget id="ok"/></p>
+      </div>
+      <p>Supported Locales: 
+          <sample-locale-chooser/><!-- a macro from samples-jx-macros.xml -->
+      </p>
+      <p>
+        <a href="./do-groupStyles.flow">Restart this sample</a> - <a href="./">Back to samples</a>
+      </p>
+      <p align="center">
+         <sample-theme-chooser/><!-- a macro from samples-jx-macros.xml -->
+      </p>
+    </ft:form-template>
+  </content>
+</page>
+

Propchange: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/group_styles_template.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/htmlarea_template.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/htmlarea_template.xml?rev=694391&r1=694390&r2=694391&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/htmlarea_template.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/htmlarea_template.xml Thu Sep 11 11:14:22 2008
@@ -24,25 +24,7 @@
       <div style="width:500px">
         <ft:widget-label id="data1"/><br/>
         <ft:widget id="data1">
-          <fi:styling type="htmlarea" rows="8" style="width:100%">
-            <!-- at this place, the configuration property of the HTMLArea is under 'conf'
-                 available. Find more info about the available properties at
-                 http://www.htmlarea.com/htmlarea_2/documentation.html -->
-            <conf>
-              conf.statusBar = false;
-              conf.sizeIncludesToolbar = false;
-              conf.fullPage = false;
-              conf.toolbar = [
-                [ "bold", "italic", "separator",
-                  "subscript", "superscript", "separator",
-                  "insertorderedlist", "insertunorderedlist",
-                  "outdent", "indent", "separator",
-                  "inserthorizontalrule", "separator",
-                  "copy", "cut", "paste", "space", "undo", "redo",
-                  "separator", "showhelp"]
-                ];               
-            </conf>
-          </fi:styling>
+          <fi:styling type="htmlarea" rows="8" style="width:100%"/><!-- TODO: Add sample of dijit.Editor toolbar configuration -->
         </ft:widget>
       </div>
       <p/>
@@ -53,10 +35,7 @@
         <tr>
           <td>
             <ft:widget id="data2">
-              <fi:styling type="htmlarea" rows="8" cols="70">
-                <!-- if you add initFunction, make sure that it is available at the browser -->
-                <!--initFunction>myInit</initFunction-->
-              </fi:styling>
+              <fi:styling type="htmlarea" rows="8" cols="70"/>
             </ft:widget>
           </td>
         </tr>

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/inplace_edit_template.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/inplace_edit_template.xml?rev=694391&r1=694390&r2=694391&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/inplace_edit_template.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/forms/inplace_edit_template.xml Thu Sep 11 11:14:22 2008
@@ -23,6 +23,8 @@
   <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
   <h4 class="samplesGroup">Inline editing</h4>
   <title>Inline editing</title>
+  
+  <!-- TODO: Highlighting has been broken for a while .... -->
   <script type="text/javascript">
       dojo.addOnLoad(function(){cocoon.ajax.BUHandler.highlight = cocoon.ajax.effects.highlight.red});
   </script>



Mime
View raw message