cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject svn commit: r289538 [7/8] - in /cocoon: blocks/forms/trunk/WEB-INF/xconf/ blocks/forms/trunk/conf/ blocks/forms/trunk/java/org/apache/cocoon/forms/ blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ blocks/forms/trunk/java/org/apache/cocoon/forms...
Date Fri, 16 Sep 2005 13:48:35 GMT
Modified: cocoon/blocks/forms/trunk/samples/dreamteam/content/teamTemplate.jx
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/dreamteam/content/teamTemplate.jx?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/samples/dreamteam/content/teamTemplate.jx (original)
+++ cocoon/blocks/forms/trunk/samples/dreamteam/content/teamTemplate.jx Fri Sep 16 06:46:22 2005
@@ -13,237 +13,237 @@
   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.
--->
-<jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" xmlns:cinclude="http://apache.org/cocoon/include/1.0"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1" xmlns:ft="http://apache.org/cocoon/forms/1.0#template" xmlns:fi="http://apache.org/cocoon/forms/1.0#instance">
-  <!-- Import the macros that define CForms template elements -->
-  <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
-  <html>
-    <head>
-      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-      <link href="local-resources/dreamteam.css" type="text/css" rel="stylesheet"/>
-      <title>The Dream Team</title>
-    </head>
-    <body>
-      <h1>The Dream Team</h1>
-      <p>Now is the time to choose your dream team.</p>
-      <div class="legend">
-        <table>
+-->
+<jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" xmlns:cinclude="http://apache.org/cocoon/include/1.0"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1" xmlns:ft="http://apache.org/cocoon/forms/1.0#template" xmlns:fi="http://apache.org/cocoon/forms/1.0#instance">
+  <!-- Import the macros that define CForms template elements -->
+  <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
+  <html>
+    <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+      <link href="local-resources/dreamteam.css" type="text/css" rel="stylesheet"/>
+      <title>The Dream Team</title>
+    </head>
+    <body>
+      <h1>The Dream Team</h1>
+      <p>Now is the time to choose your dream team.</p>
+      <div class="legend">
+        <table>
           <tr>
             <td><i>Legend</i></td>
           </tr>
-          <tr>
-            <td>
-              <img src="resources/move_up.gif"/>
-            </td>
-            <td>Move this row 1 up</td>
-          </tr>
-          <tr>
-            <td>
-              <img src="resources/move_down.gif"/>
-            </td>
-            <td>Move this row 1 down</td>
-          </tr>
-          <tr>
-            <td>
-              <img src="resources/delete.gif"/>
-            </td>
-            <td>Delete this row</td>
-          </tr>
-          <tr>
-            <td>
-              <img src="resources/new.gif"/>
-            </td>
-            <td>Add a new row below this row</td>
-          </tr>
-        </table>
-      </div>
-      <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST">
-        <jx:choose>
-          <jx:when test="${form.getChild('teammembers').getSize() == 0}">
-            <p>
-              <strong> There is no team yet. </strong>
-            </p>
-          </jx:when>
-          <jx:otherwise>
-            <table>
-              <thead>
-                <tr>
-                  <td class="tableheader">
-                    <ft:repeater-widget-label id="teammembers" widget-id="position"/>
-                  </td>
-                  <td class="tableheader">
-                    <ft:repeater-widget-label id="teammembers" widget-id="memberId"/>
-                  </td>
-                  <td class="tableheader">
-                    <ft:repeater-widget-label id="teammembers" widget-id="country"/>
-                  </td>
-                  <td class="tableheader">
-                    <ft:repeater-widget-label id="teammembers" widget-id="select"/>
-                  </td>
-                </tr>
-              </thead>
-              <tbody>
+          <tr>
+            <td>
+              <img src="resources/move_up.gif"/>
+            </td>
+            <td>Move this row 1 up</td>
+          </tr>
+          <tr>
+            <td>
+              <img src="resources/move_down.gif"/>
+            </td>
+            <td>Move this row 1 down</td>
+          </tr>
+          <tr>
+            <td>
+              <img src="resources/delete.gif"/>
+            </td>
+            <td>Delete this row</td>
+          </tr>
+          <tr>
+            <td>
+              <img src="resources/new.gif"/>
+            </td>
+            <td>Add a new row below this row</td>
+          </tr>
+        </table>
+      </div>
+      <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST">
+        <jx:choose>
+          <jx:when test="${form.getChild('teammembers').getSize() == 0}">
+            <p>
+              <strong> There is no team yet. </strong>
+            </p>
+          </jx:when>
+          <jx:otherwise>
+            <table>
+              <thead>
+                <tr>
+                  <td class="tableheader">
+                    <ft:repeater-widget-label id="teammembers" widget-id="position"/>
+                  </td>
+                  <td class="tableheader">
+                    <ft:repeater-widget-label id="teammembers" widget-id="memberId"/>
+                  </td>
+                  <td class="tableheader">
+                    <ft:repeater-widget-label id="teammembers" widget-id="country"/>
+                  </td>
+                  <td class="tableheader">
+                    <ft:repeater-widget-label id="teammembers" widget-id="select"/>
+                  </td>
+                </tr>
+              </thead>
+              <tbody>
                 <!-- The contents of the repeater-widget element 
                      is a template that will be applied to each 
                      row in the repeater. 
-                -->
-                <ft:repeater-widget id="teammembers">
-                  <tr>
-                    <td>
-                      <ft:widget id="position">
-                        <fi:styling submit-on-change="true"/>
-                      </ft:widget>
-                    </td>
-                    <td>
-                      <ft:widget id="memberId">
-                        <fi:styling submit-on-change="true"/>
-                      </ft:widget>
-                    </td>
-                    <td>
-                      <i18n:text>
-                        <ft:widget id="country"/>
-                      </i18n:text>
-                    </td>
-                    <td>
+                -->
+                <ft:repeater-widget id="teammembers">
+                  <tr>
+                    <td>
+                      <ft:widget id="position">
+                        <fi:styling submit-on-change="true"/>
+                      </ft:widget>
+                    </td>
+                    <td>
+                      <ft:widget id="memberId">
+                        <fi:styling submit-on-change="true"/>
+                      </ft:widget>
+                    </td>
+                    <td>
+                      <i18n:text>
+                        <ft:widget id="country"/>
+                      </i18n:text>
+                    </td>
+                    <td>
                       <!-- Don't display the "move up" button 
                            on the first row 
-                      -->
-                      <jx:choose>
-                        <jx:when test="${repeaterLoop.first}">
-                          <img src="resources/blank_btn.gif"/>
-                        </jx:when>
-                        <jx:otherwise>
-                          <ft:widget id="up">
-                            <fi:styling type="image" src="resources/move_up.gif"/>
-                          </ft:widget>
-                        </jx:otherwise>
-                      </jx:choose>
+                      -->
+                      <jx:choose>
+                        <jx:when test="${repeaterLoop.first}">
+                          <img src="resources/blank_btn.gif"/>
+                        </jx:when>
+                        <jx:otherwise>
+                          <ft:widget id="up">
+                            <fi:styling type="image" src="resources/move_up.gif"/>
+                          </ft:widget>
+                        </jx:otherwise>
+                      </jx:choose>
                       <!-- Don't display the "move down" button 
                            on the last row 
