cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r580139 [8/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/forms...
Date Thu, 27 Sep 2007 19:57:38 GMT
Added: cocoon/site/site/2.2/blocks/forms/1.0/1351_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/blocks/forms/1.0/1351_1_1.html?rev=580139&view=auto
==============================================================================
--- cocoon/site/site/2.2/blocks/forms/1.0/1351_1_1.html (added)
+++ cocoon/site/site/2.2/blocks/forms/1.0/1351_1_1.html Thu Sep 27 12:56:05 2007
@@ -0,0 +1,507 @@
+<!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='menuCollapse'>
+              <a href="750_1_1.html">Ajax</a>
+              </li>
+              </ul>
+    </li>
+      <li>
+              Migration guide
+            <ul>
+                  
+    <li >
+              <strong>Migration guide</strong>
+        </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">Migration guide</h1><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Introduction</h1><p>Forms block has been recently adapted to use features that servlet services
+framework provides. For in-depth details of adoption process take a look at
+<a href="http://issues.apache.org/jira/browse/COCOON-1991">COCOON-1991</a>
+issue.</p><p>Here you'll find description of migration process which should be easy and
+straightforward. It is assumed that you already have proper block structure
+created with archetype, see <a href="../../../../2.2/1159_1_1.html">Your first Cocoon application
+using Maven 2</a>.</p><h2 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Connecting servlets</h2><p>First of all, in order to get access to the resources that Forms block makes
+available you need to create a connection to its servlet. Open
+src/main/resources/META-INF/cocoon/spring/servlet-service.xml for edition and
+put this configuration inside <tt>&lt;servlet:context&gt;</tt> tag:</p><pre>&lt;servlet:connections&gt;
+  &lt;entry key=&quot;ajax&quot; value-ref=&quot;org.apache.cocoon.ajax.impl.servlet&quot;/&gt;
+  &lt;entry key=&quot;forms&quot; value-ref=&quot;org.apache.cocoon.forms.impl.servlet&quot;/&gt;
+&lt;/servlet:connections&gt;
+</pre><h2 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Correcting links and paths</h2><p>You will need to perform massive find-and-replace operation multiple times.
+Previously, all external (available to the browser) resources were loaded with
+special <tt>_cocoon/**</tt> matcher and internal resources (like XSL files) were
+loaded with <tt>resource://</tt> scheme. Both are now considered as bad
+practice.<br></br>
+Special, global matcher cannot be easily provided in real blocks environment
+because it does not support concepts like block's polymorphism and makes Cocoon
+more monolithic. Loading resources of other block with <tt>resource:</tt> is
+also discouraged because resources location within block <strong>is not part of
+any block's contract</strong>. Only resources that are available with servlet:
+scheme are part of block's contract and should not change without significant
+reasoning.</p><p>Now you will see list of couple old and new paths/links. Performing normal
+find-and-replace operation on your block that you are migrating should be
+enough. Here is the list:</p><pre>resource://org/apache/cocoon/forms/flow/javascript/Form.js
+servlet:forms:/resource/internal/flow/javascript/Form.js
+
+resource://org/apache/cocoon/forms/generation/jx-macros.xml
+servlet:forms:/resource/internal/generation/jx-macros.xml
+
+resource://org/apache/cocoon/forms/system/i18n
+servlet:forms:/resource/internal/i18n
+
+resource://org/apache/cocoon/forms/resources/forms-page-styling.xsl
+servlet:forms:/resource/internal/xsl/forms-page-styling.xsl
+
+resource://org/apache/cocoon/forms/resources/forms-advanced-field-styling.xsl
+servlet:forms:/resource/internal/xsl/forms-advanced-field-styling.xsl
+</pre><h2 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">forms-samples-styling.xsl</h2><p>If you use forms-samples-styling.xsl for transforming your Forms into HTML
+code you will have to update it to newer version. Important change (apart from
+modified paths mentioned above) is that you should replace this fragment:</p><pre>&lt;!-- Location of the resources directory, where JS libs and icons are stored --&gt;
+&lt;xsl:param name=&quot;resources-uri&quot;&gt;resources&lt;/xsl:param&gt;
+</pre><p>with this one:</p><pre>&lt;!-- Location of the resources directories, where JS libs and icons are stored --&gt;
+&lt;xsl:param name=&quot;dojo-resources&quot;/&gt;
+&lt;xsl:param name=&quot;forms-resources&quot;/&gt;
+</pre><h2 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Javascript adjustments (for widgets authors)</h2><p>If you happened to write custom widget you probably will need to adjust your
+code, also. Unfortunately, this step can be more troublesome than others and can
+demand from you better understanding of the changes that has been incorporated
+into Forms code during refactoring process. Here, the most important issues will
+be highlighted taking as example migration of MultiValueEditor from Cocoon's
+distribution.<br></br>
+Here is the diff:</p><pre>Index: src/main/resources/org/apache/cocoon/forms/resources/js/MultiValueEditor.js
+===================================================================
+--- src/main/resources/org/apache/cocoon/forms/resources/js/MultiValueEditor.js	(wersja 517778)
++++ src/main/resources/org/apache/cocoon/forms/resources/js/MultiValueEditor.js	(wersja 517779)
+@@ -39,9 +39,9 @@
+ 
+         cformsIdPrefix: &quot;id-prefix-not-set&quot;,
+ 
+-        resourcesUri: cocoon.resourcesUri, // to make this available to the template
++        formsResourcesUri: cocoon.formsResourcesUri, // to make this available to the template
+ 
+-        templatePath: cocoon.resourcesUri + &quot;/forms/js/templates/MultiValueEditor.html&quot;,
++        templatePath: cocoon.formsResourcesUri + &quot;/js/templates/MultiValueEditor.html&quot;,
+ 
+         fillInTemplate: function(args, frag) {
+             cocoon.forms.MultiValueEditor.superclass.fillInTemplate(this, args, frag);
+
+Index: src/main/resources/org/apache/cocoon/forms/resources/js/templates/MultiValueEditor.html
+===================================================================
+--- src/main/resources/org/apache/cocoon/forms/resources/js/templates/MultiValueEditor.html	(wersja 517778)
++++ src/main/resources/org/apache/cocoon/forms/resources/js/templates/MultiValueEditor.html	(wersja 517779)
+@@ -9,11 +9,11 @@
+         &lt;/select&gt;
+       &lt;/td&gt;
+       &lt;td width=&quot;20px&quot;&gt;
+-        &lt;input dojoAttachPoint=&quot;deleteButton&quot; type=&quot;image&quot; src=&quot;${this.resourcesUri}/forms/img/delete.gif&quot;/&gt;
++        &lt;input dojoAttachPoint=&quot;deleteButton&quot; type=&quot;image&quot; src=&quot;${this.formsResourcesUri}/img/delete.gif&quot;/&gt;
+         &lt;br/&gt;
+-        &lt;input dojoAttachPoint=&quot;moveUpButton&quot; type=&quot;image&quot; src=&quot;${this.resourcesUri}/forms/img/move_up.gif&quot;/&gt;
++        &lt;input dojoAttachPoint=&quot;moveUpButton&quot; type=&quot;image&quot; src=&quot;${this.formsResourcesUri}/img/move_up.gif&quot;/&gt;
+         &lt;br/&gt;
+-        &lt;input dojoAttachPoint=&quot;moveDownButton&quot; type=&quot;image&quot; src=&quot;${this.resourcesUri}/forms/img/move_down.gif&quot;/&gt;
++        &lt;input dojoAttachPoint=&quot;moveDownButton&quot; type=&quot;image&quot; src=&quot;${this.formsResourcesUri}/img/move_down.gif&quot;/&gt;
+         &lt;br/&gt;
+       &lt;/td&gt;
+     &lt;/tr&gt;
+</pre><p>As you can see, there is no <tt>cocoon.resourcesUri</tt> property anymore. If
+you put your own widget in Forms' resource tree, simply replace
+<tt>cocoon.resourcesUri</tt> with <tt>cocoon.formsResourcesUri</tt>. Otherwise,
+introduce your own property and set it's value to
+<tt>&quot;servlet:/resource/external/yourwidget/&quot;</tt> or similar.<br></br>
+If you use Forms URI, don't forget to remove redundant <tt>&quot;/forms&quot;</tt> prefix
+(see example above).</p><div class="note"><div><strong>Note: </strong>It has been removed because there is no universal
+<tt xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">_cocoon/**</tt> matcher loading resources for all blocks (including Forms);
+now every block is responsible on its own for loading its resources. Even more,
+there is no universal pattern for resources URLs because blocks can be mounted
+at different locations. You may think that situation is worse than it used to be
+but it's not the case. If you think that I suggest to learn more about servlet
+service framework.</div></div><p>If you have additional questions don't hesitate to ask for a help on user's
+mailing list.</p><h2 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Sitemap adjustments</h2><p>Obviously, you have to adjust your sitemap too to pass new parameters:</p><pre>&lt;map:transform src=&quot;resources/forms-samples-styling.xsl&quot;&gt;
+  &lt;map:parameter name=&quot;resources-uri&quot; value=&quot;{request:contextPath}/_cocoon/resources&quot;/&gt;
+&lt;/map:transform&gt;
+</pre><p>should be replaced with:</p><pre>&lt;map:transform src=&quot;resources/forms-samples-styling.xsl&quot;&gt;
+  &lt;map:parameter name=&quot;dojo-resources&quot; value=&quot;{servlet:ajax:/resource/external/dojo}&quot;/&gt;
+  &lt;map:parameter name=&quot;forms-resources&quot; value=&quot;{servlet:forms:/resource/external/forms}&quot;/&gt;
+&lt;/map:transform&gt;
+</pre><p>Of course you may have little bit different configuration. Above fragments
+are mentioned for explanatory purpose.</p><p>Links with in <tt>servlet:</tt> scheme cannot be included in HTML code sent
+to the browser thus you need to perform link rewriting step just before
+serialization. In order to do that, you will need to add
+<tt>servletLinkRewriting</tt> transformer as shown in this example:</p><pre>     &lt;map:match pattern=&quot;*-display-pipeline.jx&quot;&gt;
+       &lt;map:generate type=&quot;jx&quot; src=&quot;forms/{1}_template.xml&quot; label=&quot;content1&quot;&gt;
+         &lt;map:parameter name=&quot;locale&quot; value=&quot;{flow-attribute:locale}&quot;/&gt;
+       &lt;/map:generate&gt;
+       &lt;map:transform type=&quot;browser-update&quot;/&gt;&lt;!-- AJAX-style form update --&gt;
+       &lt;map:transform type=&quot;i18n&quot;&gt;
+         &lt;map:parameter name=&quot;locale&quot; value=&quot;{flow-attribute:locale}&quot;/&gt;
+       &lt;/map:transform&gt;
+       &lt;map:call resource=&quot;simple-page2html&quot;&gt;
+         &lt;map:parameter name=&quot;file&quot; value=&quot;forms/{1}_template.xml&quot;/&gt;
+       &lt;/map:call&gt;
+       &lt;map:transform src=&quot;resources/forms-samples-styling.xsl&quot;&gt;
+         &lt;map:parameter name=&quot;dojo-resources&quot; value=&quot;{servlet:ajax:/resource/external/dojo}&quot;/&gt;
+         &lt;map:parameter name=&quot;forms-resources&quot; value=&quot;{servlet:forms:/resource/external/forms}&quot;/&gt;
+         &lt;map:parameter name=&quot;dojo-debug&quot; value=&quot;true&quot;/&gt;&lt;!-- set to true to turn on dojo debugging in the Browser --&gt;
+         &lt;map:parameter name=&quot;dojo-locale&quot; value=&quot;{flow-attr:locale}&quot;/&gt;
+       &lt;/map:transform&gt;
+       &lt;map:transform type=&quot;i18n&quot;&gt;
+         &lt;map:parameter name=&quot;locale&quot; value=&quot;{flow-attribute:locale}&quot;/&gt;
+       &lt;/map:transform&gt;
+
+       &lt;map:transform type=&quot;servletLinkRewriter&quot;/&gt; &lt;!-- here is the transformation step you will need to add --&gt;
+
+       &lt;map:select type=&quot;ajax-request&quot;&gt;
+         &lt;map:when test=&quot;true&quot;&gt;&lt;!-- sending a partial Browser Update --&gt;
+            &lt;map:select type=&quot;request-parameter&quot;&gt;
+              &lt;map:parameter name=&quot;parameter-name&quot; value=&quot;dojo.transport&quot;/&gt;
+              &lt;map:when test=&quot;iframe&quot;&gt;&lt;!-- sending BU via iFrameIO --&gt;
+                &lt;map:transform src=&quot;servlet:forms:/resource/internal/xsl/IframeTransport-bu-styling.xsl&quot;/&gt;
+                &lt;map:serialize type=&quot;xhtml&quot;/&gt;&lt;!-- this is REALLY important --&gt;
+              &lt;/map:when&gt;
+              &lt;map:otherwise&gt;&lt;!-- sending BU via XHR --&gt;
+                &lt;map:serialize type=&quot;xml&quot;/&gt;
+              &lt;/map:otherwise&gt;
+            &lt;/map:select&gt;
+         &lt;/map:when&gt;
+         &lt;map:otherwise&gt;&lt;!-- sending a complete page --&gt;
+           &lt;map:serialize type=&quot;html&quot;/&gt;
+         &lt;/map:otherwise&gt;
+       &lt;/map:select&gt;
+     &lt;/map:match&gt;
+</pre><p>You should add that transformer to all pipelines that transform Forms code
+into HTML.</p><p>Also, this is last step of whole migration process. After performing all
+steps you need to rebuild your block and clear browser cache to get everything
+working as before refactoring and migration process.</p><h2 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">See also</h2><p>You may also be interested with <a href="../../../../2.2/blocks/ajax/1.0/1350_1_1.html">AJAX migration
+guide</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/1351?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/475_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/blocks/forms/1.0/475_1_1.html?rev=580139&view=auto
==============================================================================
--- cocoon/site/site/2.2/blocks/forms/1.0/475_1_1.html (added)
+++ cocoon/site/site/2.2/blocks/forms/1.0/475_1_1.html Thu Sep 27 12:56:05 2007
@@ -0,0 +1,414 @@
+<!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='menuExpand'>
+              <a href="755_1_1.html">Form publishing</a>
+                <ul>
+                  
+  
+
+
+              
+      
+            
+            
+              
+            <li class='menuExpand'>
+              <a href="755_1_1.html">Templating</a>
+                <ul>
+                  
+    <li >
+              <a href="480_1_1.html">Template Generator</a>
+        </li>
+                  
+    <li >
+              <strong>Template transformer</strong>
+        </li>
+              </ul>
+        </li>
+                  
+    <li >
+              <a href="476_1_1.html">Generator</a>
+        </li>
+                  
+    <li >
+              <a href="485_1_1.html">XSLT</a>
+        </li>
+                  
+    <li >
+              <a href="1147_1_1.html">CSS</a>
+        </li>
+              </ul>
+        </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">Template Transformer</h1><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Introduction</h1><p>The Forms Template Transformer can execute the <a href="755_1_1.html">CForms
+template</a> tags.</p><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Usage</h1><p>For how to declare this transformer and how to embed it in a pipeline, see
+the Cocoon samples (the lazy doc writer approach).</p><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Special features of the forms transformer</h1><h2 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Where the forms transformer looks for the form instance object</h2><p>Each time the forms transformer encounters a ft:form-template element, it
+will try to retrieve a CForms form instance object. It looks for it in the
+following locations:</p><ol type="1">
+<li>if the ft:form-template element has a location attribute, then the value of
+that attribute will be evaluated as a JXPath expression. The result of this
+expression should be the form object.</li>
+<li>if a parameter called &quot;attribute-name&quot; was supplied to the forms transformer
+in the sitemap, then the forms transformer will try to find the form in the
+request attribute with that name. (request attributes are a temporary storage
+area that exists for the duration of one request and is often used to
+communicate objects between different sitemap components such as actions and
+transformers)</li>
+<li>finally, the forms transformer will look if a CForms form was supplied from
+a flowscript using the key &quot;CocoonFormsInstance&quot;.</li>
+</ol>If the form is not found at any of these locations, an exception is thrown.
+For example, if your form object is stored in the session using the key
+&quot;myform&quot;, then following expression in the location attribute can be used to
+retrieve it:<pre>&lt;ft:form-template location=&quot;getAttribute($session, 'myform')&quot; ...</pre>If you'd like to retrieve the key &quot;myform&quot; from a parameters specified in the
+sitemap, say one called &quot;sessionattr&quot;, then the following can be used:<pre>&lt;ft:form-template location=&quot;getAttribute($session,
+                            getParameter($parameters, 'sessionattr'))&quot; ...</pre><p>As mentioned before, ft:form-template elements cannot be nested, but you can
+have multiple ft:form-template elements on one page. Together with the location
+attribute, this can be used to handle multiple forms occuring on one template.
+</p><h2 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Action attribute on ft:form-template</h2><p>The forms transformer supports the execution of JXPath expressions that occur
+in the action attribute of the ft:form-template element. This makes it possible
+to embed the continuation ID in that attribute.</p><p>For example:</p><pre>&lt;ft:form-template action=&quot;#{$cocoon/continuation/id}.continue&quot; ...</pre><p>The following objects are available in the JXPath context via the cocoon
+object: continuation, requests, session and parameters. The context of the
+JXPath expression is the map passed on from the flowscript (if any).</p><p>Note that the JXTemplate-based form-template-tag-implementation of course
+also supports this, as this is a native feature of JXTemplate.</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/475?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/476_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/blocks/forms/1.0/476_1_1.html?rev=580139&view=auto
==============================================================================
--- cocoon/site/site/2.2/blocks/forms/1.0/476_1_1.html (added)
+++ cocoon/site/site/2.2/blocks/forms/1.0/476_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='menuExpand'>
+              <a href="755_1_1.html">Form publishing</a>
+                <ul>
+                  
+  
+
+
+              
+      
+            
+      
+              
+        <li class='menuCollapse'>
+              <a href="755_1_1.html">Templating</a>
+              </li>
+                  
+    <li >
+              <strong>Generator</strong>
+        </li>
+                  
+    <li >
+              <a href="485_1_1.html">XSLT</a>
+        </li>
+                  
+    <li >
+              <a href="1147_1_1.html">CSS</a>
+        </li>
+              </ul>
+        </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">Forms Generator</h1><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Concept</h1><p>The FormsGenerator is a Cocoon generator that generates an XML representation
+of a form instance object.</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/476?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/477_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/blocks/forms/1.0/477_1_1.html?rev=580139&view=auto
==============================================================================
--- cocoon/site/site/2.2/blocks/forms/1.0/477_1_1.html (added)
+++ cocoon/site/site/2.2/blocks/forms/1.0/477_1_1.html Thu Sep 27 12:56:05 2007
@@ -0,0 +1,465 @@
+<!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'>
+              <strong>Widgets</strong>
+                <ul>
+                  
+    <li >
+              <strong>Action widget</strong>
+        </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 >
+              <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">Action widget</h1><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Concept</h1><p>Used to trigger an action event on the server side. Usually presented as a
+button the user can press (though this is not required). When an action widget
+was activated, validation will not be performed. This is because usually it
+would be strange to have other fields validated when the user's intention wasn't
+really to submit the form. If you want validation to happen, use the
+<a href="493_1_1.html">submit widget</a>. After pressing an action button, the form
+will normally always be redisplayed, unless the event handling code explicitely
+disables this (by using the method <tt>endFormProcessing</tt> method on the
+<tt>Form</tt> object).</p><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Definition</h1><pre>&lt;fd:action id=&quot;...&quot; command=&quot;...&quot; state=&quot;...&quot;&gt;
+  &lt;fd:label&gt;...&lt;/fd:label&gt;
+  &lt;fd:help&gt;...&lt;/fd:help&gt;
+  &lt;fd:hint&gt;...&lt;/fd:hint&gt;
+  &lt;fd:on-action&gt;
+    [...]
+  &lt;/fd:on-action&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:action&gt;</pre><p>The <strong>command</strong> attribute specifies a name that will be part of
+the event generated by this widget. This can sometimes be useful. For example,
+on the <a href="494_1_1.html">Repeater action</a> and <a href="495_1_1.html">Row
+action</a> it indicates what to do. Previously this attribute was called
+action-command (now deprecated).</p><p>For more information on how event handlers are defined, see
+<a href="479_1_1.html">Event Handling</a>. The interface to be implemented for Java
+event listeners is <tt>org.apache.cocoon.forms.event.ActionListener</tt>. The
+WidgetEvent subclass is <tt>org.apache.cocoon.forms.event.ActionEvent</tt>.</p><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Template</h1><p>An action widget is inserted in a template using the ft:widget tag:</p><pre>&lt;ft:widget id=&quot;...&quot;/&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>By default an action widget is shown as a button.</p><p>To render the action widget as an image:</p><pre>&lt;ft:widget id=&quot;...&quot;&gt;
+  &lt;fi:styling type=&quot;image&quot; src=&quot;foo.gif&quot;&gt;
+&lt;/ft:widget&gt;
+</pre><p>To render the action widget as a link:</p><pre>&lt;ft:widget id=&quot;...&quot;&gt;
+  &lt;fi:styling type=&quot;link&quot;&gt;
+&lt;/ft:widget&gt;</pre></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/477?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/478_1_1.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.2/blocks/forms/1.0/478_1_1.html?rev=580139&view=auto
==============================================================================
--- cocoon/site/site/2.2/blocks/forms/1.0/478_1_1.html (added)
+++ cocoon/site/site/2.2/blocks/forms/1.0/478_1_1.html Thu Sep 27 12:56:05 2007
@@ -0,0 +1,608 @@
+<!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='menuExpand'>
+              <a href="489_1_1.html">Basics</a>
+                <ul>
+                  
+    <li >
+              <a href="489_1_1.html">Introduction</a>
+        </li>
+                  
+    <li >
+              <strong>Sample</strong>
+        </li>
+                  
+    <li >
+              <a href="752_1_1.html">Improving the sample</a>
+        </li>
+              </ul>
+        </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='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">A Simple Example</h1><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">A simple CForms example</h1><p>In this example we will show how to create a simple registration form using
+CForms and flowscript. We will follow to following steps:</p><ol type="1">
+<li>Create a form definition file</li>
+<li>Create a template file</li>
+<li>Write a bit of flowscript</li>
+<li>Add some pipelines to the sitemap</li>
+</ol>You can try this sample out on a default Cocoon install. In the webapp
+directory (build/webapp), create a new subdirectory, for example called
+<tt>myformtest</tt>. In there, create the files as outlined in this sample.Here is a screenshot of the form we're going to create:<img alt="forms_registrationform" name="forms_registrationform" height="283" width="387" src="images/350_1_1.img"></img><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Create a form definition file</h1>Below the form definition file is displayed,
+<tt>registration_definition.xml</tt>. This lists all the widgets in the form,
+together with their configuration information.<pre>&lt;fd:form
+  xmlns:fd=&quot;http://apache.org/cocoon/forms/1.0#definition&quot;&gt;
+
+  &lt;fd:widgets&gt;
+    &lt;fd:field id=&quot;name&quot; required=&quot;true&quot;&gt;
+      &lt;fd:label&gt;Name:&lt;/fd:label&gt;
+      &lt;fd:datatype base=&quot;string&quot;/&gt;
+      &lt;fd:validation&gt;
+        &lt;fd:length min=&quot;2&quot;/&gt;
+      &lt;/fd:validation&gt;
+    &lt;/fd:field&gt;
+
+    &lt;fd:field id=&quot;email&quot; required=&quot;true&quot;&gt;
+      &lt;fd:label&gt;Email address:&lt;/fd:label&gt;
+      &lt;fd:datatype base=&quot;string&quot;/&gt;
+      &lt;fd:validation&gt;
+        &lt;fd:email/&gt;
+      &lt;/fd:validation&gt;
+    &lt;/fd:field&gt;
+
+    &lt;fd:field id=&quot;age&quot;&gt;
+      &lt;fd:label&gt;Your age:&lt;/fd:label&gt;
+      &lt;fd:datatype base=&quot;long&quot;/&gt;
+      &lt;fd:validation&gt;
+        &lt;fd:range min=&quot;0&quot; max=&quot;150&quot;/&gt;
+      &lt;/fd:validation&gt;
+    &lt;/fd:field&gt;
+
+    &lt;fd:field id=&quot;password&quot; required=&quot;true&quot;&gt;
+      &lt;fd:label&gt;Password:&lt;/fd:label&gt;
+      &lt;fd:datatype base=&quot;string&quot;/&gt;
+      &lt;fd:validation&gt;
+        &lt;fd:length min=&quot;5&quot; max=&quot;20&quot;/&gt;
+      &lt;/fd:validation&gt;
+    &lt;/fd:field&gt;
+
+    &lt;fd:field id=&quot;confirmPassword&quot; required=&quot;true&quot;&gt;
+      &lt;fd:label&gt;Re-enter password:&lt;/fd:label&gt;
+      &lt;fd:datatype base=&quot;string&quot;/&gt;
+      &lt;fd:validation&gt;
+        &lt;fd:assert test=&quot;password = confirmPassword&quot;&gt;
+          &lt;fd:failmessage&gt;The two passwords are not equal.&lt;/fd:failmessage&gt;
+        &lt;/fd:assert&gt;
+      &lt;/fd:validation&gt;
+    &lt;/fd:field&gt;
+
+    &lt;fd:booleanfield id=&quot;spam&quot;&gt;
+      &lt;fd:label&gt;Send me spam&lt;/fd:label&gt;
+    &lt;/fd:booleanfield&gt;
+  &lt;/fd:widgets&gt;
+
+&lt;/fd:form&gt;
+</pre><p>All elements are in the Forms Definition namespace: <strong>fd</strong>.</p><p>Every definition file has a <tt>&lt;fd:form&gt;</tt> element as the root
+element.</p><p>The child widgets of the form are defined inside the
+<tt>&lt;fd:widgets&gt;</tt> element. As you can see, most of the widgets are
+field widgets. The field widget is the most important widget in CForms. It is
+very flexible because it can be associated with different datatypes and with a
+selection list. See the reference docs for more information on this and other
+widgets.</p><p>A nice feature is that the <tt>fd:label</tt> tags can contain mixed content.
+On the one hand, this can be used to provide rich formatting in the label. But
+it also enables you to put i18n-elements in there, to be interpreted by the
+I18nTransformer. This way, internationalisation is done using standard Cocoon
+techniques.</p><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Create a template file</h1><p>Here is the template for our registration form example,
+<tt>registration_template.xml</tt>:</p><pre>&lt;html xmlns:ft=&quot;http://apache.org/cocoon/forms/1.0#template&quot;
+  xmlns:fi=&quot;http://apache.org/cocoon/forms/1.0#instance&quot;
+  xmlns:jx=&quot;http://apache.org/cocoon/templates/jx/1.0&quot;&gt;
+
+  &lt;jx:import uri=&quot;resource://org/apache/cocoon/forms/generation/jx-macros.xml&quot;/&gt;
+
+  &lt;head&gt;
+    &lt;title&gt;Registration form&lt;/title&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;h1&gt;Registration&lt;/h1&gt;
+    &lt;ft:form-template action=&quot;#{$continuation/id}.continue&quot; method=&quot;POST&quot;&gt;
+      &lt;ft:widget-label id=&quot;name&quot;/&gt;
+      &lt;ft:widget id=&quot;name&quot;/&gt;
+      &lt;br/&gt;
+      &lt;ft:widget-label id=&quot;email&quot;/&gt;
+      &lt;ft:widget id=&quot;email&quot;/&gt;
+      &lt;br/&gt;
+      &lt;ft:widget-label id=&quot;age&quot;/&gt;
+      &lt;ft:widget id=&quot;age&quot;/&gt;
+      &lt;br/&gt;
+      &lt;ft:widget-label id=&quot;password&quot;/&gt;
+      &lt;ft:widget id=&quot;password&quot;&gt;
+        &lt;fi:styling type=&quot;password&quot;/&gt;
+      &lt;/ft:widget&gt;
+      &lt;br/&gt;
+      &lt;ft:widget-label id=&quot;confirmPassword&quot;/&gt;
+      &lt;ft:widget id=&quot;confirmPassword&quot;&gt;
+        &lt;fi:styling type=&quot;password&quot;/&gt;
+      &lt;/ft:widget&gt;
+      &lt;br/&gt;
+      &lt;ft:widget id=&quot;spam&quot;/&gt;
+      &lt;ft:widget-label id=&quot;spam&quot;/&gt;
+      &lt;br/&gt;
+
+      &lt;input type=&quot;submit&quot;/&gt;
+    &lt;/ft:form-template&gt;
+  &lt;/body&gt;
+&lt;/html&gt;</pre><p>The CForms-specific elements here are in the &quot;Forms Template&quot; namespace:
+<strong>ft</strong>.</p><p>First, jx:import is used to import the CForms macros which execute the
+elements in the ft namespace.</p><p>The <tt>&lt;ft:widget-label&gt;</tt> tag will cause the label of a widget to
+be inserted at the location of the tag. The <tt>&lt;ft:widget&gt;</tt> tag will
+cause the XML representation of a widget to be inserted at the location of that
+tag. The inserted XML will be in the &quot;Forms Instance&quot; namespace:
+<strong>fi</strong>.</p><p>The XML representation of the widget will then be translated to HTML by an
+XSLT stylesheet (forms-samples-styling.xsl in our case -- see sitemap snippets
+below). This XSLT only has to handle individual widgets, and not the page as a
+whole, and is thus not specific for one form but can be reused across forms.</p><p>For certain widgets it may be necessary to provide extra presentation hints,
+such as the width of a text box, the style of a selection list (drop down, radio
+buttons, ...) or class and style attribute values. This can be done by putting a
+fi:styling element inside the ft:widget element. This element is in the fi
+namespace because it will be copied literally. The attributes and/or content of
+the fi:styling element depend on what is supported by the particular stylesheet
+used.</p><p>As an alternative to the template approach, you could also use the
+FormsGenerator, which will generate an XML representation of the whole form, and
+style that with a custom-written XSLT. For most users we recommend the template
+approach though.</p><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Write a bit of flowscript</h1><p>Flowscript is Cocoon's solution to handling the flow of a web interaction. It
+is based on the concept of continuations. If you don't know yet about
+continuations and flowscript, <a href="NO_LINK">learn about it here</a>.</p><p>Here's the flowscript for our example, <tt>registration.js</tt>:</p><pre>cocoon.load(&quot;resource://org/apache/cocoon/forms/flow/javascript/Form.js&quot;);
+
+function registration() {
+    var form = new Form(&quot;registration_definition.xml&quot;);
+
+    form.showForm(&quot;registration-display-pipeline&quot;);
+
+    var viewData = { &quot;username&quot; : form.getChild(&quot;name&quot;).getValue() }
+    cocoon.sendPage(&quot;registration-success-pipeline&quot;, viewData);
+}</pre><p>The flowscript works as follows:</p><p>First we create a <tt>Form</tt> object, specifying the form definition file
+to be used. The Form object is actually a javascript wrapper around the &quot;real&quot;
+Java form instance object.</p><p>Then the <tt>showForm</tt> function is called on the form object. This will
+(re)display the form to the user until validation of the form succeeded. As
+parameter to the showForm function, we pass the sitemap pipeline to be used to
+display the form.</p><p>Finally we get some data from the form (the entered name), and call a sitemap
+pipeline to display this data. This pipeline is based on the JXTemplate
+generator.</p><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Add some pipelines to the sitemap</h1><p>Here is the sitemap we need, <tt>sitemap.xmap</tt>:</p><pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;map:sitemap xmlns:map=&quot;http://apache.org/cocoon/sitemap/1.0&quot;&gt;
+
+  &lt;map:components&gt;
+    &lt;map:transformers default=&quot;xslt&quot;&gt;
+      &lt;map:transformer name=&quot;i18n&quot;
+        src=&quot;org.apache.cocoon.transformation.I18nTransformer&quot;&gt;
+        &lt;catalogues default=&quot;forms&quot;&gt;
+          &lt;catalogue id=&quot;forms&quot; name=&quot;messages&quot;
+            location=&quot;resource://org/apache/cocoon/forms/system/i18n&quot;/&gt;
+        &lt;/catalogues&gt;
+        &lt;cache-at-startup&gt;true&lt;/cache-at-startup&gt;
+      &lt;/map:transformer&gt;
+    &lt;/map:transformers&gt;
+  &lt;/map:components&gt;
+
+  &lt;map:views&gt;
+  &lt;/map:views&gt;
+
+  &lt;map:resources&gt;
+  &lt;/map:resources&gt;
+
+  &lt;map:flow language=&quot;javascript&quot;&gt;
+    &lt;map:script src=&quot;registration.js&quot;/&gt;
+  &lt;/map:flow&gt;
+
+  &lt;map:pipelines&gt;
+
+   &lt;map:pipeline&gt;
+     &lt;map:match pattern=&quot;registration&quot;&gt;
+       &lt;map:call function=&quot;registration&quot;/&gt;
+     &lt;/map:match&gt;
+
+     &lt;map:match pattern=&quot;*.continue&quot;&gt;
+       &lt;map:call continuation=&quot;{1}&quot;/&gt;
+     &lt;/map:match&gt;
+
+     &lt;map:match pattern=&quot;registration-display-pipeline&quot;&gt;
+       &lt;map:generate type=&quot;jx&quot; src=&quot;registration_template.xml&quot;/&gt;
+       &lt;map:transform type=&quot;i18n&quot;&gt;
+         &lt;map:parameter name=&quot;locale&quot; value=&quot;en-US&quot;/&gt;
+       &lt;/map:transform&gt;
+       &lt;map:transform src=&quot;forms-samples-styling.xsl&quot;/&gt;
+       &lt;map:serialize/&gt;
+     &lt;/map:match&gt;
+
+     &lt;map:match pattern=&quot;registration-success-pipeline&quot;&gt;
+       &lt;map:generate type=&quot;jx&quot; src=&quot;registration_success.jx&quot;/&gt;
+       &lt;map:serialize/&gt;
+     &lt;/map:match&gt;
+
+     &lt;map:match pattern=&quot;resources/*/**&quot;&gt;
+       &lt;map:read src=&quot;resource://org/apache/cocoon/{1}/resources/{2}&quot;/&gt;
+     &lt;/map:match&gt;
+
+   &lt;/map:pipeline&gt;
+
+ &lt;/map:pipelines&gt;
+
+&lt;/map:sitemap&gt;
+</pre><p>Note the following things:</p><ul>
+<li>The i18n transformer is configured so it knows about the forms messages. The
+forms catalogue does not have to be the default one, but here it is the only one
+and thus the default.</li>
+<li>In the <tt>map:flow</tt> tag our flowscript file is declared.</li>
+<li>Then we have the pipelines:</li>
+<ul>
+<li>The first two are for managing the flowscript: when someone hits the
+registration URL, we call the registration function in our flowscript</li>
+<li>When a form is submitted, it will be matched by the second matcher,
+*.continue, which will continue the execution of the flowscript.</li>
+<li>The third matcher is for displaying the form. Note the JXTemplate generator
+is used so that the form template tags get interpreted.</li>
+<li>The fourth pipeline is for showing the &quot;success&quot; page, again using the
+JXTemplate generator, the contents of the registration_succcess.jx file is given
+below.</li>
+<li>The last one is for making default CForms resources available, such as
+javascript libraries, CSS files and images.</li>
+</ul>
+
+</ul>As promised, here is the content of the <tt>registration_success.jx</tt>
+file:<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
+&lt;html&gt;
+  &lt;head&gt;
+    &lt;title&gt;Registration successful&lt;/title&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    Registration was successful for ${username}!
+  &lt;/body&gt;
+&lt;/html&gt;
+</pre>One last thing you need to do is to copy the following file, which you find
+in the Cocoon download, to your test directory:<pre>src/blocks/forms/samples/resources/forms-samples-styling.xsl</pre><h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Try it out</h1>If you have created all the files mentioned above, you can now try out this
+sample by browsing to:<pre>http://localhost:8888/myformtest/registration
+</pre>Try entering incorrect data and see what it does.<h1 xmlns:p="http://outerx.org/daisy/1.0#publisher" xmlns:ns="http://outerx.org/daisy/1.0">Next steps</h1>The example we have studied here is quite simple. It might seem elaborate for
+a simple form (though notice you didn't have to write any Java for all of this,
+nor to restart Cocoon), but adding more complexity to the form is now simply a
+matter of adding more widgets, custom validation logic, event handlers, etc. To
+have a feel for the power of CForms, take a look at the examples included
+included in the Forms block.</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/478?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