cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r580139 [14/28] - in /cocoon/site/site/2.2: ./ blocks/ blocks/ajax/ blocks/ajax/1.0/ blocks/ajax/1.0/apidocs/ blocks/ajax/1.0/css/ blocks/ajax/1.0/images/ blocks/ajax/1.0/images/logos/ blocks/css/ blocks/forms/ blocks/forms/1.0/ blocks/form...
Date Thu, 27 Sep 2007 19:57:38 GMT
Added: cocoon/site/site/2.2/blocks/forms/1.0/740_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/blocks/forms/1.0/740_1_1.html?rev=580139&view=auto
==============================================================================
--- cocoon/site/site/2.2/blocks/forms/1.0/740_1_1.html (added)
+++ cocoon/site/site/2.2/blocks/forms/1.0/740_1_1.html Thu Sep 27 12:56:05 2007
@@ -0,0 +1,466 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+  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.
+-->
+
+
+
+
+
+
+
+
+
+<html>
+  <head>
+    <title>            Cocoon Forms
+      </title>
+    <style type="text/css" media="all">
+      @import url("./css/maven-base.css");
+      @import url("./css/maven-theme.css");
+      @import url("./css/site.css");
+    </style>
+    <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
+          <meta name="author" content="The Cocoon Community" />
+        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+  </head>
+  <body>
+    <div id="breadtrail">
+       <p><a href="http://www.apache.org">Apache</a> &raquo; <a href="../../../../">Cocoon</a> &raquo;</p>
+    </div>
+    <div id="top">
+      <div id="header">
+          <div class="projectlogo">
+             <a href="../../../../"><img class="logoImage"
+               src="images/cocoon_logo.jpg"
+                alt="Apache Cocoon" border="0" /></a>
+          </div>
+          <div class="grouplogo">
+             <p class="grouptitle"><a href="../../../../">The Apache Cocoon Project</a><img
+               src="images/apache-logo.jpg" alt="Cocoon Project Logo" /></p>
+                            <form class="searchbox" action="http://www.google.com/search" method="get">
+                 <input value="cocoon.apache.org" name="sitesearch" type="hidden" />
+                 <input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google" />&nbsp;
+                 <input class="searchboxsubmit" name="Search" value="Search" type="submit" />
+               </form>
+                      </div>
+         </div>
+         <div id="projectBar">
+           <p class="cocoonHome"><a href="../../../../"><img
+           src="images/pmc-home.gif"
+           alt="Back to Apache Cocoon homepage"
+           border="0" title="Back to Apache Cocoon homepage" /></a></p>
+           <h1 class="projectTitle"><a href="../../../../">              Cocoon Forms
+            1.0
+  </a></h1>
+                         <ul class="projectList">
+                <li><strong><a href="../../../../2.2/">Cocoon 2.2</a></em></strong></li>
+                <li><a href="../../../../2.2/core-modules/">Core <span class="pl-version-small">2.2</span></a></li>
+                <li><a href="../../../../2.2/blocks/">Blocks <span class="pl-version-small">2.2</span></a></li>
+                <li><a href="../../../../2.2/maven-plugins/">Maven Plugins <span class="pl-version-small">2.2</span></a></li>
+                <li><strong><a href="../../../../subprojects/">Subprojects</a></strong></li>
+              </ul>
+                     </div>
+         <div class="projectBarClear"><!-- --></div>
+      </div>
+<!-- end of top -->
+
+    <div id="content">
+         <ul id="menu">
+        <li>
+              Forms
+            <ul>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="489_1_1.html">Basics</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+            
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+              
+            <li class='menuExpand'>
+              <a href="477_1_1.html">Widgets</a>
+                <ul>
+                  
+    <li >
+              <a href="477_1_1.html">Action widget</a>
+        </li>
+                  
+    <li >
+              <a href="486_1_1.html">Aggregatefield widget</a>
+        </li>
+                  
+    <li >
+              <a href="482_1_1.html">Booleanfield widget</a>
+        </li>
+                  
+    <li >
+              <a href="1161_1_1.html">Calculated fields</a>
+        </li>
+                  
+    <li >
+              <a href="1294_1_1.html">Captcha Widget</a>
+        </li>
+                  
+    <li >
+              <a href="742_1_1.html">Class/New (not really widgets)</a>
+        </li>
+                  
+    <li >
+              <a href="481_1_1.html">Field widget</a>
+        </li>
+                  
+    <li >
+              <a href="754_1_1.html">Form</a>
+        </li>
+                  
+    <li >
+              <strong>Group/Struct widget</strong>
+        </li>
+                  
+    <li >
+              <a href="738_1_1.html">ImageMap widget</a>
+        </li>
+                  
+    <li >
+              <a href="497_1_1.html">Messages widget</a>
+        </li>
+                  
+    <li >
+              <a href="490_1_1.html">MultiValueField widget</a>
+        </li>
+                  
+    <li >
+              <a href="492_1_1.html">Output widget</a>
+        </li>
+                  
+    <li >
+              <a href="494_1_1.html">RepeaterAction widget</a>
+        </li>
+                  
+    <li >
+              <a href="496_1_1.html">Repeater widget</a>
+        </li>
+                  
+    <li >
+              <a href="495_1_1.html">RowAction widget</a>
+        </li>
+                  
+    <li >
+              <a href="493_1_1.html">Submit widget</a>
+        </li>
+                  
+    <li >
+              <a href="739_1_1.html">Tree widget</a>
+        </li>
+                  
+    <li >
+              <a href="741_1_1.html">Union widget</a>
+        </li>
+                  
+    <li >
+              <a href="483_1_1.html">Upload widget</a>
+        </li>
+              </ul>
+        </li>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="484_1_1.html">Widget concepts</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+                  
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="755_1_1.html">Form publishing</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="488_1_1.html">Binding</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="498_1_1.html">API</a>
+              </li>
+                  
+  
+
+
+              
+      
+              
+        <li class='menuCollapse'>
+              <a href="685_1_1.html">Form libraries</a>
+              </li>
+                  
+  
+
+
+              
+      
+              
+        <li class='menuCollapse'>
+              <a href="750_1_1.html">Ajax</a>
+              </li>
+              </ul>
+    </li>
+      <li>
+              Migration guide
+            <ul>
+                  
+    <li >
+              <a href="1351_1_1.html">Migration guide</a>
+        </li>
+              </ul>
+    </li>
+      <li>
+              Sitemap Components
+            <ul>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="904_1_1.html">Action</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="915_1_1.html">Generator</a>
+              </li>
+                  
+  
+
+
+              
+      
+              
+        <li class='menuCollapse'>
+              <a href="994_1_1.html">Transformer</a>
+              </li>
+              </ul>
+    </li>
+      <li>
+              Project Documentation
+            <ul>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="project-info.html">Project Information</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="project-reports.html">Project Reports</a>
+              </li>
+              </ul>
+    </li>
+      </ul>
+<!--
+                                     <a href="http://maven.apache.org/" title="Built by Maven" id="poweredBy">
+            <img alt="Built by Maven" src="./images/logos/maven-feather.png"></img>
+          </a>
+                   <div id="lastPublished">
+                    
+                   Last Published: 26/09/2007 05:18
+       </div>
+-->
+         <div id="contentBody"><div id="bodyText"><h1 class="docTitle">Group/Struct widget</h1><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Concept</h1><p>A group widget is simply a container for a number of other widgets. This can
+be useful to:</p><ul>
+<li>change the <a href="733_1_1.html">state</a> of the grouped widgets as a whole
+</li>
+<li>to use in a <a href="741_1_1.html">union widget</a></li>
+<li>....</li>
+</ul>The group widget was previously called struct.<h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Definition</h1><pre>&lt;fd:group id=&quot;...&quot; state=&quot;...&quot;&gt;
+  &lt;fd:widgets&gt;
+    [...]
+  &lt;/fd:widgets&gt;
+  &lt;fd:validation&gt;
+     [...]
+  &lt;/fd:validation&gt;
+  &lt;fd:on-create&gt;
+     [...]
+  &lt;/fd:on-create&gt;
+  &lt;fd:attributes&gt;
+    &lt;fd:attribute name=&quot;...&quot; value=&quot;...&quot;/&gt;    
+  &lt;/fd:attributes&gt;
+&lt;/fd:group&gt;
+</pre><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Template</h1>A group widget is inserted in a template using the ft:group tag. The content
+of the ft:group widget is the template for the children of the group widget,
+thus should contain the template tags for these child widgets.<pre>&lt;ft:group id=&quot;...&quot;&gt;
+  [...]
+&lt;/ft:group&gt;
+</pre><h2 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Example</h2>For a definition like this:<pre>&lt;fd:group id=&quot;mygroup&quot;&gt;
+  &lt;fd:widgets&gt;
+    &lt;fd:field id=&quot;field1&quot;/&gt;
+    &lt;fd:field id=&quot;field2&quot;/&gt;
+  &lt;/fd:widgets&gt;
+&lt;/fd:group&gt;</pre><p>The template could look like this:</p><pre>&lt;ft:group id=&quot;mygroup&quot;&gt;
+  &lt;ft:widget id=&quot;field1&quot;/&gt;
+  &lt;br/&gt;
+  &lt;ft:widget id=&quot;field2&quot;/&gt;
+&lt;/ft:group&gt;
+</pre><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Styling (default HTML XSL)</h1><p>N/A</p></div><div class="editUrl"><div><em>Errors and Improvements?</em> If you see any errors or potential improvements in this document please help
+        us: <a href="http://cocoon.zones.apache.org/daisy/cdocs/740?branch=1&language=1">View, Edit or comment</a> on the latest development version (registration required).
+      </div></div></div>
+    </div>
+    <!-- end of content -->
+    <div id="footer">
+      <p>&#169;  
+          1999-2007
+    
+          The Apache Software Foundation
+        <br/>
+    
+    Last Published: 26/09/2007 05:18
+</p>
+    </div>
+    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+    </script>
+    <script type="text/javascript">
+      _uacct = "UA-1740622-3";
+      urchinTracker();
+    </script>
+  </body>
+</html>