-                      -->
-                      <jx:choose>
-                        <jx:when test="${repeaterLoop.last}">
-                          <img src="resources/blank_btn.gif"/>
-                        </jx:when>
-                        <jx:otherwise>
-                          <ft:widget id="down">
-                            <fi:styling type="image" src="resources/move_down.gif"/>
-                          </ft:widget>
-                        </jx:otherwise>
-                      </jx:choose>
-                      <ft:widget id="delete">
-                        <fi:styling type="image" src="resources/delete.gif"/>
-                      </ft:widget>
-                      <ft:widget id="add">
-                        <fi:styling type="image" src="resources/new.gif"/>
-                      </ft:widget>
-                      <ft:widget id="select"/>
-                    </td>
-                  </tr>
-                </ft:repeater-widget>
-              </tbody>
-            </table>
-          </jx:otherwise>
-        </jx:choose>
-        <table>
-          <tr>
-            <td style="border: 0px solid;">
-              <ft:widget id="addmember"/>
-            </td>
-            <td style="border: 0px solid;">
-              <jx:if test="${widget.getChild('teammembers').getSize() &gt; 0}">
-                <ft:widget id="removemember"/>
-              </jx:if>
-            </td>
-          </tr>
-          <tr>
-            <td style="border: 0px solid;">
-              <input type="submit" value="Submit"/>
-            </td>
-            <td style="border: 0px solid;"/>
-          </tr>
-        </table>
-      </ft:form-template>
-      <p class="developer-header"> Developer Notes </p>
-      <h2>Page definition</h2>
-      <p class="developer-note"> This page is defined in <ul class="developer-note">
-          <li>
-            <b>teamTemplate.jx</b>, the form template, </li>
-          <li>
-            <b>teamDef.xml</b>, the widget definitions and</li>
-          <li>
-            <b>teamBind.xml</b>, the widget binding to Java Beans.</li>
-        </ul>
-        <p class="developer-note"> The pipeline calls the function <i>prot_buildTeam</i> in <b>team.js</b>. There is no
-          naming rule for flow functions, but adding a prefix ('prot_') as a simple kind of security measure to prevent
-          outsiders from directly calling the function. Security by obscurity you might call it. </p>
-        <h2>What happens?</h2>
-        <p class="developer-note"> In <i>prot_buildTeam</i> a list of 'positions' is generated from the information in
-          the Manager class and passed onto the form. </p>
-        <p class="developer-note"> Below is the definition of the <i>position</i> widget. </p>
-        <div class="code">
-          <div class="codeIndent"> &lt;fd:field id="position"&gt; <div class="codeIndent">
-              &lt;fd:label&gt;Position&lt;/fd:label&gt; </div>
-            <div class="codeIndent"> &lt;fd:datatype base="string"/&gt; </div>
-            <div class="codeIndent"> &lt;fd:selection-list dynamic="true" type="flow-jxpath"
-              list-path="positionList" value-path="value" label-path="label"/&gt; </div>
-            <div class="codeIndent"> &lt;fd:on-value-changed&gt; <div class="codeIndent">
-                &lt;fd:javascript&gt; <div class="codeIndent"> // this script can be found in team.js<br/>
-                  updateNameWidget(event); </div> &lt;/fd:javascript&gt; </div>
-              &lt;/fd:on-value-changed&gt; </div> &lt;/fd:field&gt; </div>
-        </div>
-        <p class="developer-note"> The widget <i>position</i> has a selection-list of type <i>flow-jxpath</i>. The other
-          attributes define the list to use: </p>
-        <ul class="developer-note">
-          <li>
-            <i>list-path</i> holds the name of the list that is passed in the "viewData" attribute </li>
-          <li>
-            <i>value-path</i> holds the name of the variable or method that returns the value to use </li>
-          <li>
-            <i>label-path</i> holds the name of the variable or method that returns the label for the value </li>
-        </ul>
-      </p>
-      <h2>Internationalization</h2>
-      <p class="developer-note"> The function also shows how to build this list with localized (i.e. i18n) labels. </p>
-      <div class="code">
-        <div class="codeIndent"> ...<br/> // key = key code for position<br/> // set the label to the localized message
-          using i18n<br/> positionList[i + 1] = {value: key, label: new I18nMessage(key)};<br/> ... </div>
-      </div>
-      <p class="developer-note"> Adding the appropriate code to switch locale is left as an exercise. :-) </p>
-      <h2>Dependency between widgets</h2>
-      <p class="developer-note"> The section <i>on-value-changed</i> holds the javascript that handles the dependency.
-        When the value of the <i>positionlist</i> changes, the <i>memberId</i> widget should get a new list of
-        names.<br/> The script that handles this update can be entered directly between the <i>javascript</i> tags, but
-        adding a descriptive function name there and moving the function to a separate javascript file keeps the widget
-        definition file clearer. Note the <i>event</i> parameter.<br/> Remember to add the
-        <i>submit-on-change="true"</i> attribute to the styling tag! </p>
-      <h2>Repeater validation</h2>
-      <p class="developer-note"> This repeater also has a repeater validation section, which prevents using duplicate
-        names. Again, the script can be entered directly in the widget definition file, but it can also be added to a
-        function that is placed in a separate javascript file. <b>Note:</b> this function takes <i>widget</i> (the
-        current repeater) as parameter and <b>MUST</b> return a boolean value (true = success).<br/> The repeater
-        validation function is called when the <i>Submit</i> button is pressed. If a validation error occurs, the first
-        invalid row will be marked with a blue <font style="color: blue">!</font>. </p>
-      <h2>Some observations</h2>
-      <p class="developer-note"> The samples provide a great set of XSL files to convert the template and styling tags
-        of the widgets into HTML. They start with <b>forms-samples-styling.xsl</b> and can be found in the
-        <i>samples/blocks/forms/resources</i> folders. </p>
-      <p class="developer-note">
-        <b>Note:</b> when you use these XSL files, remember to use them as the last transformation in your pipeline, or
-        make sure they find the appropriate tags to add some scripts to the html <i>&lt;head&gt;</i> and
-        <i>&lt;body&gt;</i> tags. Especially without a reference to the <b>forms-lib.js</b> file, the
-        on-value-changed event will not be sent to the server and therefore no script is executed. </p>
-      <p class="developer-note">
-        <b>Note:</b> At this moment (2004/10/20) a bug exists that throws a NullPointerException when the javascript in
-        the validation section is executed with the Rhino debugger enabled! </p>
-      <h2>When everything is valid</h2>
-      <p class="developer-note"> When <i>Submit</i> is pressed, and all rows validate, the <i>prot_buildTeam</i>
-        function takes over and hands the selected team to the Manager class for further processing. Finally the
-        function passes flow onto the <i>showteam</i> pipeline. </p>
-    <p>
-      <a href="../">Back to Forms samples</a>
-    </p>            
-    </body>
-  </html>
-</jx:template>
+                      -->
+                      <jx:choose>
+                        <jx:when test="${repeaterLoop.last}">
+                          <img src="resources/blank_btn.gif"/>
+                        </jx:when>
+                        <jx:otherwise>
+                          <ft:widget id="down">
+                            <fi:styling type="image" src="resources/move_down.gif"/>
+                          </ft:widget>
+                        </jx:otherwise>
+                      </jx:choose>
+                      <ft:widget id="delete">
+                        <fi:styling type="image" src="resources/delete.gif"/>
+                      </ft:widget>
+                      <ft:widget id="add">
+                        <fi:styling type="image" src="resources/new.gif"/>
+                      </ft:widget>
+                      <ft:widget id="select"/>
+                    </td>
+                  </tr>
+                </ft:repeater-widget>
+              </tbody>
+            </table>
+          </jx:otherwise>
+        </jx:choose>
+        <table>
+          <tr>
+            <td style="border: 0px solid;">
+              <ft:widget id="addmember"/>
+            </td>
+            <td style="border: 0px solid;">
+              <jx:if test="${widget.getChild('teammembers').getSize() &gt; 0}">
+                <ft:widget id="removemember"/>
+              </jx:if>
+            </td>
+          </tr>
+          <tr>
+            <td style="border: 0px solid;">
+              <input type="submit" value="Submit"/>
+            </td>
+            <td style="border: 0px solid;"/>
+          </tr>
+        </table>
+      </ft:form-template>
+      <p class="developer-header"> Developer Notes </p>
+      <h2>Page definition</h2>
+      <p class="developer-note"> This page is defined in <ul class="developer-note">
+          <li>
+            <b>teamTemplate.jx</b>, the form template, </li>
+          <li>
+            <b>teamDef.xml</b>, the widget definitions and</li>
+          <li>
+            <b>teamBind.xml</b>, the widget binding to Java Beans.</li>
+        </ul>
+        <p class="developer-note"> The pipeline calls the function <i>prot_buildTeam</i> in <b>team.js</b>. There is no
+          naming rule for flow functions, but adding a prefix ('prot_') as a simple kind of security measure to prevent
+          outsiders from directly calling the function. Security by obscurity you might call it. </p>
+        <h2>What happens?</h2>
+        <p class="developer-note"> In <i>prot_buildTeam</i> a list of 'positions' is generated from the information in
+          the Manager class and passed onto the form. </p>
+        <p class="developer-note"> Below is the definition of the <i>position</i> widget. </p>
+        <div class="code">
+          <div class="codeIndent"> &lt;fd:field id="position"&gt; <div class="codeIndent">
+              &lt;fd:label&gt;Position&lt;/fd:label&gt; </div>
+            <div class="codeIndent"> &lt;fd:datatype base="string"/&gt; </div>
+            <div class="codeIndent"> &lt;fd:selection-list dynamic="true" type="flow-jxpath"
+              list-path="positionList" value-path="value" label-path="label"/&gt; </div>
+            <div class="codeIndent"> &lt;fd:on-value-changed&gt; <div class="codeIndent">
+                &lt;fd:javascript&gt; <div class="codeIndent"> // this script can be found in team.js<br/>
+                  updateNameWidget(event); </div> &lt;/fd:javascript&gt; </div>
+              &lt;/fd:on-value-changed&gt; </div> &lt;/fd:field&gt; </div>
+        </div>
+        <p class="developer-note"> The widget <i>position</i> has a selection-list of type <i>flow-jxpath</i>. The other
+          attributes define the list to use: </p>
+        <ul class="developer-note">
+          <li>
+            <i>list-path</i> holds the name of the list that is passed in the "viewData" attribute </li>
+          <li>
+            <i>value-path</i> holds the name of the variable or method that returns the value to use </li>
+          <li>
+            <i>label-path</i> holds the name of the variable or method that returns the label for the value </li>
+        </ul>
+      </p>
+      <h2>Internationalization</h2>
+      <p class="developer-note"> The function also shows how to build this list with localized (i.e. i18n) labels. </p>
+      <div class="code">
+        <div class="codeIndent"> ...<br/> // key = key code for position<br/> // set the label to the localized message
+          using i18n<br/> positionList[i + 1] = {value: key, label: new I18nMessage(key)};<br/> ... </div>
+      </div>
+      <p class="developer-note"> Adding the appropriate code to switch locale is left as an exercise. :-) </p>
+      <h2>Dependency between widgets</h2>
+      <p class="developer-note"> The section <i>on-value-changed</i> holds the javascript that handles the dependency.
+        When the value of the <i>positionlist</i> changes, the <i>memberId</i> widget should get a new list of
+        names.<br/> The script that handles this update can be entered directly between the <i>javascript</i> tags, but
+        adding a descriptive function name there and moving the function to a separate javascript file keeps the widget
+        definition file clearer. Note the <i>event</i> parameter.<br/> Remember to add the
+        <i>submit-on-change="true"</i> attribute to the styling tag! </p>
+      <h2>Repeater validation</h2>
+      <p class="developer-note"> This repeater also has a repeater validation section, which prevents using duplicate
+        names. Again, the script can be entered directly in the widget definition file, but it can also be added to a
+        function that is placed in a separate javascript file. <b>Note:</b> this function takes <i>widget</i> (the
+        current repeater) as parameter and <b>MUST</b> return a boolean value (true = success).<br/> The repeater
+        validation function is called when the <i>Submit</i> button is pressed. If a validation error occurs, the first
+        invalid row will be marked with a blue <font style="color: blue">!</font>. </p>
+      <h2>Some observations</h2>
+      <p class="developer-note"> The samples provide a great set of XSL files to convert the template and styling tags
+        of the widgets into HTML. They start with <b>forms-samples-styling.xsl</b> and can be found in the
+        <i>samples/blocks/forms/resources</i> folders. </p>
+      <p class="developer-note">
+        <b>Note:</b> when you use these XSL files, remember to use them as the last transformation in your pipeline, or
+        make sure they find the appropriate tags to add some scripts to the html <i>&lt;head&gt;</i> and
+        <i>&lt;body&gt;</i> tags. Especially without a reference to the <b>forms-lib.js</b> file, the
+        on-value-changed event will not be sent to the server and therefore no script is executed. </p>
+      <p class="developer-note">
+        <b>Note:</b> At this moment (2004/10/20) a bug exists that throws a NullPointerException when the javascript in
+        the validation section is executed with the Rhino debugger enabled! </p>
+      <h2>When everything is valid</h2>
+      <p class="developer-note"> When <i>Submit</i> is pressed, and all rows validate, the <i>prot_buildTeam</i>
+        function takes over and hands the selected team to the Manager class for further processing. Finally the
+        function passes flow onto the <i>showteam</i> pipeline. </p>
+    <p>
+      <a href="../">Back to Forms samples</a>
+    </p>            
+    </body>
+  </html>
+</jx:template>

Modified: cocoon/blocks/forms/trunk/samples/dreamteam/flow/team.js
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/dreamteam/flow/team.js?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/samples/dreamteam/flow/team.js (original)
+++ cocoon/blocks/forms/trunk/samples/dreamteam/flow/team.js Fri Sep 16 06:46:22 2005
@@ -1,34 +1,34 @@
-/*
- * Copyright 1999-2004 The Apache Software Foundation.
- *
- * Licensed 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.
- */
-
-cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/v3/Form.js");
-importClass (Packages.org.apache.cocoon.forms.util.I18nMessage);
-
-var manager = Packages.org.apache.cocoon.forms.samples.dreamteam.Manager.getManager();
-
-function initDreamTeamChooser() {
-  var documentURI = cocoon.parameters["documentURI"];
-  // parse the document to a DOM-tree
-  var document = loadDocument(documentURI);
-  // initialise the Manager
-  manager.readPlayers(document);
-  cocoon.sendPage("home.form");
-}
-
-function prot_showTeam() {
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/v3/Form.js");
+importClass (Packages.org.apache.cocoon.forms.util.I18nMessage);
+
+var manager = Packages.org.apache.cocoon.forms.samples.dreamteam.Manager.getManager();
+
+function initDreamTeamChooser() {
+  var documentURI = cocoon.parameters["documentURI"];
+  // parse the document to a DOM-tree
+  var document = loadDocument(documentURI);
+  // initialise the Manager
+  manager.readPlayers(document);
+  cocoon.sendPage("home.form");
+}
+
+function prot_showTeam() {
   var persons = manager.getDreamTeam();
   if(persons == null || persons == undefined) {
      var size = 0;
@@ -41,60 +41,60 @@
      list : persons,
      size : size
   };
-  cocoon.sendPage("showTeam.form", viewData);
-} // showTeam
-
-function prot_buildTeam() {
-  var formDisplay = "team.form";
-  var formDef = "content/teamDef.xml";
-  var formBind = "content/teamBind.xml"
-
-  var allPersons = manager.getAllPersonsByPosition();
-  var list = new Packages.org.apache.cocoon.forms.samples.dreamteam.Team();
-
-  var keys = allPersons.keySet().toArray();
-  var key;
-  var positionList = new Array();
-  positionList[0] = {value:"", label: " "};
-  for (var i = 0; i < keys.length; i++) {
-    key = keys[i];
-    // set the label to the localized message using i18n
-    positionList[i + 1] = {value: key, label: new I18nMessage(key)};
-  }
-  /* 
-  // add the first player to the team
-  var firstPlayer = allPersons.get(keys[0]).getTeam().get(0);
-  var member = new Packages.org.apache.cocoon.samples.dreamteam.TeamMember();
-  member.position = firstPlayer.position;
-  member.memberId = firstPlayer.memberId;
-  member.name = firstPlayer.name;
-  member.country = firstPlayer.country;
-  list.addMember(member);	
-  */  
-
+  cocoon.sendPage("showTeam.form", viewData);
+} // showTeam
+
+function prot_buildTeam() {
+  var formDisplay = "team.form";
+  var formDef = "content/teamDef.xml";
+  var formBind = "content/teamBind.xml"
+
+  var allPersons = manager.getAllPersonsByPosition();
+  var list = new Packages.org.apache.cocoon.forms.samples.dreamteam.Team();
+
+  var keys = allPersons.keySet().toArray();
+  var key;
+  var positionList = new Array();
+  positionList[0] = {value:"", label: " "};
+  for (var i = 0; i < keys.length; i++) {
+    key = keys[i];
+    // set the label to the localized message using i18n
+    positionList[i + 1] = {value: key, label: new I18nMessage(key)};
+  }
+  /* 
+  // add the first player to the team
+  var firstPlayer = allPersons.get(keys[0]).getTeam().get(0);
+  var member = new Packages.org.apache.cocoon.samples.dreamteam.TeamMember();
+  member.position = firstPlayer.position;
+  member.memberId = firstPlayer.memberId;
+  member.name = firstPlayer.name;
+  member.country = firstPlayer.country;
+  list.addMember(member);	
+  */  
+
   var form = new Form(formDef);
   form.setAttribute("counter", new java.lang.Long(0));
-  form.setAttribute("everyone", allPersons);
-
-  form.createBinding(formBind);
-  form.load(list);
-
+  form.setAttribute("everyone", allPersons);
+
+  form.createBinding(formBind);
+  form.load(list);
+
   var viewData = {
          list : list,
          positionList: positionList
-   };
-  form.showForm(formDisplay, viewData);
-  form.save(list);
-  manager.buildDreamTeam(list);
-  // next page presenting the team
-  cocoon.sendPage("showteam.html");
-}
-
-
-// function used in the 'position' widget to change the selection-list of the 'memberId' widget
-// that displays the names
-
-function updateNameWidget(event) {
+   };
+  form.showForm(formDisplay, viewData);
+  form.save(list);
+  manager.buildDreamTeam(list);
+  // next page presenting the team
+  cocoon.sendPage("showteam.html");
+}
+
+
+// function used in the 'position' widget to change the selection-list of the 'memberId' widget
+// that displays the names
+
+function updateNameWidget(event) {
   var value = event.source.value;
   var memberIdwidget = event.source.lookupWidget("../memberId");
   if (value != null) {
@@ -116,10 +116,10 @@
     // Note that it will also fire an event on the
     // "name" widget if it already had a value.
     memberIdwidget.setValue(null);
-  }
-}
-
-function updateCountryWidget(event) {
+  }
+}
+
+function updateCountryWidget(event) {
   print("memberId changed from " + event.oldValue + " to " + event.newValue);
   var value = event.source.value;
   var form = event.source.form;
@@ -131,26 +131,26 @@
     var country = member.getCountry();
     var countrywidget = event.source.lookupWidget("../country");
     countrywidget.setValue(country);
-  }
-}
-
-function updateRowIDcounter(event) {
-  // 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.Long(form.getAttribute("counter").longValue() + 1);
-  form.setAttribute("counter", count);
-  var repeater = form.getChild("teammembers");
-  repeater.getRow(repeater.getSize() - 1).getChild("ID").setValue(count);
-}
-
-function validateRepeater(widget) {
-  // This demonstrates validating a repeater: we check here if all
-  // teammembers are distinct.
+  }
+}
+
+function updateRowIDcounter(event) {
+  // 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.Long(form.getAttribute("counter").longValue() + 1);
+  form.setAttribute("counter", count);
+  var repeater = form.getChild("teammembers");
+  repeater.getRow(repeater.getSize() - 1).getChild("ID").setValue(count);
+}
+
+function validateRepeater(widget) {
+  // This demonstrates validating a repeater: we check here if all
+  // teammembers are distinct.
   // A repeater cannot itself display a validation error, and therefore
   // sets a validation error on a field in the offending row.
   var list = new java.util.ArrayList();
@@ -175,14 +175,14 @@
   }
 
   // Must return true/false