Added: cocoon/site/site/2.2/blocks/forms/1.0/741_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/blocks/forms/1.0/741_1_1.html?rev=580139&view=auto
==============================================================================
--- cocoon/site/site/2.2/blocks/forms/1.0/741_1_1.html (added)
+++ cocoon/site/site/2.2/blocks/forms/1.0/741_1_1.html Thu Sep 27 12:56:05 2007
@@ -0,0 +1,504 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+  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.
+-->
+
+
+
+
+
+
+
+
+
+<html>
+  <head>
+    <title>            Cocoon Forms
+      </title>
+    <style type="text/css" media="all">
+      @import url("./css/maven-base.css");
+      @import url("./css/maven-theme.css");
+      @import url("./css/site.css");
+    </style>
+    <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
+          <meta name="author" content="The Cocoon Community" />
+        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+  </head>
+  <body>
+    <div id="breadtrail">
+       <p><a href="http://www.apache.org">Apache</a> &raquo; <a href="../../../../">Cocoon</a> &raquo;</p>
+    </div>
+    <div id="top">
+      <div id="header">
+          <div class="projectlogo">
+             <a href="../../../../"><img class="logoImage"
+               src="images/cocoon_logo.jpg"
+                alt="Apache Cocoon" border="0" /></a>
+          </div>
+          <div class="grouplogo">
+             <p class="grouptitle"><a href="../../../../">The Apache Cocoon Project</a><img
+               src="images/apache-logo.jpg" alt="Cocoon Project Logo" /></p>
+                            <form class="searchbox" action="http://www.google.com/search" method="get">
+                 <input value="cocoon.apache.org" name="sitesearch" type="hidden" />
+                 <input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google" />&nbsp;
+                 <input class="searchboxsubmit" name="Search" value="Search" type="submit" />
+               </form>
+                      </div>
+         </div>
+         <div id="projectBar">
+           <p class="cocoonHome"><a href="../../../../"><img
+           src="images/pmc-home.gif"
+           alt="Back to Apache Cocoon homepage"
+           border="0" title="Back to Apache Cocoon homepage" /></a></p>
+           <h1 class="projectTitle"><a href="../../../../">              Cocoon Forms
+            1.0
+  </a></h1>
+                         <ul class="projectList">
+                <li><strong><a href="../../../../2.2/">Cocoon 2.2</a></em></strong></li>
+                <li><a href="../../../../2.2/core-modules/">Core <span class="pl-version-small">2.2</span></a></li>
+                <li><a href="../../../../2.2/blocks/">Blocks <span class="pl-version-small">2.2</span></a></li>
+                <li><a href="../../../../2.2/maven-plugins/">Maven Plugins <span class="pl-version-small">2.2</span></a></li>
+                <li><strong><a href="../../../../subprojects/">Subprojects</a></strong></li>
+              </ul>
+                     </div>
+         <div class="projectBarClear"><!-- --></div>
+      </div>
+<!-- end of top -->
+
+    <div id="content">
+         <ul id="menu">
+        <li>
+              Forms
+            <ul>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="489_1_1.html">Basics</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+            
+            
+      
+              
+            <li class='menuExpand'>
+              <a href="477_1_1.html">Widgets</a>
+                <ul>
+                  
+    <li >
+              <a href="477_1_1.html">Action widget</a>
+        </li>
+                  
+    <li >
+              <a href="486_1_1.html">Aggregatefield widget</a>
+        </li>
+                  
+    <li >
+              <a href="482_1_1.html">Booleanfield widget</a>
+        </li>
+                  
+    <li >
+              <a href="1161_1_1.html">Calculated fields</a>
+        </li>
+                  
+    <li >
+              <a href="1294_1_1.html">Captcha Widget</a>
+        </li>
+                  
+    <li >
+              <a href="742_1_1.html">Class/New (not really widgets)</a>
+        </li>
+                  
+    <li >
+              <a href="481_1_1.html">Field widget</a>
+        </li>
+                  
+    <li >
+              <a href="754_1_1.html">Form</a>
+        </li>
+                  
+    <li >
+              <a href="740_1_1.html">Group/Struct widget</a>
+        </li>
+                  
+    <li >
+              <a href="738_1_1.html">ImageMap widget</a>
+        </li>
+                  
+    <li >
+              <a href="497_1_1.html">Messages widget</a>
+        </li>
+                  
+    <li >
+              <a href="490_1_1.html">MultiValueField widget</a>
+        </li>
+                  
+    <li >
+              <a href="492_1_1.html">Output widget</a>
+        </li>
+                  
+    <li >
+              <a href="494_1_1.html">RepeaterAction widget</a>
+        </li>
+                  
+    <li >
+              <a href="496_1_1.html">Repeater widget</a>
+        </li>
+                  
+    <li >
+              <a href="495_1_1.html">RowAction widget</a>
+        </li>
+                  
+    <li >
+              <a href="493_1_1.html">Submit widget</a>
+        </li>
+                  
+    <li >
+              <a href="739_1_1.html">Tree widget</a>
+        </li>
+                  
+    <li >
+              <strong>Union widget</strong>
+        </li>
+                  
+    <li >
+              <a href="483_1_1.html">Upload widget</a>
+        </li>
+              </ul>
+        </li>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="484_1_1.html">Widget concepts</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+                  
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="755_1_1.html">Form publishing</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="488_1_1.html">Binding</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="498_1_1.html">API</a>
+              </li>
+                  
+  
+
+
+              
+      
+              
+        <li class='menuCollapse'>
+              <a href="685_1_1.html">Form libraries</a>
+              </li>
+                  
+  
+
+
+              
+      
+              
+        <li class='menuCollapse'>
+              <a href="750_1_1.html">Ajax</a>
+              </li>
+              </ul>
+    </li>
+      <li>
+              Migration guide
+            <ul>
+                  
+    <li >
+              <a href="1351_1_1.html">Migration guide</a>
+        </li>
+              </ul>
+    </li>
+      <li>
+              Sitemap Components
+            <ul>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="904_1_1.html">Action</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="915_1_1.html">Generator</a>
+              </li>
+                  
+  
+
+
+              
+      
+              
+        <li class='menuCollapse'>
+              <a href="994_1_1.html">Transformer</a>
+              </li>
+              </ul>
+    </li>
+      <li>
+              Project Documentation
+            <ul>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="project-info.html">Project Information</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="project-reports.html">Project Reports</a>
+              </li>
+              </ul>
+    </li>
+      </ul>
+<!--
+                                     <a href="http://maven.apache.org/" title="Built by Maven" id="poweredBy">
+            <img alt="Built by Maven" src="./images/logos/maven-feather.png"></img>
+          </a>
+                   <div id="lastPublished">
+                    
+                   Last Published: 26/09/2007 05:18
+       </div>
+-->
+         <div id="contentBody"><div id="bodyText"><h1 class="docTitle">Union widget</h1><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Concept</h1><p>Uses one out of a set of widgets based on the value of a certain other
+widget.</p><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Definition</h1><pre>&lt;fd:union id=&quot;...&quot; case=&quot;...&quot; state=&quot;...&quot;&gt;
+  &lt;fd:widgets&gt;
+    [...]
+  &lt;/fd:widgets&gt;
+  &lt;fd:on-create&gt;
+    [...]
+  &lt;/fd:on-create&gt;
+  &lt;fd:attributes&gt;
+    &lt;fd:attribute name=&quot;...&quot; value=&quot;...&quot;/&gt;    
+  &lt;/fd:attributes&gt;
+&lt;/fd:union&gt;
+</pre><p>The <tt>case</tt> attribute specifies the ID of a widget that will be used to
+select which one of the widgets will be active (the value of the case widget
+should correspond to the ID of one of those widgets). This case widget will most
+often be a field with a selection list.</p><p>If you want to switch between sets of widgets, you can group them into
+<a href="740_1_1.html">group widgets</a>.</p><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Template</h1><p>Insertion of a union widget in a template is done using <tt>ft:union</tt>
+and <tt>ft:case</tt> elements:</p><pre>&lt;ft:union id=&quot;...&quot;&gt;
+  &lt;ft:case id=&quot;...&quot;&gt;
+    [...]
+  &lt;/ft:case&gt;
+  [... more ft:case elements ...]
+&lt;/ft:union&gt;
+</pre><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Example</h1><p>Definition:</p><pre>&lt;fd:field id=&quot;testcase&quot;&gt;
+  &lt;fd:datatype base=&quot;string&quot;/&gt;
+  &lt;fd:selection-list&gt;
+    &lt;fd:item value=&quot;case1&quot;&gt;&lt;fd:label&gt;Case 1&lt;/fd:label&gt;&lt;/fd:item&gt;
+    &lt;fd:item value=&quot;case2&quot;&gt;&lt;fd:label&gt;Case 2&lt;/fd:label&gt;&lt;/fd:item&gt;
+  &lt;/fd:selection-list&gt;
+&lt;/fd:field&gt;
+
+&lt;fd:union id=&quot;testunion&quot; case=&quot;testcase&quot;&gt;
+  &lt;fd:widgets&gt;
+    &lt;fd:group id=&quot;case1&quot;&gt;
+      &lt;fd:field id=&quot;field1&quot;&gt;
+        &lt;fd:datatype base=&quot;string&quot;/&gt;
+      &lt;/fd:field&gt;
+      &lt;fd:field id=&quot;field2&quot;&gt;
+        &lt;fd:datatype base=&quot;string&quot;/&gt;
+      &lt;/fd:field&gt;
+    &lt;/fd:group&gt;
+    &lt;fd:group id=&quot;case2&quot;&gt;
+      &lt;fd:field id=&quot;field1&quot;&gt;
+        &lt;fd:datatype base=&quot;long&quot;/&gt;
+      &lt;/fd:field&gt;
+      &lt;fd:field id=&quot;field2&quot;&gt;
+        &lt;fd:datatype base=&quot;long&quot;/&gt;
+      &lt;/fd:field&gt;
+    &lt;/fd:group&gt;
+  &lt;/fd:widgets&gt;
+&lt;/fd:union&gt;
+</pre><p>Template:</p><pre>&lt;ft:widget id=&quot;testcase&quot;&gt;
+  &lt;fi:styling list-type=&quot;dropdown&quot; submit-on-change=&quot;true&quot;/&gt;
+&lt;/ft:widget&gt;
+
+&lt;ft:union id=&quot;testunion&quot;&gt;
+  &lt;ft:case id=&quot;case1&quot;&gt;
+    &lt;ft:group id=&quot;case1&quot;&gt;
+      &lt;ft:widget id=&quot;field1&quot;/&gt;
+      &lt;ft:widget id=&quot;field2&quot;/&gt;
+    &lt;/ft:group&gt;
+  &lt;/ft:case&gt;
+  &lt;ft:case id=&quot;case2&quot;&gt;
+    &lt;ft:group id=&quot;case2&quot;&gt;
+      &lt;ft:widget id=&quot;field1&quot;/&gt;
+      &lt;ft:widget id=&quot;field2&quot;/&gt;
+    &lt;/ft:group&gt;
+  &lt;/ft:case&gt;
+&lt;/ft:union&gt;
+</pre><div class="note"><div><strong>Note: </strong>Note the use of <tt xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">submit-on-change</tt> on the case widget to
+let the union widget automatically switch when the case is changed.</div></div><div class="note"><div><strong>Note: </strong>Don't forget the group tags inside the case tags! <br xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0"></br>
+If you do, an update of the form will result in a <br xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0"></br>
+<em xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">org.apache.cocoon.forms.FormsRuntimeException: Union 'testunion' has no
+child named 'field1'</em></div></div></div><div class="editUrl"><div><em>Errors and Improvements?</em> If you see any errors or potential improvements in this document please help
+        us: <a href="http://cocoon.zones.apache.org/daisy/cdocs/741?branch=1&language=1">View, Edit or comment</a> on the latest development version (registration required).
+      </div></div></div>
+    </div>
+    <!-- end of content -->
+    <div id="footer">
+      <p>&#169;  
+          1999-2007
+    
+          The Apache Software Foundation
+        <br/>
+    
+    Last Published: 26/09/2007 05:18
+</p>
+    </div>
+    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+    </script>
+    <script type="text/javascript">
+      _uacct = "UA-1740622-3";
+      urchinTracker();
+    </script>
+  </body>
+</html>