-  return success;
-}
-
-
-/*
-  This function is only used to read in an XML file and pass it on as DOM Document for further processing.
-*/
-function loadDocument(uri) {
+  return success;
+}
+
+
+/*
+  This function is only used to read in an XML file and pass it on as DOM Document for further processing.
+*/
+function loadDocument(uri) {
   var parser = null;
   var source = null;
   var resolver = null;
@@ -198,5 +198,5 @@
           resolver.release(source);
       cocoon.releaseComponent(parser);
       cocoon.releaseComponent(resolver);
-  }
-}
+  }
+}

Modified: cocoon/blocks/forms/trunk/samples/dreamteam/messages/DreamTeamMessages.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/dreamteam/messages/DreamTeamMessages.xml?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/samples/dreamteam/messages/DreamTeamMessages.xml (original)
+++ cocoon/blocks/forms/trunk/samples/dreamteam/messages/DreamTeamMessages.xml Fri Sep 16 06:46:22 2005
@@ -1,38 +1,38 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<catalogue>
-    <message key="GK">Goalkeeper</message>
-    <message key="MD">Midfielder</message>
-    <message key="FW">Forward</message>
-    <message key="DF">Defense</message>
-    <message key="EN">England</message>
-    <message key="NL">Netherlands</message>
-    <message key="DK">Denmark</message>
-    <message key="DE">Germany</message>
-    <message key="SE">Sweden</message>
-    <message key="LV">Latvia</message>
-    <message key="CZ">Czech Republic</message>
-    <message key="RU">Russia</message>
-    <message key="BG">Bulgaria</message>
-    <message key="GR">Greece</message>
-    <message key="HR">Croatia</message>
-    <message key="CH">Switzerland</message>
-    <message key="IT">Italy</message>
-    <message key="ES">Spain</message>
-    <message key="FR">France</message>
-    <message key="PT">Portugal</message>
-</catalogue>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<catalogue>
+    <message key="GK">Goalkeeper</message>
+    <message key="MD">Midfielder</message>
+    <message key="FW">Forward</message>
+    <message key="DF">Defense</message>
+    <message key="EN">England</message>
+    <message key="NL">Netherlands</message>
+    <message key="DK">Denmark</message>
+    <message key="DE">Germany</message>
+    <message key="SE">Sweden</message>
+    <message key="LV">Latvia</message>
+    <message key="CZ">Czech Republic</message>
+    <message key="RU">Russia</message>
+    <message key="BG">Bulgaria</message>
+    <message key="GR">Greece</message>
+    <message key="HR">Croatia</message>
+    <message key="CH">Switzerland</message>
+    <message key="IT">Italy</message>
+    <message key="ES">Spain</message>
+    <message key="FR">France</message>
+    <message key="PT">Portugal</message>
+</catalogue>

Modified: cocoon/blocks/forms/trunk/samples/dreamteam/messages/DreamTeamMessages_de.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/dreamteam/messages/DreamTeamMessages_de.xml?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/samples/dreamteam/messages/DreamTeamMessages_de.xml (original)
+++ cocoon/blocks/forms/trunk/samples/dreamteam/messages/DreamTeamMessages_de.xml Fri Sep 16 06:46:22 2005
@@ -1,38 +1,38 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<catalogue>
-    <message key="GK">Torwart</message>
-    <message key="MD">Mittelfeld Spieler</message>
-    <message key="FW">Stürmer</message>
-    <message key="DF">Verteidiger</message>
-    <message key="EN">England</message>
-    <message key="NL">Niederlande</message>
-    <message key="DK">Dänemark</message>
-    <message key="DE">Deutschland</message>
-    <message key="SE">Schweden</message>
-    <message key="LV">Lettland</message>
-    <message key="CZ">Tschechische Republik</message>
-    <message key="RU">Russland</message>
-    <message key="BG">Bulgarien</message>
-    <message key="GR">Griechenland</message>
-    <message key="HR">Kroation</message>
-    <message key="CH">Schweiz</message>
-    <message key="IT">Italien</message>
-    <message key="ES">Spanien</message>
-    <message key="FR">Frankreich</message>
-    <message key="PT">Portugal</message>
-</catalogue>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<catalogue>
+    <message key="GK">Torwart</message>
+    <message key="MD">Mittelfeld Spieler</message>
+    <message key="FW">Stürmer</message>
+    <message key="DF">Verteidiger</message>
+    <message key="EN">England</message>
+    <message key="NL">Niederlande</message>
+    <message key="DK">Dänemark</message>
+    <message key="DE">Deutschland</message>
+    <message key="SE">Schweden</message>
+    <message key="LV">Lettland</message>
+    <message key="CZ">Tschechische Republik</message>
+    <message key="RU">Russland</message>
+    <message key="BG">Bulgarien</message>
+    <message key="GR">Griechenland</message>
+    <message key="HR">Kroation</message>
+    <message key="CH">Schweiz</message>
+    <message key="IT">Italien</message>
+    <message key="ES">Spanien</message>
+    <message key="FR">Frankreich</message>
+    <message key="PT">Portugal</message>
+</catalogue>

Modified: cocoon/blocks/forms/trunk/samples/dreamteam/messages/DreamTeamMessages_it.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/dreamteam/messages/DreamTeamMessages_it.xml?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/samples/dreamteam/messages/DreamTeamMessages_it.xml (original)
+++ cocoon/blocks/forms/trunk/samples/dreamteam/messages/DreamTeamMessages_it.xml Fri Sep 16 06:46:22 2005
@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- This catalogue file contains translations for DreamTeam messages. -->
-<catalogue>
-    <message key="GK">Portiere</message>
-    <message key="MD">Centrocampista</message>
-    <message key="FW">Attaccante</message>
-    <message key="DF">Difensore</message>
-    <message key="EN">Inghilterra</message>
-    <message key="NL">Paesi Bassi</message>
-    <message key="DK">Danimarca</message>
-    <message key="DE">Germania</message>
-    <message key="SE">Svezia</message>
-    <message key="LV">Lettonia</message>
-    <message key="CZ">Repubblica Ceca</message>
-    <message key="RU">Russia</message>
-    <message key="BG">Bulgaria</message>
-    <message key="GR">Grecia</message>
-    <message key="HR">Croazia</message>
-    <message key="CH">Svizzera</message>
-    <message key="IT">Italia</message>
-    <message key="ES">Spagna</message>
-    <message key="FR">Francia</message>
-    <message key="PT">Portogallo</message>
-</catalogue>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<!-- This catalogue file contains translations for DreamTeam messages. -->
+<catalogue>
+    <message key="GK">Portiere</message>
+    <message key="MD">Centrocampista</message>
+    <message key="FW">Attaccante</message>
+    <message key="DF">Difensore</message>
+    <message key="EN">Inghilterra</message>
+    <message key="NL">Paesi Bassi</message>
+    <message key="DK">Danimarca</message>
+    <message key="DE">Germania</message>
+    <message key="SE">Svezia</message>
+    <message key="LV">Lettonia</message>
+    <message key="CZ">Repubblica Ceca</message>
+    <message key="RU">Russia</message>
+    <message key="BG">Bulgaria</message>
+    <message key="GR">Grecia</message>
+    <message key="HR">Croazia</message>
+    <message key="CH">Svizzera</message>
+    <message key="IT">Italia</message>
+    <message key="ES">Spagna</message>
+    <message key="FR">Francia</message>
+    <message key="PT">Portogallo</message>
+</catalogue>

Modified: cocoon/blocks/forms/trunk/samples/dreamteam/messages/FormsMessages.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/dreamteam/messages/FormsMessages.xml?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/samples/dreamteam/messages/FormsMessages.xml (original)
+++ cocoon/blocks/forms/trunk/samples/dreamteam/messages/FormsMessages.xml Fri Sep 16 06:46:22 2005
@@ -1,49 +1,49 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- This catalogue file contains translations for built-in CForms messages. -->
-<catalogue>
-  <message key="general.field-required">This field is required.</message>
-
-  <message key="datatype.conversion-failed">Not a valid {0}.</message>
-  <message key="datatype.long">integer number</message>
-  <message key="datatype.date">date</message>
-
-  <message key="validation.string.exact-length">Should be exactly {0} characters.</message>
-  <message key="validation.string.range-length">Should contain from {0} to {1} characters.</message>
-  <message key="validation.string.min-length">Should be at least {0} characters.</message>
-  <message key="validation.string.max-length">Should be at most {0} characters.</message>
-  <message key="validation.string.regexp">Does not match the following regular expression: {0}</message>
-
-  <message key="validation.string.invalidemail">This field does not contain a valid email address</message>
-
-  <message key="validation.array.exact-valuecount">Exactly {0} item(s) should be selected.</message>
-  <message key="validation.array.range-valuecount">At least {0} item(s) and at most {1} items should be selected.</message>
-  <message key="validation.array.min-valuecount">At least {0} item(s) should be selected.</message>
-  <message key="validation.array.max-valuecount">At most {0} items should be selected.</message>
-
-  <message key="multivaluefield.conversionfailed">One of the selected values is of an incorrect type.</message>
-
-  <message key="validation.numeric.range">Number should be in the range from {0} to {1}.</message>
-  <message key="validation.numeric.min">Number should be greater than or equal to {0}.</message>
-  <message key="validation.numeric.max">Number should be less than or equal to {0}.</message>
-
-  <message key="validation.mod10">Mod 10 check failed.</message>
-
-
-  <message key="aggregatedfield.split-failed">Content of this field does not match the following regular expression: {0}</message>
-
-</catalogue>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<!-- This catalogue file contains translations for built-in CForms messages. -->
+<catalogue>
+  <message key="general.field-required">This field is required.</message>
+
+  <message key="datatype.conversion-failed">Not a valid {0}.</message>
+  <message key="datatype.long">integer number</message>
+  <message key="datatype.date">date</message>
+
+  <message key="validation.string.exact-length">Should be exactly {0} characters.</message>
+  <message key="validation.string.range-length">Should contain from {0} to {1} characters.</message>
+  <message key="validation.string.min-length">Should be at least {0} characters.</message>
+  <message key="validation.string.max-length">Should be at most {0} characters.</message>
+  <message key="validation.string.regexp">Does not match the following regular expression: {0}</message>
+
+  <message key="validation.string.invalidemail">This field does not contain a valid email address</message>
+
+  <message key="validation.array.exact-valuecount">Exactly {0} item(s) should be selected.</message>
+  <message key="validation.array.range-valuecount">At least {0} item(s) and at most {1} items should be selected.</message>
+  <message key="validation.array.min-valuecount">At least {0} item(s) should be selected.</message>
+  <message key="validation.array.max-valuecount">At most {0} items should be selected.</message>
+
+  <message key="multivaluefield.conversionfailed">One of the selected values is of an incorrect type.</message>
+
+  <message key="validation.numeric.range">Number should be in the range from {0} to {1}.</message>
+  <message key="validation.numeric.min">Number should be greater than or equal to {0}.</message>
+  <message key="validation.numeric.max">Number should be less than or equal to {0}.</message>
+
+  <message key="validation.mod10">Mod 10 check failed.</message>
+
+
+  <message key="aggregatedfield.split-failed">Content of this field does not match the following regular expression: {0}</message>
+
+</catalogue>