Added: cocoon/site/site/2.2/blocks/forms/1.0/742_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/blocks/forms/1.0/742_1_1.html?rev=580139&view=auto
==============================================================================
--- cocoon/site/site/2.2/blocks/forms/1.0/742_1_1.html (added)
+++ cocoon/site/site/2.2/blocks/forms/1.0/742_1_1.html Thu Sep 27 12:56:05 2007
@@ -0,0 +1,432 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+  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.
+-->
+
+
+
+
+
+
+
+
+
+<html>
+  <head>
+    <title>            Cocoon Forms
+      </title>
+    <style type="text/css" media="all">
+      @import url("./css/maven-base.css");
+      @import url("./css/maven-theme.css");
+      @import url("./css/site.css");
+    </style>
+    <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
+          <meta name="author" content="The Cocoon Community" />
+        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+  </head>
+  <body>
+    <div id="breadtrail">
+       <p><a href="http://www.apache.org">Apache</a> &raquo; <a href="../../../../">Cocoon</a> &raquo;</p>
+    </div>
+    <div id="top">
+      <div id="header">
+          <div class="projectlogo">
+             <a href="../../../../"><img class="logoImage"
+               src="images/cocoon_logo.jpg"
+                alt="Apache Cocoon" border="0" /></a>
+          </div>
+          <div class="grouplogo">
+             <p class="grouptitle"><a href="../../../../">The Apache Cocoon Project</a><img
+               src="images/apache-logo.jpg" alt="Cocoon Project Logo" /></p>
+                            <form class="searchbox" action="http://www.google.com/search" method="get">
+                 <input value="cocoon.apache.org" name="sitesearch" type="hidden" />
+                 <input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google" />&nbsp;
+                 <input class="searchboxsubmit" name="Search" value="Search" type="submit" />
+               </form>
+                      </div>
+         </div>
+         <div id="projectBar">
+           <p class="cocoonHome"><a href="../../../../"><img
+           src="images/pmc-home.gif"
+           alt="Back to Apache Cocoon homepage"
+           border="0" title="Back to Apache Cocoon homepage" /></a></p>
+           <h1 class="projectTitle"><a href="../../../../">              Cocoon Forms
+            1.0
+  </a></h1>
+                         <ul class="projectList">
+                <li><strong><a href="../../../../2.2/">Cocoon 2.2</a></em></strong></li>
+                <li><a href="../../../../2.2/core-modules/">Core <span class="pl-version-small">2.2</span></a></li>
+                <li><a href="../../../../2.2/blocks/">Blocks <span class="pl-version-small">2.2</span></a></li>
+                <li><a href="../../../../2.2/maven-plugins/">Maven Plugins <span class="pl-version-small">2.2</span></a></li>
+                <li><strong><a href="../../../../subprojects/">Subprojects</a></strong></li>
+              </ul>
+                     </div>
+         <div class="projectBarClear"><!-- --></div>
+      </div>
+<!-- end of top -->
+
+    <div id="content">
+         <ul id="menu">
+        <li>
+              Forms
+            <ul>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="489_1_1.html">Basics</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+            
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+              
+            <li class='menuExpand'>
+              <a href="477_1_1.html">Widgets</a>
+                <ul>
+                  
+    <li >
+              <a href="477_1_1.html">Action widget</a>
+        </li>
+                  
+    <li >
+              <a href="486_1_1.html">Aggregatefield widget</a>
+        </li>
+                  
+    <li >
+              <a href="482_1_1.html">Booleanfield widget</a>
+        </li>
+                  
+    <li >
+              <a href="1161_1_1.html">Calculated fields</a>
+        </li>
+                  
+    <li >
+              <a href="1294_1_1.html">Captcha Widget</a>
+        </li>
+                  
+    <li >
+              <strong>Class/New (not really widgets)</strong>
+        </li>
+                  
+    <li >
+              <a href="481_1_1.html">Field widget</a>
+        </li>
+                  
+    <li >
+              <a href="754_1_1.html">Form</a>
+        </li>
+                  
+    <li >
+              <a href="740_1_1.html">Group/Struct widget</a>
+        </li>
+                  
+    <li >
+              <a href="738_1_1.html">ImageMap widget</a>
+        </li>
+                  
+    <li >
+              <a href="497_1_1.html">Messages widget</a>
+        </li>
+                  
+    <li >
+              <a href="490_1_1.html">MultiValueField widget</a>
+        </li>
+                  
+    <li >
+              <a href="492_1_1.html">Output widget</a>
+        </li>
+                  
+    <li >
+              <a href="494_1_1.html">RepeaterAction widget</a>
+        </li>
+                  
+    <li >
+              <a href="496_1_1.html">Repeater widget</a>
+        </li>
+                  
+    <li >
+              <a href="495_1_1.html">RowAction widget</a>
+        </li>
+                  
+    <li >
+              <a href="493_1_1.html">Submit widget</a>
+        </li>
+                  
+    <li >
+              <a href="739_1_1.html">Tree widget</a>
+        </li>
+                  
+    <li >
+              <a href="741_1_1.html">Union widget</a>
+        </li>
+                  
+    <li >
+              <a href="483_1_1.html">Upload widget</a>
+        </li>
+              </ul>
+        </li>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="484_1_1.html">Widget concepts</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+                  
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="755_1_1.html">Form publishing</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="488_1_1.html">Binding</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="498_1_1.html">API</a>
+              </li>
+                  
+  
+
+
+              
+      
+              
+        <li class='menuCollapse'>
+              <a href="685_1_1.html">Form libraries</a>
+              </li>
+                  
+  
+
+
+              
+      
+              
+        <li class='menuCollapse'>
+              <a href="750_1_1.html">Ajax</a>
+              </li>
+              </ul>
+    </li>
+      <li>
+              Migration guide
+            <ul>
+                  
+    <li >
+              <a href="1351_1_1.html">Migration guide</a>
+        </li>
+              </ul>
+    </li>
+      <li>
+              Sitemap Components
+            <ul>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="904_1_1.html">Action</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="915_1_1.html">Generator</a>
+              </li>
+                  
+  
+
+
+              
+      
+              
+        <li class='menuCollapse'>
+              <a href="994_1_1.html">Transformer</a>
+              </li>
+              </ul>
+    </li>
+      <li>
+              Project Documentation
+            <ul>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="project-info.html">Project Information</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="project-reports.html">Project Reports</a>
+              </li>
+              </ul>
+    </li>
+      </ul>
+<!--
+                                     <a href="http://maven.apache.org/" title="Built by Maven" id="poweredBy">
+            <img alt="Built by Maven" src="./images/logos/maven-feather.png"></img>
+          </a>
+                   <div id="lastPublished">
+                    
+                   Last Published: 26/09/2007 05:18
+       </div>
+-->
+         <div id="contentBody"><div id="bodyText"><h1 class="docTitle">Class/New (not really widgets)</h1><p>See for now <a href="http://wiki.apache.org/cocoon/FormsClassWidget">here one
+the wiki</a>.</p></div><div class="editUrl"><div><em>Errors and Improvements?</em> If you see any errors or potential improvements in this document please help
+        us: <a href="http://cocoon.zones.apache.org/daisy/cdocs/742?branch=1&language=1">View, Edit or comment</a> on the latest development version (registration required).
+      </div></div></div>
+    </div>
+    <!-- end of content -->
+    <div id="footer">
+      <p>&#169;  
+          1999-2007
+    
+          The Apache Software Foundation
+        <br/>
+    
+    Last Published: 26/09/2007 05:18
+</p>
+    </div>
+    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+    </script>
+    <script type="text/javascript">
+      _uacct = "UA-1740622-3";
+      urchinTracker();
+    </script>
+  </body>
+</html>