Modified: cocoon/blocks/forms/trunk/samples/dreamteam/messages/FormsMessages_nl_NL.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/dreamteam/messages/FormsMessages_nl_NL.xml?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/samples/dreamteam/messages/FormsMessages_nl_NL.xml (original)
+++ cocoon/blocks/forms/trunk/samples/dreamteam/messages/FormsMessages_nl_NL.xml Fri Sep 16 06:46:22 2005
@@ -1,59 +1,59 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  Copyright 1999-2004 The Apache Software Foundation
-
-  Licensed 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.
--->
-<!-- This catalogue file contains translations for built-in CForms messages. -->
-<catalogue xml:lang="nl_NL">
-  <message key="general.field-required">Dit veld moet ingevuld zijn.</message>
-
-  <message key="datatype.conversion-failed">Ongeldig {0}.</message>
-  <message key="datatype.long">integer getal</message>
-  <message key="datatype.date">datum</message>
-
-    <message key="validation.string.exact-length">Dit veld moet precies {0} tekens lang 
-        zijn.</message>
-    <message key="validation.string.range-length">Het aantal tekens moet tussen de {0} en 
-        {1} liggen.</message>
-  <message key="validation.string.min-length">Dit veld moet minimaal {0} tekens lang 
-        zijn.</message>
-  <message key="validation.string.max-length">Dit veld mag maximaal {0} tekens lang 
-        zijn.</message>
-    <message key="validation.string.regexp">De waarde komt niet overeen met deze reg. 
-        exp.: {0}</message>
-
-  <message key="validation.string.invalidemail">Dit is geen geldig email adres</message>
-
-  <message key="validation.array.exact-valuecount">Kies precies {0} elementen.</message>
-    <message key="validation.array.range-valuecount">Kies tussen de {0} en {1} 
-        elementen.</message>
-  <message key="validation.array.min-valuecount">Kies minimaal {0} elementen.</message>
-    <message key="validation.array.max-valuecount">Kies maximaal {0} 
-        elementen.</message>
-
-    <message key="multivaluefield.conversionfailed">Een van de gekozen waarden is 
-        ongeldig.</message>
-
-    <message key="validation.numeric.range">De waarde moet liggen tussen {0} en 
-        {1}.</message>
-    <message key="validation.numeric.min">De waarde is minimaal {0}.</message>
-  <message key="validation.numeric.max">De waarde is maximaal {0}.</message>
-
-  <message key="validation.mod10">De Mod 10 verificatie is mislukt.</message>
-
-
-  <message key="aggregatedfield.split-failed">De waarde komt niet overeen met deze reg. 
-        exp.: {0}</message>
-
-</catalogue>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<!-- This catalogue file contains translations for built-in CForms messages. -->
+<catalogue xml:lang="nl_NL">
+  <message key="general.field-required">Dit veld moet ingevuld zijn.</message>
+
+  <message key="datatype.conversion-failed">Ongeldig {0}.</message>
+  <message key="datatype.long">integer getal</message>
+  <message key="datatype.date">datum</message>
+
+    <message key="validation.string.exact-length">Dit veld moet precies {0} tekens lang 
+        zijn.</message>
+    <message key="validation.string.range-length">Het aantal tekens moet tussen de {0} en 
+        {1} liggen.</message>
+  <message key="validation.string.min-length">Dit veld moet minimaal {0} tekens lang 
+        zijn.</message>
+  <message key="validation.string.max-length">Dit veld mag maximaal {0} tekens lang 
+        zijn.</message>
+    <message key="validation.string.regexp">De waarde komt niet overeen met deze reg. 
+        exp.: {0}</message>
+
+  <message key="validation.string.invalidemail">Dit is geen geldig email adres</message>
+
+  <message key="validation.array.exact-valuecount">Kies precies {0} elementen.</message>
+    <message key="validation.array.range-valuecount">Kies tussen de {0} en {1} 
+        elementen.</message>
+  <message key="validation.array.min-valuecount">Kies minimaal {0} elementen.</message>
+    <message key="validation.array.max-valuecount">Kies maximaal {0} 
+        elementen.</message>
+
+    <message key="multivaluefield.conversionfailed">Een van de gekozen waarden is 
+        ongeldig.</message>
+
+    <message key="validation.numeric.range">De waarde moet liggen tussen {0} en 
+        {1}.</message>
+    <message key="validation.numeric.min">De waarde is minimaal {0}.</message>
+  <message key="validation.numeric.max">De waarde is maximaal {0}.</message>
+
+  <message key="validation.mod10">De Mod 10 verificatie is mislukt.</message>
+
+
+  <message key="aggregatedfield.split-failed">De waarde komt niet overeen met deze reg. 
+        exp.: {0}</message>
+
+</catalogue>

Modified: cocoon/blocks/forms/trunk/samples/dreamteam/resources/styles/dreamteam.css
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/dreamteam/resources/styles/dreamteam.css?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/samples/dreamteam/resources/styles/dreamteam.css (original)
+++ cocoon/blocks/forms/trunk/samples/dreamteam/resources/styles/dreamteam.css Fri Sep 16 06:46:22 2005
@@ -1,115 +1,115 @@
-/*
-* Copyright 2005 The Apache Software Foundation or its licensors,
-* as applicable.
-*
-* Licensed 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.
-*/
-/** CSS stylesheet for the dreamteam sample, adjusted to match the supersonic tour example app */
-
-body { 	
-    font-family: Georgia, Verdana, Arial;
-	font-style:normal;
-	font-variant:normal;
-	background-color: white;
-	background-image: none;
-	color: black;
-	padding-top:10px;
-	padding-bottom:10px;
-	padding-left:10px;
-	padding-right:10px;
- }
-h1 {
-    font-size: 120%
-	font-weight: bold;
-	padding-left: 20px;
-	border-bottom: solid red 1px;
-}
-h2 {
-    border-bottom: solid #CCCCCC 1px;
-}
-
-img {
-    border: 0px solid;
-}
-table {
-    border: 0px solid;
-	margin:0px;
-	padding-top:10px;
-	padding-bottom:10px;
-	padding-left:10px;
-	padding-right:10px;
-	border-top: solid 0px #ccc;
-}
-
-.tableheader {
-	font-size:100%;
-	font-style:normal;
-	font-variant:normal;
-	font-weight:bold;
-	color:#000000;
-	padding: 5px;
-	border-bottom: 1px solid #ccc;
-}
-td {
-	font-size:100%;
-	font-style:normal;
-	font-variant:normal;
-	font-weight:normal;
-	color:#00000;
-	padding: 3px;
-	border-bottom: 1px solid #f0f0f0;
-}
-
-.legend {
-	border: 1px solid #ccc;
-	font-size: 70%;
-	width: 50%;
-}
-
-.developer-header {
-	border-bottom: solid #CCCCCC 1px;
-	background-color: #FFFFCC;
-	font-weight:bold;
-}
-
-.developer-note {
-	font-height: 80%;	
-}                        
-
-.code {
-    font-family: courier, monospaced;
-    font-size: 70%;
-    background: #FFFFCC;
-    margin-top: 1em;
-    padding: 2px;
-}
-
-.codeIndent {
-    margin-left: 1em;
-}
-
-                        
-.sort-arrow.descending {
-	background-image:		url("images/sort_down.gif");
-}
-
-.sort-arrow.ascending {
-	background-image:		url("images/sort_up.gif");
-}
-
-.sort-arrow {
-	width: 11px;
-	height:	11px;
-	margin: 0 2px;
-	cursor:	hand;
-}
+/*
+* Copyright 2005 The Apache Software Foundation or its licensors,
+* as applicable.
+*
+* Licensed 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.
+*/
+/** CSS stylesheet for the dreamteam sample, adjusted to match the supersonic tour example app */
+
+body { 	
+    font-family: Georgia, Verdana, Arial;
+	font-style:normal;
+	font-variant:normal;
+	background-color: white;
+	background-image: none;
+	color: black;
+	padding-top:10px;
+	padding-bottom:10px;
+	padding-left:10px;
+	padding-right:10px;
+ }
+h1 {
+    font-size: 120%
+	font-weight: bold;
+	padding-left: 20px;
+	border-bottom: solid red 1px;
+}
+h2 {
+    border-bottom: solid #CCCCCC 1px;
+}
+
+img {
+    border: 0px solid;
+}
+table {
+    border: 0px solid;
+	margin:0px;
+	padding-top:10px;
+	padding-bottom:10px;
+	padding-left:10px;
+	padding-right:10px;
+	border-top: solid 0px #ccc;
+}
+
+.tableheader {
+	font-size:100%;
+	font-style:normal;
+	font-variant:normal;
+	font-weight:bold;
+	color:#000000;
+	padding: 5px;
+	border-bottom: 1px solid #ccc;
+}
+td {
+	font-size:100%;
+	font-style:normal;
+	font-variant:normal;
+	font-weight:normal;
+	color:#00000;
+	padding: 3px;
+	border-bottom: 1px solid #f0f0f0;
+}
+
+.legend {
+	border: 1px solid #ccc;
+	font-size: 70%;
+	width: 50%;
+}
+
+.developer-header {
+	border-bottom: solid #CCCCCC 1px;
+	background-color: #FFFFCC;
+	font-weight:bold;
+}
+
+.developer-note {
+	font-height: 80%;	
+}                        
+
+.code {
+    font-family: courier, monospaced;
+    font-size: 70%;
+    background: #FFFFCC;
+    margin-top: 1em;
+    padding: 2px;
+}
+
+.codeIndent {
+    margin-left: 1em;
+}
+
+                        
+.sort-arrow.descending {
+	background-image:		url("images/sort_down.gif");
+}
+
+.sort-arrow.ascending {
+	background-image:		url("images/sort_up.gif");
+}
+
+.sort-arrow {
+	width: 11px;
+	height:	11px;
+	margin: 0 2px;
+	cursor:	hand;
+}

Modified: cocoon/blocks/forms/trunk/samples/forms/dynamicrepeater_template.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/forms/dynamicrepeater_template.xml?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/samples/forms/dynamicrepeater_template.xml (original)
+++ cocoon/blocks/forms/trunk/samples/forms/dynamicrepeater_template.xml Fri Sep 16 06:46:22 2005
@@ -49,7 +49,7 @@
       <li>when there are some contacts, the "move up" and "move down" buttons are not shown on the first and last lines, respectively.</li>
     </ul>
       <ft:repeater id="contacts">
-        <div id="contacts">
+        <div>
         <jx:choose>
           <jx:when test="${repeater.getSize() == 0}">
             <p><strong><em>There are no contacts to display</em></strong></p>
@@ -58,10 +58,10 @@
 
             <table border="1">
               <tr>
-                <th><ft:repeater-widget-label id="contacts" widget-id="firstname"/></th>
-                <th><ft:repeater-widget-label id="contacts" widget-id="lastname"/></th>
-                <th><ft:repeater-widget-label id="contacts" widget-id="ID"/></th>
-                <th><ft:repeater-widget-label id="contacts" widget-id="select"/></th>
+                <th><ft:repeater-widget-label widget-id="firstname"/></th>
+                <th><ft:repeater-widget-label widget-id="lastname"/></th>
+                <th><ft:repeater-widget-label widget-id="ID"/></th>
+                <th><ft:repeater-widget-label widget-id="select"/></th>
               </tr>
                   <!-- The contents of the repeater-widget element is a template that will
                        be applied to each row in the repeater. -->

Added: cocoon/blocks/forms/trunk/samples/forms/textresult_template.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/forms/textresult_template.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/forms/textresult_template.xml (added)
+++ cocoon/blocks/forms/trunk/samples/forms/textresult_template.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<page xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+      
+  <title>Text success page</title>
+  <content>
+    <form action="./" method="GET">
+      <p>${title}</p>
+      
+      <pre>
+${text}
+      </pre>
+
+      <input type="submit" value="Back to samples page"/>
+    </form>
+  </content>
+</page>

Propchange: cocoon/blocks/forms/trunk/samples/forms/textresult_template.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/samples/forms/textresult_template.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/samples/library/flow/library.js
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/flow/library.js?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/flow/library.js (added)
+++ cocoon/blocks/forms/trunk/samples/library/flow/library.js Fri Sep 16 06:46:22 2005
@@ -0,0 +1,138 @@
+/*
+* Copyright 1999-2004 The Apache Software Foundation
+*
+* Licensed 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$
+*/
+
+  importPackage(org.apache.cocoon.forms.formmodel);
+
+cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");
+
+function show_form1(form) {
+    process_form(form, "form1", "forms/form1_data.xml");
+}
+
+function show_form2(form) {
+    process_form(form, "form2", "forms/form2_data.xml");
+}
+
+function show_hotel(form) {
+    process_form(form, "hotel", "forms/hotel_data.xml");
+}
+
+function process_form(form, type, input) {
+
+    var locale = determineLocale();
+    var model = form.getModel();
+    form.locale = locale;
+
+    
+    // parse the document to a DOM-tree
+    var document = loadDocument(input);
+
+    // bind the document data to the form
+    form.load(document);
+
+    // show the form
+    form.showForm(type + "-display-pipeline");
+    print("submitId = " + form.submitId);
+    if (form.isValid) {
+      print("Form is valid");  
+    } else {
+      print("Form is not valid");
+    }
+
+
+    // bind the form's data back to the document
+    form.save(document);
+
+    // save the DOM-tree back to an XML file, the makeTargetURI
+    // function makes a modified filename so that the
+    // original document is not overwritten
+    //saveDocument(document, makeTargetURI(documentURI));
+
+    // show the xml generated from the form
+    var bizdata = { "document" : document };
+    cocoon.sendPage(type + "-success-pipeline.jx", bizdata);
+}
+
+function determineLocale() {
+    var localeParam = cocoon.request.get("locale");
+    if (localeParam != null && localeParam.length > 0) {
+        return Packages.org.apache.cocoon.i18n.I18nUtils.parseLocale(localeParam);
+    }
+    return null;
+}
+
+function loadDocument(uri) {
+    var parser = null;
+    var source = null;
+    var resolver = null;
+    try {
+        parser = cocoon.getComponent(Packages.org.apache.excalibur.xml.dom.DOMParser.ROLE);
+        resolver = cocoon.getComponent(Packages.org.apache.cocoon.environment.SourceResolver.ROLE);
+        source = resolver.resolveURI(uri);
+        var is = new Packages.org.xml.sax.InputSource(source.getInputStream());
+        is.setSystemId(source.getURI());
+        return parser.parseDocument(is);
+    } finally {
+        if (source != null)
+            resolver.release(source);
+        cocoon.releaseComponent(parser);
+        cocoon.releaseComponent(resolver);
+    }
+}
+
+function saveDocument(document, uri) {
+    var source = null;
+    var resolver = null;
+    var outputStream = null;
+    try {
+        resolver = cocoon.getComponent(Packages.org.apache.cocoon.environment.SourceResolver.ROLE);
+        source = resolver.resolveURI(uri);
+
+        var tf = Packages.javax.xml.transform.TransformerFactory.newInstance();
+
+        if (source instanceof Packages.org.apache.excalibur.source.ModifiableSource
+            && tf.getFeature(Packages.javax.xml.transform.sax.SAXTransformerFactory.FEATURE)) {
+
+            outputStream = source.getOutputStream();
+            var transformerHandler = tf.newTransformerHandler();
+            var transformer = transformerHandler.getTransformer();
+            transformer.setOutputProperty(Packages.javax.xml.transform.OutputKeys.INDENT, "true");
+            transformer.setOutputProperty(Packages.javax.xml.transform.OutputKeys.METHOD, "xml");
+            transformerHandler.setResult(new Packages.javax.xml.transform.stream.StreamResult(outputStream));
+
+            var streamer = new Packages.org.apache.cocoon.xml.dom.DOMStreamer(transformerHandler);
+            streamer.stream(document);
+        } else {
+            throw new Packages.org.apache.cocoon.ProcessingException("Cannot write to source " + uri);
+        }
+    } finally {
+        if (source != null)
+            resolver.release(source);
+        cocoon.releaseComponent(resolver);
+        if (outputStream != null) {
+            try {
+                outputStream.flush();
+                outputStream.close();
+            } catch (error) {
+                cocoon.log.error("Could not flush/close outputstream: " + error);
+            }
+        }
+    }
+}

Propchange: cocoon/blocks/forms/trunk/samples/library/flow/library.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/samples/library/flow/library.js
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/samples/library/forms/form1_binding.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/forms/form1_binding.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/forms/form1_binding.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/forms/form1_binding.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<fb:context 
+  xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" 
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" 
+  path="/data" >
+  
+  <fb:import prefix="lib" uri="../libraries/library_form1-second_binding.xml"/>
+  
+  <fb:new id="lib:class1"/>
+  
+  <fb:expand id="lib:ext:field2"/>
+  <fb:value id="myField3" path="field3" extends="lib:ext:field2"/>
+  
+</fb:context>

Propchange: cocoon/blocks/forms/trunk/samples/library/forms/form1_binding.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/samples/library/forms/form1_binding.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/samples/library/forms/form1_data.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/forms/form1_data.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/forms/form1_data.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/forms/form1_data.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+  <field1/>
+</data>