Added: cocoon/site/site/2.2/blocks/forms/1.0/743_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/blocks/forms/1.0/743_1_1.html?rev=580139&view=auto
==============================================================================
--- cocoon/site/site/2.2/blocks/forms/1.0/743_1_1.html (added)
+++ cocoon/site/site/2.2/blocks/forms/1.0/743_1_1.html Thu Sep 27 12:56:05 2007
@@ -0,0 +1,376 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+  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.
+-->
+
+
+
+
+
+
+
+
+
+<html>
+  <head>
+    <title>            Cocoon Forms
+      </title>
+    <style type="text/css" media="all">
+      @import url("./css/maven-base.css");
+      @import url("./css/maven-theme.css");
+      @import url("./css/site.css");
+    </style>
+    <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
+          <meta name="author" content="The Cocoon Community" />
+        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+  </head>
+  <body>
+    <div id="breadtrail">
+       <p><a href="http://www.apache.org">Apache</a> &raquo; <a href="../../../../">Cocoon</a> &raquo;</p>
+    </div>
+    <div id="top">
+      <div id="header">
+          <div class="projectlogo">
+             <a href="../../../../"><img class="logoImage"
+               src="images/cocoon_logo.jpg"
+                alt="Apache Cocoon" border="0" /></a>
+          </div>
+          <div class="grouplogo">
+             <p class="grouptitle"><a href="../../../../">The Apache Cocoon Project</a><img
+               src="images/apache-logo.jpg" alt="Cocoon Project Logo" /></p>
+                            <form class="searchbox" action="http://www.google.com/search" method="get">
+                 <input value="cocoon.apache.org" name="sitesearch" type="hidden" />
+                 <input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google" />&nbsp;
+                 <input class="searchboxsubmit" name="Search" value="Search" type="submit" />
+               </form>
+                      </div>
+         </div>
+         <div id="projectBar">
+           <p class="cocoonHome"><a href="../../../../"><img
+           src="images/pmc-home.gif"
+           alt="Back to Apache Cocoon homepage"
+           border="0" title="Back to Apache Cocoon homepage" /></a></p>
+           <h1 class="projectTitle"><a href="../../../../">              Cocoon Forms
+            1.0
+  </a></h1>
+                         <ul class="projectList">
+                <li><strong><a href="../../../../2.2/">Cocoon 2.2</a></em></strong></li>
+                <li><a href="../../../../2.2/core-modules/">Core <span class="pl-version-small">2.2</span></a></li>
+                <li><a href="../../../../2.2/blocks/">Blocks <span class="pl-version-small">2.2</span></a></li>
+                <li><a href="../../../../2.2/maven-plugins/">Maven Plugins <span class="pl-version-small">2.2</span></a></li>
+                <li><strong><a href="../../../../subprojects/">Subprojects</a></strong></li>
+              </ul>
+                     </div>
+         <div class="projectBarClear"><!-- --></div>
+      </div>
+<!-- end of top -->
+
+    <div id="content">
+         <ul id="menu">
+        <li>
+              Forms
+            <ul>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="489_1_1.html">Basics</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="477_1_1.html">Widgets</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="484_1_1.html">Widget concepts</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+                  
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="755_1_1.html">Form publishing</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+            
+              
+            <li class='menuExpand'>
+              <a href="488_1_1.html">Binding</a>
+                <ul>
+                  
+    <li >
+              <a href="488_1_1.html">Binding Framework</a>
+        </li>
+                  
+    <li >
+              <strong>Simple XML Binding</strong>
+        </li>
+              </ul>
+        </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="498_1_1.html">API</a>
+              </li>
+                  
+  
+
+
+              
+      
+              
+        <li class='menuCollapse'>
+              <a href="685_1_1.html">Form libraries</a>
+              </li>
+                  
+  
+
+
+              
+      
+              
+        <li class='menuCollapse'>
+              <a href="750_1_1.html">Ajax</a>
+              </li>
+              </ul>
+    </li>
+      <li>
+              Migration guide
+            <ul>
+                  
+    <li >
+              <a href="1351_1_1.html">Migration guide</a>
+        </li>
+              </ul>
+    </li>
+      <li>
+              Sitemap Components
+            <ul>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="904_1_1.html">Action</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="915_1_1.html">Generator</a>
+              </li>
+                  
+  
+
+
+              
+      
+              
+        <li class='menuCollapse'>
+              <a href="994_1_1.html">Transformer</a>
+              </li>
+              </ul>
+    </li>
+      <li>
+              Project Documentation
+            <ul>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="project-info.html">Project Information</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="project-reports.html">Project Reports</a>
+              </li>
+              </ul>
+    </li>
+      </ul>
+<!--
+                                     <a href="http://maven.apache.org/" title="Built by Maven" id="poweredBy">
+            <img alt="Built by Maven" src="./images/logos/maven-feather.png"></img>
+          </a>
+                   <div id="lastPublished">
+                    
+                   Last Published: 26/09/2007 05:18
+       </div>
+-->
+         <div id="contentBody"><div id="bodyText"><h1 class="docTitle">Simple XML Binding</h1><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Concept</h1><p>As an alternative for the more flexible <a href="488_1_1.html">binding
+framework</a>, there is also a simpler solution that can be used when there is a
+1-to-1 coupling between the XML and the form.</p><p>The XML format is such that there is one XML element for each widget and the
+element gets the widget id as name. Exceptions from this are that the elements
+in a <a href="496_1_1.html">repeater</a> get the name &quot;item&quot; and an attribute
+&quot;position&quot; with the position of the repeater child, instead of just a number
+(which is not allowed as element name). Childs of a
+<a href="490_1_1.html">MultiValueField</a> are also embedded within an &quot;item&quot;
+element. If the Form widget does not have an id it gets the name &quot;unknown&quot;.</p><p>An AggregateField can both be interpreted as one value and as several
+widgets. This ambiguity is resolved by choosing to emit the single value rather
+than the fields as XML. For population of the form both forms are however
+allowed.</p><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Usage</h1><p>The simple XML binding is implemented by the following class:</p><pre>org.apache.cocoon.forms.util.XMLAdapter
+</pre><p>To load XML, you simply construct an XMLAdapter with a form instance as
+argument to the constructor. You can then load XML into the form simply by using
+the XMLAdapter as a ContentHandler for the XML parser, and save the XML by using
+the toSAX method on the XMLAdapter object.</p><p>In the flowscript CForm API, the form object has a <tt>getXML()</tt> method
+that returns an XMLAdapter instance. But more simply, there are also
+<tt>form.loadXML(uri)</tt> and <tt>form.saveXML(uri)</tt> methods.</p></div><div class="editUrl"><div><em>Errors and Improvements?</em> If you see any errors or potential improvements in this document please help
+        us: <a href="http://cocoon.zones.apache.org/daisy/cdocs/743?branch=1&language=1">View, Edit or comment</a> on the latest development version (registration required).
+      </div></div></div>
+    </div>
+    <!-- end of content -->
+    <div id="footer">
+      <p>&#169;  
+          1999-2007
+    
+          The Apache Software Foundation
+        <br/>
+    
+    Last Published: 26/09/2007 05:18
+</p>
+    </div>
+    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+    </script>
+    <script type="text/javascript">
+      _uacct = "UA-1740622-3";
+      urchinTracker();
+    </script>
+  </body>
+</html>

Added: cocoon/site/site/2.2/blocks/forms/1.0/750_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/blocks/forms/1.0/750_1_1.html?rev=580139&view=auto
==============================================================================
--- cocoon/site/site/2.2/blocks/forms/1.0/750_1_1.html (added)
+++ cocoon/site/site/2.2/blocks/forms/1.0/750_1_1.html Thu Sep 27 12:56:05 2007
@@ -0,0 +1,533 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!--
+  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.
+-->
+
+
+
+
+
+
+
+
+
+<html>
+  <head>
+    <title>            Cocoon Forms
+      </title>
+    <style type="text/css" media="all">
+      @import url("./css/maven-base.css");
+      @import url("./css/maven-theme.css");
+      @import url("./css/site.css");
+    </style>
+    <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" />
+          <meta name="author" content="The Cocoon Community" />
+        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+  </head>
+  <body>
+    <div id="breadtrail">
+       <p><a href="http://www.apache.org">Apache</a> &raquo; <a href="../../../../">Cocoon</a> &raquo;</p>
+    </div>
+    <div id="top">
+      <div id="header">
+          <div class="projectlogo">
+             <a href="../../../../"><img class="logoImage"
+               src="images/cocoon_logo.jpg"
+                alt="Apache Cocoon" border="0" /></a>
+          </div>
+          <div class="grouplogo">
+             <p class="grouptitle"><a href="../../../../">The Apache Cocoon Project</a><img
+               src="images/apache-logo.jpg" alt="Cocoon Project Logo" /></p>
+                            <form class="searchbox" action="http://www.google.com/search" method="get">
+                 <input value="cocoon.apache.org" name="sitesearch" type="hidden" />
+                 <input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google" />&nbsp;
+                 <input class="searchboxsubmit" name="Search" value="Search" type="submit" />
+               </form>
+                      </div>
+         </div>
+         <div id="projectBar">
+           <p class="cocoonHome"><a href="../../../../"><img
+           src="images/pmc-home.gif"
+           alt="Back to Apache Cocoon homepage"
+           border="0" title="Back to Apache Cocoon homepage" /></a></p>
+           <h1 class="projectTitle"><a href="../../../../">              Cocoon Forms
+            1.0
+  </a></h1>
+                         <ul class="projectList">
+                <li><strong><a href="../../../../2.2/">Cocoon 2.2</a></em></strong></li>
+                <li><a href="../../../../2.2/core-modules/">Core <span class="pl-version-small">2.2</span></a></li>
+                <li><a href="../../../../2.2/blocks/">Blocks <span class="pl-version-small">2.2</span></a></li>
+                <li><a href="../../../../2.2/maven-plugins/">Maven Plugins <span class="pl-version-small">2.2</span></a></li>
+                <li><strong><a href="../../../../subprojects/">Subprojects</a></strong></li>
+              </ul>
+                     </div>
+         <div class="projectBarClear"><!-- --></div>
+      </div>
+<!-- end of top -->
+
+    <div id="content">
+         <ul id="menu">
+        <li>
+              Forms
+            <ul>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="489_1_1.html">Basics</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="477_1_1.html">Widgets</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="484_1_1.html">Widget concepts</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+                  
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="755_1_1.html">Form publishing</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="488_1_1.html">Binding</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="498_1_1.html">API</a>
+              </li>
+                  
+  
+
+
+              
+      
+              
+        <li class='menuCollapse'>
+              <a href="685_1_1.html">Form libraries</a>
+              </li>
+                  
+  
+
+
+              
+            
+              
+            <li class='menuExpand'>
+              <strong>Ajax</strong>
+                <ul>
+                  
+    <li >
+              <strong>Ajax</strong>
+        </li>
+              </ul>
+        </li>
+              </ul>
+    </li>
+      <li>
+              Migration guide
+            <ul>
+                  
+    <li >
+              <a href="1351_1_1.html">Migration guide</a>
+        </li>
+              </ul>
+    </li>
+      <li>
+              Sitemap Components
+            <ul>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="904_1_1.html">Action</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="915_1_1.html">Generator</a>
+              </li>
+                  
+  
+
+
+              
+      
+              
+        <li class='menuCollapse'>
+              <a href="994_1_1.html">Transformer</a>
+              </li>
+              </ul>
+    </li>
+      <li>
+              Project Documentation
+            <ul>
+                  
+  
+
+
+              
+      
+            
+      
+            
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="project-info.html">Project Information</a>
+              </li>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="project-reports.html">Project Reports</a>
+              </li>
+              </ul>
+    </li>
+      </ul>
+<!--
+                                     <a href="http://maven.apache.org/" title="Built by Maven" id="poweredBy">
+            <img alt="Built by Maven" src="./images/logos/maven-feather.png"></img>
+          </a>
+                   <div id="lastPublished">
+                    
+                   Last Published: 26/09/2007 05:18
+       </div>
+-->
+         <div id="contentBody"><div id="bodyText"><h1 class="docTitle">Ajax</h1><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Introduction</h1><p><a href="http://en.wikipedia.org/wiki/AJAX">Ajax</a> is a catchy name for
+using JavaScript client-side code that communicates asynchronously with the
+server, thus allowing to escape the traditional web model where each button
+click translates to a full page reload.</p><p>Cocoon Forms has a number of features that allow the building of
+highly-interactive forms, such as validation, value-change listeners, intra-form
+actions, repeaters, etc. Having a full page reload for each action doesn't
+provide a good user experience and puts an unncessary load on the server.</p><p>Starting with Cocoon 2.1.8, Cocoon Forms offers (mostly) transparent Ajax
+support. What this means is that when a form is submitted, this happens in the
+background and only those parts of the form that actually changed are updated on
+the page. Full-page reload only happens when interaction with the form is
+finished.</p><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">How to activate Ajax on your forms?</h1><h2 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">The &quot;ajax&quot; attribute</h2><p>Activating Ajax mode on your forms is straightforward: just add
+<tt>ajax=&quot;true&quot;</tt> on the <tt>&lt;ft:form-template&gt;</tt> element in your
+form template:</p><pre>&lt;ft:form-template action=&quot;continue&quot; method=&quot;POST&quot; <strong xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">ajax=&quot;true&quot;</strong>&gt;
+  &lt;ft:widget id=&quot;email&quot;/&gt;
+  .../...
+&lt;/ft:form-template&gt;
+</pre><p>There are a number of things to take care of though for the Ajax mode to
+function properly.</p><h2 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Use the Template Generator</h2><p>As of version 2.1.8, Ajax support is implemented only in the JXTemplate
+version of the Forms Template language. This means that the form display
+pipeline must ust the JXTemplate generator and use jx-macros.xml:</p><pre>&lt;html xmlns:ft=&quot;http://apache.org/cocoon/forms/1.0#template&quot;
+      xmlns:jx=&quot;http://apache.org/cocoon/templates/jx/1.0&quot;&gt;
+
+  &lt;!-- Import the macros that define CForms template elements --&gt;
+  &lt;jx:import uri=&quot;resource://org/apache/cocoon/forms/generation/jx-macros.xml&quot;/&gt;
+  &lt;body&gt;
+    &lt;ft:form-template action=&quot;continue&quot; method=&quot;POST&quot; ajax=&quot;true&quot;&gt;
+    ...
+</pre><h2 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Container widgets must enclose a container element</h2><p>The Ajax support of Cocoon Forms works by sending partial page updates to the
+browser. This requires the representation of widgets to be contained in a single
+element, which becomes the &quot;replacement unit&quot; for that widget.</p><p>The styling stylesheets take care of this for terminal widgets such as fields
+and actions, but not for container widgets whose layout are completely defined
+by the page template. Concretely, this means that <tt>&lt;ft:repeater&gt;</tt>,
+<tt>&lt;ft:group&gt;</tt> and <tt>&lt;ft:union</tt>&gt; instructions must
+contain a single element such as HTML <tt>&lt;div&gt;</tt>,
+<tt>&lt;table&gt;</tt>, <tt>&lt;span&gt;</tt>, etc.</p><pre>&lt;ft:group id=&quot;info&quot;&gt;
+  &lt;div&gt;
+    &lt;p&gt;&lt;ft:widget id=&quot;foo&quot;/&gt;&lt;/p&gt;
+    &lt;p&gt;&lt;ft:widget id=&quot;bar&quot;/&gt;&lt;/p&gt;
+  &lt;/div&gt;
+&lt;/ft:group&gt;
+</pre><p>The formatting pipeline with then take care of adding an <tt>id</tt>
+attribute on the container element so that it can be found and updated in the
+displayed page.</p><h2 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Use &lt;ft:repeater&gt; instead of &lt;ft:repeater-widget&gt;</h2><p>A problem with the existing <tt>&lt;ft:repeater-widget&gt;</tt> instruction
+is that it handles two different kinds of widgets, the repeater itself and its
+rows. This has the drawback of not allowing individual refresh of rows and does
+not allow the template system to identify a unique element that contains the
+repeater, as explained above.</p><p>Starting with Cocoon 2.1.8, the template for repeaters involve two
+instructions, <tt>&lt;ft:repeater&gt;</tt> and
+<tt>&lt;ft:repeater-rows&gt;</tt>:</p><ul>
+<li><tt>&lt;ft:repeater&gt;</tt> starts the repeater template, and sets the
+repeater as the context widget. This instruction must contain a single element.
+</li>
+<li><tt>&lt;ft:repeater-rows&gt;</tt> iterates through all rows in the repeater.
+Again, and because a row is a container widget, this instruction must contain a
+single element. Note that <tt>&lt;ft:repeater-rows&gt;</tt> has to be a
+descendant of <tt>&lt;ft:repeater&gt;</tt>, but does not need to be a direct
+child and that any number of document elements can enclose
+<tt>&lt;ft:repeater-rows&gt;</tt> (not form templates instruction though).</li>
+</ul>Remember also that the JXTemplate macros define the <tt>repeater</tt> and
+<tt>repeaterLoop</tt> variables in <tt>&lt;ft:repeater&gt;</tt> and
+<tt>&lt;ft:repeater-rows&gt;</tt> respectively that allow for some powerful
+conditional templates.Here's a complete example, which is what you will have in many real-world
+situations:<pre>Here are your contacts:
+
+&lt;ft:repeater id=&quot;contacts&quot;&gt;
+  &lt;jx:choose&gt;
+
+    &lt;!-- formatting of an empty &quot;contacts&quot; --&gt;
+    &lt;jx:when test=&quot;${repeater.size == 0}&quot;&gt;
+      &lt;span&gt;
+        You have no contacts.
+        &lt;ft:widget id=&quot;../add-contact&quot;/&gt;
+      &lt;/span&gt;
+    &lt;/jx:when&gt;
+
+    &lt;!-- formatting for a non-empty &quot;contacts&quot; --&gt;
+    &lt;jx:otherwise&gt;
+      &lt;div&gt;
+        &lt;table&gt;
+          &lt;tr&gt;
+            &lt;th&gt;First name&lt;/th&gt;&lt;th&gt;Last name&lt;/th&gt;&lt;th&gt;Email&lt;/th&gt;
+          &lt;/tr&gt;
+          &lt;ft:repeater-rows&gt;
+            &lt;!-- container element for rows --&gt;
+            &lt;tr class=&quot;row-${repeaterLoop.index % 2}&quot;&gt; 
+              &lt;ft:widget id=&quot;firstname&quot;/&gt;
+              &lt;ft:widget id=&quot;lastname&quot;/&gt;
+              &lt;ft:widget id=&quot;email&quot;/&gt;
+              &lt;ft:widget id=&quot;select&quot;/&gt;
+            &lt;/tr&gt;
+          &lt;/ft:repeater-rows&gt;
+        &lt;/table&gt;
+        &lt;ft:widget id=&quot;../add-contact&quot;/&gt;
+        &lt;ft:widget id=&quot;../delete-contact&quot;/&gt;
+      &lt;/div&gt;
+    &lt;/jx:otherwise&gt;
+
+  &lt;/jx:choose&gt;
+&lt;/ft:repeater&gt;
+
+&lt;ft:widget id=&quot;ok&quot;/&gt;
+</pre><p>This example shows some conditional formatting (using JXTemplate) depending
+if the repeater is empty or not. In the two cases, the action widgets that allow
+to remove and delete rows are added within the repeater template. We use the
+<tt>&quot;../add-contact&quot;</tt> notation (<tt>&quot;../&quot;</tt> goes back to the parent
+widget) as these actions are defined as siblings of the repeater in the form
+definition, but we want them to be included in the repeater's conditional
+templates. We therefore need to &quot;escape&quot; the repeater to lookup its siblings.
+</p><p>Notice the <tt>&lt;span&gt;</tt> element when the repeater is empty. Even it
+we don't really need it from the page layout point of view, it is required to
+have a single element for Ajax updates when the user adds a contact.</p><p>Notice also the <tt>&lt;div&gt;</tt> element when the repeater is not empty.
+We cannot use the <tt>&lt;table&gt;</tt> that encloses rows, as again, we want
+to include the <tt>&quot;add-contact&quot;</tt> and <tt>&quot;delete-contacts&quot;</tt> actions in
+the conditional template. We therefore need an enclosing element for the table
+and the actions.</p><p>The <tt>&lt;ft:repeater-rows&gt;</tt> doesn't need anything special as the
+<tt>&lt;td&gt;</tt> serves as the container. The
+<tt>class=&quot;row-${repeaterLoop.index % 2}&quot;</tt> allows the generation of
+alternating colors of rows, as even rows will have <tt>class=&quot;row-0&quot;</tt> and
+odd rows will have <tt>class=&quot;row-1&quot;</tt>.</p><h2 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Using Ajax in portals and aggregations: the &quot;ajax-action&quot; attribute</h2><p>Portals do a lot of URL rewriting to ensure that only aggregated portal pages
+are displayed, even if individual portlets use their own URLs without caring
+about being integrating in a portal. This rewriting defeats the Ajax system that
+posts the form in the background using the <tt>&lt;form&gt;</tt>'s
+<tt>action</tt> attribute, which is rewritten by the portal.</p><p>To allow the Ajax system to function in a portal, you must add an additional
+<tt>ajax-action</tt> attribute on <tt>&lt;ft:form-template&gt;</tt>. When
+present, this attribute's value is where Ajax requests will be posted instead of
+the value of <tt>action</tt>.</p><pre>&lt;ft:form-template action=&quot;aggregation&quot; ajax-action=&quot;continue-form&quot;&gt;
+  .../...
+&lt;/ft:form-template&gt;</pre><p>Note that because of the portal's URL rewriting, the two attributes will
+often have the same values in the template.</p><p>The <tt>ajax-action</tt> attribute must also be used when the form page is
+produced by an aggregation (e.g. with <tt>&lt;map:aggregate&gt;</tt>): the
+form's <tt>action</tt> attribute will point to the full aggregation, which is
+not suitable to produce page update fragments. The <tt>ajax-action</tt>
+attribute must then point to the URL that handles for form and not to the full
+aggregation.</p><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">The form display pipeline for Ajax</h1><p>Using Ajax in your forms requires a special pipeline: along with the regular
+form display pipeline, we need additional components that will filter the form
+when an Ajax request is processed, so that only partial page update instructions
+are sent to the browser, and not the full HTML page.</p><p>Here's a typical Ajax form display pipeline:</p><pre>&lt;map:match pattern=&quot;viewform-*&quot;&gt;
+  &lt;map:generate type=&quot;jx&quot; src=&quot;pages/{1}.xml&quot;/&gt;
+<strong xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">  &lt;map:transform type=&quot;browser-update&quot;/&gt;
+</strong>  &lt;map:transform type=&quot;i18n&quot;/&gt;
+  &lt;map:transform src=&quot;resources/forms-styling.xsl&quot;/&gt;
+  &lt;map:transform type=&quot;i18n&quot;&gt;
+<strong xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">  &lt;map:select type=&quot;ajax-request&quot;&gt;
+    &lt;map:when test=&quot;true&quot;&gt;
+      &lt;map:serialize type=&quot;xml&quot;/&gt;
+    &lt;/map:when&gt;
+    &lt;map:otherwise&gt;
+      &lt;map:serialize type=&quot;html&quot;/&gt;
+    &lt;/map:otherwise&gt;
+  &lt;/map:select&gt;
+</strong>&lt;/map:match&gt;</pre><p>Things to notice in this pipeline:</p><ul>
+<li>the JXTemplate generator is used. Ajax is not yet implemented in the
+FormsTransformer</li>
+<li>the &quot;browser-update&quot; transformer filters the result of the template, so that
+only updated widgets are sent back to the browser</li>
+<li>the serializer depends on the request type: an Ajax requests <em>must</em>
+return XML, whereas non-Ajax requests can return HTML.</li>
+</ul>The additional components are declared as follows in the sitemap:<pre>&lt;map:components&gt;
+  &lt;map:transformers default=&quot;xslt&quot;&gt;    
+    &lt;map:transformer name=&quot;browser-update&quot; src=&quot;org.apache.cocoon.ajax.BrowserUpdateTransformer&quot;/&gt;
+  &lt;/map:transformers&gt;
+  &lt;map:selectors&gt;
+    &lt;map:selector name=&quot;ajax-request&quot; src=&quot;org.apache.cocoon.ajax.AjaxRequestSelector&quot;/&gt;
+  &lt;/map:selectors&gt;
+&lt;/map:components&gt;
+</pre><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Debugging Ajax forms</h1>Debugging Ajax forms is less easy than regular forms with full page reloads,
+as some processing occurs in the background. When an error occurs in a
+background resquest, the client-side JavaScript library prompts the user to
+display the server response in a separate window. Popup windows must be allowed
+for the target server for this to function properly.Another invaluable tool is the little-know
+<a href="http://ws.apache.org/axis/java/user-guide.html#AppendixUsingTheAxisTCPMonitorTcpmon">TCP
+monitor</a> utility hidden inside Axis. This is a small Java application that
+acts as a HTTP tunnel or a proxy that sits inbetween the browser and the server,
+and records all requests and responses, which can then be examined.<p>Other useful tools are the classical TCP sniffers such as the Unix
+<a href="http://www.tcpdump.org/tcpdump_man.html">tcpdump</a> command or the
+<a href="http://www.ethereal.com/">Ethereal</a> tool. They are not easy to setup
+and master, though.</p><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Additional information</h1><p>You can also find additional information in the
+<a href="http://www.cocoongt.org/Slides-and-recordings.html">Ajax presentation
+from the Cocoon GetTogether 2005</a>.</p></div><div class="editUrl"><div><em>Errors and Improvements?</em> If you see any errors or potential improvements in this document please help
+        us: <a href="http://cocoon.zones.apache.org/daisy/cdocs/750?branch=1&language=1">View, Edit or comment</a> on the latest development version (registration required).
+      </div></div></div>
+    </div>
+    <!-- end of content -->
+    <div id="footer">
+      <p>&#169;  
+          1999-2007
+    
+          The Apache Software Foundation
+        <br/>
+    
+    Last Published: 26/09/2007 05:18
+</p>
+    </div>
+    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+    </script>
+    <script type="text/javascript">
+      _uacct = "UA-1740622-3";
+      urchinTracker();
+    </script>
+  </body>
+</html>



Mime
View raw message