Propchange: cocoon/blocks/forms/trunk/samples/library/forms/form1_data.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/samples/library/forms/form1_data.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/samples/library/forms/form1_model.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/forms/form1_model.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/forms/form1_model.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/forms/form1_model.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,149 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<fd:form
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+  
+  <fd:widgets>
+    <fd:import prefix="lib" uri="../libraries/library_form1-second.xml"/>
+    
+    <fd:new id="lib:class1"/>
+    <fd:expand id="lib:ext:field2"/>
+    
+    <fd:field id="myField3" extends="lib:ext:field2">
+      <fd:label>Field3:</fd:label>    
+      <fd:datatype base="string"/>   
+      <fd:help>
+        help test from the form model
+        <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="myField4" extends="lib:ext:field2">
+      <fd:label>Field4:</fd:label>    
+	    <fd:on-value-changed>
+	      <javascript>
+	        var newValue = event.source.value;
+	        java.lang.System.err.println("Was here! value=" + newValue);
+	        var field5 = event.source.parent.lookupWidget("myField5");		          
+	        field5.value = "model";
+	      </javascript>
+	    </fd:on-value-changed>      
+    </fd:field>
+    
+    <fd:field id="myField5" extends="lib:ext:field2">
+      <fd:label>Field5:</fd:label>    
+    </fd:field>   
+    
+ 		<fd:field id="myEmail" extends="lib:ext:email" required="true">
+      <fd:validation> 		
+				<fd:length exact="10">
+				   <fd:failmessage>Must be 10 characters long</fd:failmessage>
+				</fd:length> 		
+      </fd:validation>
+ 		  <fd:datatype base="string"/>
+      <fd:label>Enter your customer's email adress: (inherited)</fd:label> 		
+ 		</fd:field>
+ 		
+    <fd:field id="myAccount" extends="lib:ext:account">
+      <fd:datatype base="string"/>
+    </fd:field>
+
+ 		<fd:field id="myAccount1" extends="lib:ext:account">
+      <fd:label>Indicate the size of your bank account (in m<sup>3</sup>): (inherited)</fd:label>
+      <fd:datatype base="string"/>
+      <fd:selection-list>
+        <fd:item value="6"/>
+        <fd:item value="7"/>
+        <fd:item value="8">
+          <fd:label>eight</fd:label>
+        </fd:item>
+        <fd:item value="9"/>
+        <fd:item value="10"/>
+      </fd:selection-list> 		
+ 		</fd:field>
+ 		
+    <fd:multivaluefield id="myBeer" extends="lib:ext:drinks">
+      <fd:validation>
+        <fd:value-count exact="2"/>
+      </fd:validation>
+      <fd:datatype base="string"/>    
+      <fd:selection-list>
+        <fd:item value="Amstel"/>
+        <fd:item value="Heineken"/>
+        <fd:item value="Erdinger"/>
+        <fd:item value="Ottakringer"/>
+      </fd:selection-list>
+    </fd:multivaluefield> 		
+ 		
+
+   <fd:repeater id="contacts">
+      <fd:validation>
+        <fd:javascript>
+          java.lang.System.err.println("Validating");        
+          return true;
+        </fd:javascript>
+      </fd:validation>
+      <fd:widgets>
+        <fd:field id="firstname">
+          <fd:label>Firstname</fd:label>
+          <fd:datatype base="string"/>
+          <fd:on-create>
+            <fd:javascript>
+              java.lang.System.err.println("Creating a new contact row");
+            </fd:javascript>
+          </fd:on-create>
+        </fd:field>
+        <fd:field id="lastname">
+          <fd:label>Lastname</fd:label>
+          <fd:datatype base="string"/>
+        </fd:field>
+        <fd:field id="phone">
+          <fd:label>Phone</fd:label>
+          <fd:datatype base="string"/>
+        </fd:field>
+        <fd:field id="email">
+          <fd:label>Email</fd:label>
+          <fd:datatype base="string"/>
+          <fd:validation>
+            <fd:email/>
+          </fd:validation>
+        </fd:field>
+        <fd:field id="birthdate">
+          <fd:label>Birthdate (dd/MM/yyyy):</fd:label>
+          <fd:datatype base="date">
+            <fd:convertor>
+              <fd:patterns>
+                <fd:pattern>dd/MM/yyyy</fd:pattern>
+              </fd:patterns>
+            </fd:convertor>
+          </fd:datatype>
+        </fd:field>
+        <fd:booleanfield id="select">
+          <fd:label>Select</fd:label>
+        </fd:booleanfield>
+      </fd:widgets>
+    </fd:repeater>
+    <fd:repeater-action repeater="contacts" id="addcontact" command="add-row">
+      <fd:label>Add Contact</fd:label>
+    </fd:repeater-action>
+    <fd:repeater-action repeater="contacts" id="removecontacts" command="delete-rows" select="select">
+      <fd:label>Remove selected Contacts</fd:label>
+    </fd:repeater-action>
+    
+  </fd:widgets>
+</fd:form>

Propchange: cocoon/blocks/forms/trunk/samples/library/forms/form1_model.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/samples/library/forms/form1_model.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/samples/library/forms/form1_template.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/forms/form1_template.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/forms/form1_template.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/forms/form1_template.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<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">
+  <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
+  <title>Form libraries sample</title>
+  <content>
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST">
+      <fi:group>
+        <fi:styling layout="columns"/>
+        <fi:items>
+          <ft:widget id="field1"/>
+          <ft:widget id="field1-2"/>
+          <ft:widget id="field2"/>
+          <ft:widget id="myField3"/>
+          <ft:widget id="myField4"/>
+          <ft:widget id="myField5"/>  
+          <ft:widget id="myBeer"/>                               
+          <ft:widget id="myEmail"/>   
+          <ft:widget id="myAccount"/>
+          <ft:widget id="myAccount1"/>      
+        </fi:items>
+      </fi:group>
+      
+      <ft:widget-label id="contacts"/><br/>
+      <ft:repeater-size id="contacts"/>
+      <table border="1">
+        <tr>
+          <th><ft:repeater-widget-label id="contacts" widget-id="firstname"/></th>
+          <th><ft:repeater-widget-label id="contacts" widget-id="lastname"/></th>
+          <th><ft:repeater-widget-label id="contacts" widget-id="phone"/></th>
+          <th><ft:repeater-widget-label id="contacts" widget-id="email"/></th>
+          <th><ft:repeater-widget-label id="contacts" widget-id="birthdate"/></th>
+          <th><ft:repeater-widget-label id="contacts" widget-id="select"/></th>
+        </tr>
+        <jx:choose>
+          <jx:when test="${widget.getChild('contacts').getSize() == 0}">
+            <tr><td colspan="6" align="center"><em>There are no contacts to display</em></td></tr>
+          </jx:when>
+          <jx:otherwise>
+            <ft:repeater-widget id="contacts">
+              <tr>
+                <td><ft:widget id="firstname"/></td>
+                <td><ft:widget id="lastname"/></td>
+                <td><ft:widget id="phone"/></td>
+                <td><ft:widget id="email"/></td>
+                <td><ft:widget id="birthdate"/></td>
+                <td><ft:widget id="select"/></td>
+              </tr>
+            </ft:repeater-widget>
+          </jx:otherwise>
+        </jx:choose>
+        <tr>
+          <td colspan="6">
+            <ft:widget id="addcontact"/>
+            <jx:if test="${widget.getChild('contacts').getSize() > 0}">
+              <ft:widget id="removecontacts"/>
+              <br/>
+              <small>Hint: remove all contacts to see how dynamic form templates can change
+                their layout depending on widget values</small>
+            </jx:if>
+          </td>
+        </tr>
+      </table>
+      
+      <input type="submit"/>
+      
+    </ft:form-template>
+  </content>
+</page>

Propchange: cocoon/blocks/forms/trunk/samples/library/forms/form1_template.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/samples/library/forms/form1_template.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/samples/library/forms/form2_binding.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/forms/form2_binding.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/forms/form2_binding.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/forms/form2_binding.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<fb:context 
+  xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" 
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" 
+  path="/data" >
+  
+  <fb:value id="field1" path="field1"/>
+  <fb:value id="field2" path="field2"/>
+  <fb:value id="field3" path="field3"/>
+  <fb:value id="somefield" path="somefield"/>
+  
+</fb:context>

Propchange: cocoon/blocks/forms/trunk/samples/library/forms/form2_binding.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/samples/library/forms/form2_binding.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/samples/library/forms/form2_data.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/forms/form2_data.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/forms/form2_data.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/forms/form2_data.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+  <field1/>
+</data>

Propchange: cocoon/blocks/forms/trunk/samples/library/forms/form2_data.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/samples/library/forms/form2_data.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/samples/library/forms/form2_model.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/forms/form2_model.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/forms/form2_model.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/forms/form2_model.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed 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.
+-->
+<fd:form
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+  
+  <fd:widgets>
+    <fd:import prefix="lib" uri="libraries/library_form1.xml"/>
+    
+    <fd:new id="lib:class1"/>
+    <fd:expand id="lib:field2"/>
+    
+    <fd:field id="field3" extends="lib:field2">
+      <fd:datatype base="integer"/>
+    </fd:field>
+    
+    <fd:field id="somefield">
+      <fd:label>Somefield</fd:label>
+    </fd:field>
+    
+  </fd:widgets>
+</fd:form>

Propchange: cocoon/blocks/forms/trunk/samples/library/forms/form2_model.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/samples/library/forms/form2_model.xml
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message