cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject svn commit: r289538 [8/8] - in /cocoon: blocks/forms/trunk/WEB-INF/xconf/ blocks/forms/trunk/conf/ blocks/forms/trunk/java/org/apache/cocoon/forms/ blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ blocks/forms/trunk/java/org/apache/cocoon/forms...
Date Fri, 16 Sep 2005 13:48:35 GMT
Added: cocoon/blocks/forms/trunk/samples/library/forms/form2_template.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/forms/form2_template.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/forms/form2_template.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/forms/form2_template.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<page xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
+  xmlns:fi="http://apache.org/cocoon/forms/1.0#instance">
+  <title>Registration</title>
+  <content>
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST">
+      <fi:group>
+        <fi:styling layout="columns"/>
+        <fi:items>
+          <ft:widget id="field1"/>
+          <ft:widget id="field2"/>
+          <ft:widget id="field3"/>
+          <ft:widget id="somefield"/>
+        </fi:items>
+      </fi:group>
+      <input type="submit"/>
+    </ft:form-template>
+  </content>
+</page>

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

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

Added: cocoon/blocks/forms/trunk/samples/library/forms/hotel_binding.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/forms/hotel_binding.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/forms/hotel_binding.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/forms/hotel_binding.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<fb:context 
+  xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" 
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" 
+  path="/booking" >
+  
+  <fb:import prefix="common" uri="../libraries/common-types/types_binding.xml"/>
+  
+  <fb:value id="room" path="room"/>
+  
+  <fb:value id="nrrooms" path="room/@number"/>
+  
+  <fb:group id="booking" path="booking" extends="common:duration"/>
+  
+  <fb:repeater id="persons" parent-path="persons" row-path="person" extends="common:genericRepeater">
+    <fb:on-bind>
+      <fb:group id="person" path="." extends="common:person"/>
+      <fb:value id="child" path="@child"/>
+    </fb:on-bind>
+    <fb:on-insert-row>
+      <fb:insert-node>
+        <person/>
+      </fb:insert-node>
+    </fb:on-insert-row>
+    <fb:on-delete-row>
+      <fb:delete-node/>
+    </fb:on-delete-row>
+  </fb:repeater>
+  
+  <fb:multi-value id="extras" parent-path="extras" row-path="extra"/>
+  
+  <fb:expand id="common:address"/>
+</fb:context>

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

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

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

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

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

Added: cocoon/blocks/forms/trunk/samples/library/forms/hotel_model.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/forms/hotel_model.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/forms/hotel_model.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/forms/hotel_model.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<fd:library
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+  <fd:widgets>
+
+    <fd:import prefix="common" uri="../libraries/common-types/types_model.xml"/>
+    
+    <fd:field id="room" required="true">
+      <fd:label>Choose a room:</fd:label>
+      <fd:datatype base="string"/>
+      <fd:selection-list>
+        <fd:item value="SR"><fd:label>Single Room</fd:label></fd:item>
+        <fd:item value="DR"><fd:label>Double Room</fd:label></fd:item>
+        <fd:item value="TR"><fd:label>Twin Room</fd:label></fd:item>
+        <fd:item value="2S"><fd:label>2-room Suite</fd:label></fd:item>
+        <fd:item value="3S"><fd:label>3-room Suite</fd:label></fd:item>
+        <fd:item value="PS"><fd:label>Presidential Suite</fd:label></fd:item>
+      </fd:selection-list>
+    </fd:field>
+    
+    <fd:field id="nrrooms" required="true">
+      <fd:label>Number of Rooms</fd:label>
+      <fd:datatype base="integer"/>
+      <fd:selection-list>
+        <fd:item value="1"/>
+        <fd:item value="2"/>
+        <fd:item value="3"/>
+        <fd:item value="4"/>
+        <fd:item value="5"/>
+        <fd:item value="6"/>
+        <fd:item value="7"/>
+        <fd:item value="8"/>
+        <fd:item value="9"/>
+        <fd:item value="10"/> 
+      </fd:selection-list>
+    </fd:field>
+    
+    <fd:group id="booking" extends="common:duration"/>
+    
+    <fd:repeater id="persons" extends="common:genericRepeater" intial-size="1">
+      <fd:widgets>
+        <fd:expand id="common:person"/>
+        <fd:booleanfield id="child">
+          <fd:label>Child</fd:label>
+          <fd:help>Check this field if this person is of age 12 or younger.</fd:help>
+        </fd:booleanfield>
+      </fd:widgets>
+    </fd:repeater>
+    <fd:repeater-action repeater="persons" action-command="add-row" id="personsAddRow">
+      <fd:label>Add person</fd:label>
+      <fd:help>Add a new record.</fd:help>
+    </fd:repeater-action>
+    
+    <fd:multivaluefield id="extras">
+      <fd:label>Choose your extras:</fd:label>
+      <fd:datatype base="string"/>
+      <fd:selection-list>
+        <fd:item value="Extra Bed"/>
+        <fd:item value="Airconditioning"/>
+        <fd:item value="Breakfast"/>
+        <fd:item value="Lunch"/>
+        <fd:item value="Dinner"/>
+      </fd:selection-list>
+    </fd:multivaluefield>
+    
+    <fd:expand id="common:address"/>
+    
+    
+  </fd:widgets>
+</fd:library>

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

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

Added: cocoon/blocks/forms/trunk/samples/library/forms/hotel_template.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/forms/hotel_template.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/forms/hotel_template.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/forms/hotel_template.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,116 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<page xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
+  xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
+  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+  <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
+  <title>Hotel Booking Sample (using Libraries)</title>
+  <content>
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST">
+      
+      <table cellpadding="0" border="0" style="border: 1px solid black;">
+        <tr>
+          <td><ft:widget-label id="room"/></td>
+          <td><ft:widget id="room"/></td>
+        </tr>
+        <tr>
+          <td><ft:widget-label id="nrrooms"/></td>
+          <td><ft:widget id="nrrooms"/></td>
+        </tr>
+        <tr>
+          <td colspan="2">
+            Reserve room:
+            <ft:group id="booking">
+              <fi:group>
+                <fi:styling layout="row"/>
+                <fi:items>
+                  <ft:widget id="from"/>
+                  <ft:widget id="to"/>
+                </fi:items>
+              </fi:group>
+            </ft:group>
+          </td>
+        </tr>
+        <tr>
+          <td colspan="2">Please include the people who will be included in this booking: <ft:widget id="personsAddRow"/></td>
+        </tr>
+        <tr>
+          <td colspan="2">
+            <table cellspacing="0">
+              <jx:choose>
+                <jx:when test="${widget.getChild('persons').getSize() == 0}">
+                  <tr><td colspan="5" align="center"><em>There are no persons to display</em></td></tr>
+                </jx:when>
+                <jx:otherwise>
+                  <ft:repeater-widget id="persons">
+                    <tr>
+                      <ft:group id="person">
+                        <td><ft:widget-label id="firstname"/></td>
+                        <td><ft:widget-label id="lastname"/></td>
+                        <td><ft:widget-label id="title"/></td>
+                      </ft:group>
+                      <td><ft:widget-label id="child"/></td>
+                      <td>&#160;</td>
+                    </tr>
+                    <tr>
+                      <ft:group id="person">
+                        <td><ft:widget id="firstname"/></td>
+                        <td><ft:widget id="lastname"/></td>
+                        <td><ft:widget id="title"/></td>
+                      </ft:group>
+                      <td><ft:widget id="child"/></td>
+                      <td><ft:widget id="moveUp"/><ft:widget id="moveDown"/><ft:widget id="deleteRow"/></td>
+                    </tr>
+                  </ft:repeater-widget>
+                </jx:otherwise>
+              </jx:choose>
+            </table>
+          </td>
+        </tr>
+        <tr>
+          <td><ft:widget-label id="extras"/></td>
+          <td>
+            <ft:widget id="extras">
+              <fi:styling list-type="checkbox"/>
+            </ft:widget>
+          </td>
+        </tr>
+        <tr>
+          <td colspan="2">Your billing address:</td>
+        </tr>
+        <tr>
+          <td colspan="2">
+            <ft:group id="address">
+              <fi:group>
+                <fi:styling layout="rows"/>
+                <fi:items>
+                  <ft:widget id="street"/>
+                  <ft:widget id="number"/>
+                  <ft:widget id="zipcode"/>
+                  <ft:widget id="city"/>
+                  <ft:widget id="country"/>
+                </fi:items>
+              </fi:group>
+            </ft:group>
+          </td>
+        </tr>
+        <tr><td colspan="2"><input type="submit"/></td></tr>
+      </table>
+      
+    </ft:form-template>
+  </content>
+</page>

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

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

Added: cocoon/blocks/forms/trunk/samples/library/libraries/common-types/types_binding.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/libraries/common-types/types_binding.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/libraries/common-types/types_binding.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/libraries/common-types/types_binding.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<fb:library 
+  xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" 
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" 
+  >
+  
+  <fb:group id="person" path="person">
+    <fb:value id="firstname" path="firstname"/>
+    <fb:value id="lastname" path="lastname"/>
+    <fb:value id="title" path="title"/>
+  </fb:group>
+  
+  <fb:group id="address" path="address">
+    <fb:value id="street" path="street"/>
+    <fb:value id="number" path="number"/>
+    <fb:value id="zipcode" path="zipcode"/>
+    <fb:value id="city" path="city"/>
+    <fb:value id="country" path="country"/>
+  </fb:group>
+  
+  <fb:group id="duration" path="duration">
+    <fb:value id="from" path="@from"/>
+    <fb:value id="to" path="@to"/>
+  </fb:group>
+  
+  <fb:group id="contactInformation" path="contact-info">
+    <fb:value id="kind" path="@kind"/>
+    
+    <fb:union id="info" path=".">
+      <fb:case id="email" path=".">
+        <fb:value id="email" path="email"/>
+      </fb:case>
+      <fb:case id="phone" path=".">
+        <fb:aggregate id="phone" path="phone" >
+          <fb:value id="number" path="number" />
+          <fb:value id="zone"   path="zone"   />
+          <fb:value id="cntr"   path="@cntr"  />
+        </fb:aggregate>
+      </fb:case>
+      <fb:case id="mail" path=".">
+        <fb:expand id="address"/>
+      </fb:case>
+    </fb:union>
+    
+    <fb:value id="description" path="description"/>
+    
+    <fb:group id="validity" path="validity" extends="duration"/>
+    
+  </fb:group>
+  
+  <!-- generic repeater -->
+  <fb:repeater id="genericRepeater"
+    parent-path="repeater"
+    row-path="row">
+    
+    <fb:on-bind>
+      <!-- to be specified by inheriting type -->
+    </fb:on-bind>
+    <!-- on-insert and on-delete have to be specified later -->
+  </fb:repeater>
+  
+  <fb:group id="postalPerson" path="postalPerson" extends="person">
+    <fb:expand id="address"/>
+  </fb:group>
+
+  <fb:group id="contact" path="contact">
+    <fb:group id="postalPerson" path="." extends="postalPerson"/>
+    
+    <fd:repeater id="contactInformationRepeater" parent-path="contacts" row-path="." extends="genericRepeater">
+      <fd:on-bind>
+        <fd:expand id="contactInformation"/>
+      </fd:on-bind>
+      <fb:on-delete>
+        <fb:delete-node/>
+      </fb:on-delete>
+    </fd:repeater>
+      
+  </fb:group>
+  
+</fb:library>

Propchange: cocoon/blocks/forms/trunk/samples/library/libraries/common-types/types_binding.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/samples/library/libraries/common-types/types_binding.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/samples/library/libraries/common-types/types_model.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/libraries/common-types/types_model.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/libraries/common-types/types_model.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/libraries/common-types/types_model.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,313 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<fd:library
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+  <fd:widgets>
+    
+    <!-- describes a person -->
+    <fd:group id="person">
+      <fd:widgets>
+        
+        <fd:field id="firstname" required="true">
+          <fd:label>First Name:</fd:label>
+          <fd:datatype base="string"/>
+        </fd:field>
+        
+        <fd:field id="lastname" required="true">
+          <fd:label>Last Name:</fd:label>
+          <fd:datatype base="string"/>
+        </fd:field>
+        
+        <fd:field id="title">
+          <fd:label>Title:</fd:label>
+          <fd:datatype base="string"/>
+          <fd:selection-list>
+            <fd:item value="Mr."/>
+            <fd:item value="Ms."/>
+            <fd:item value="Mrs."/>
+          </fd:selection-list>
+        </fd:field>
+        
+      </fd:widgets>
+    </fd:group>
+    
+    <!-- basic address -->
+    <fd:group id="address">
+      <fd:widgets>
+        
+        <fd:field id="street" required="true">
+          <fd:label>Street:</fd:label>
+          <fd:datatype base="string"/>
+        </fd:field>
+        
+        <fd:field id="number" required="true">
+          <fd:label>Street Number:</fd:label>
+          <fd:datatype base="string"/>
+        </fd:field>
+        
+        <fd:field id="zipcode" required="true">
+          <fd:label>Postal Code:</fd:label>
+          <fd:datatype base="string"/>
+        </fd:field>
+        
+        <fd:field id="city" required="true">
+          <fd:label>City:</fd:label>
+          <fd:datatype base="string"/>
+        </fd:field>
+        
+        <fd:field id="country" required="true">
+          <fd:label>Country:</fd:label>
+          <fd:datatype base="string"/>
+          <fd:selection-list>
+            <fd:item value="AU">
+              <fd:label>Austria</fd:label>
+            </fd:item>
+            <fd:item value="BE">
+              <fd:label>Belgium</fd:label>
+            </fd:item>
+            <fd:item value="CY">
+              <fd:label>Cyprus</fd:label>
+            </fd:item>
+            <fd:item value="CZ">
+              <fd:label>Czech Republic</fd:label>
+            </fd:item>
+            <fd:item value="DA">
+              <fd:label>Denmark</fd:label>
+            </fd:item>
+            <fd:item value="ES">
+              <fd:label>Estonia</fd:label>
+            </fd:item>
+            <fd:item value="FI">
+              <fd:label>Finland</fd:label>
+            </fd:item>
+            <fd:item value="FR">
+              <fd:label>France</fd:label>
+            </fd:item>
+            <fd:item value="DE">
+              <fd:label>Germany</fd:label>
+            </fd:item>
+            <fd:item value="GR">
+              <fd:label>Greece</fd:label>
+            </fd:item>
+            <fd:item value="HU">
+              <fd:label>Hungary</fd:label>
+            </fd:item>
+            <fd:item value="IR">
+              <fd:label>Ireland</fd:label>
+            </fd:item>
+            <fd:item value="IT">
+              <fd:label>Italy</fd:label>
+            </fd:item>
+            <fd:item value="LV">
+              <fd:label>Latvia</fd:label>
+            </fd:item>
+            <fd:item value="LT">
+              <fd:label>Lithuania</fd:label>
+            </fd:item>
+            <fd:item value="LU">
+              <fd:label>Luxemburg</fd:label>
+            </fd:item>
+            <fd:item value="MT">
+              <fd:label>Malta</fd:label>
+            </fd:item>
+            <fd:item value="PL">
+              <fd:label>Poland</fd:label>
+            </fd:item>
+            <fd:item value="PO">
+              <fd:label>Portugal</fd:label>
+            </fd:item>
+            <fd:item value="SK">
+              <fd:label>Slovakia</fd:label>
+            </fd:item>
+            <fd:item value="SL">
+              <fd:label>Slovenia</fd:label>
+            </fd:item>
+            <fd:item value="ES">
+              <fd:label>Spain</fd:label>
+            </fd:item>
+            <fd:item value="SW">
+              <fd:label>Sweden</fd:label>
+            </fd:item>
+            <fd:item value="NL">
+              <fd:label>The Netherlands</fd:label>
+            </fd:item>
+            <fd:item value="UK">
+              <fd:label>United Kingdom</fd:label>
+            </fd:item>
+          </fd:selection-list>
+        </fd:field>
+        
+      </fd:widgets>
+    </fd:group>
+    
+    <!-- two dates -->
+    <fd:group id="duration">
+      <fd:widgets>
+        
+        <fd:field id="from">
+          <fd:label>From:</fd:label>
+          <fd:datatype base="date">
+            <fd:convertor>
+              <fd:patterns>
+                <fd:pattern>dd/MM/yyyy</fd:pattern>
+              </fd:patterns>
+            </fd:convertor>
+          </fd:datatype>
+        </fd:field>
+        <fd:field id="to">
+          <fd:label>To:</fd:label>
+          <fd:datatype base="date">
+            <fd:convertor>
+              <fd:patterns>
+                <fd:pattern>dd/MM/yyyy</fd:pattern>
+              </fd:patterns>
+            </fd:convertor>
+          </fd:datatype>
+        </fd:field>
+        
+      </fd:widgets>
+    </fd:group>
+    
+    <!-- One way of contacting someone -->
+    <fd:group id="contactInformation">
+      <fd:widgets>
+        
+        <fd:field id="kind" required="true">
+          <fd:label>Contact by</fd:label>
+          <fd:datatype base="string"/>
+          <fd:selection-list>
+            <fd:item value="email">
+              <fd:label>Email</fd:label>
+            </fd:item>
+            <fd:item value="phone">
+              <fd:label>Telephone or Fax</fd:label>
+            </fd:item>
+            <fd:item value="mail">
+              <fd:label>Postal Mail</fd:label>
+            </fd:item>
+          </fd:selection-list>
+        </fd:field>
+        
+        <fd:union id="info" case="kind">
+          <fd:widgets>
+            
+            <fd:field id="email" required="true">
+              <fd:label>Email Address:</fd:label>
+              <fd:datatype base="string"/>
+              <fd:validation>
+                <fd:email/>
+              </fd:validation>
+            </fd:field>
+            
+            <fd:aggregatefield id="phone" required="true">
+              <fd:label>Enter a phone number in +(country)-(area)-(extension) format</fd:label>
+              <fd:datatype base="string"/>
+              <fd:split pattern="\+([0-9]{1,3})-([0-9]{1,4})-([0-9]{5,7})">
+                <fd:map group="1" field="cntr"/>
+                <fd:map group="2" field="zone"/>
+                <fd:map group="3" field="number"/>
+                <fd:failmessage>The phone-number format is wrong, please try again.</fd:failmessage>
+              </fd:split>
+              <fd:combine expression='Concat("+", cntr, "-", zone, "-", number)'/>
+              <fd:widgets>
+                <fd:field id="cntr">
+                  <fd:datatype base="integer"/>
+                </fd:field>
+                <fd:field id="zone">
+                  <fd:datatype base="integer"/>
+                </fd:field>
+                <fd:field id="number">
+                  <fd:datatype base="integer"/>
+                </fd:field>
+              </fd:widgets>
+            </fd:aggregatefield>
+            
+            <fd:group id="mail"  required="true" extends="address"/>
+            
+          </fd:widgets>
+        </fd:union>
+        
+        <fd:field id="description">
+          <fd:label>Description:</fd:label>
+          <fd:datatype base="string"/>
+        </fd:field>
+        
+        <fd:group id="validity" extends="duration">
+          <fd:label>This contact information is valid</fd:label>
+        </fd:group>
+        
+      </fd:widgets>
+    </fd:group>
+    
+    <!-- generic repeater -->
+    <fd:repeater id="genericRepeater">
+      <fd:widgets>
+        
+        <fd:row-action id="moveUp" action-command="move-up">
+          <fd:help>Move this record up.</fd:help>
+          <fd:label>Up</fd:label>
+        </fd:row-action>
+        
+        <fd:row-action id="moveDown" action-command="move-down">
+          <fd:help>Move this record down.</fd:help>
+          <fd:label>Down</fd:label>
+        </fd:row-action>
+        
+        <fd:row-action id="deleteRow" action-command="delete">
+          <fd:help>Remove this record.</fd:help>
+          <fd:label>Delete</fd:label>
+        </fd:row-action>
+        
+        <fd:row-action id="addNewRow" action-command="add-after">
+          <fd:help>Add a new record after this one.</fd:help>
+          <fd:label>Add</fd:label>
+        </fd:row-action>
+        
+      </fd:widgets>
+    </fd:repeater>
+    
+    <!-- person with an address -->
+    <fd:group id="postalPerson" extends="person">
+      <fd:widgets>
+        <fd:expand id="address"/>
+      </fd:widgets>
+    </fd:group>
+    
+    <!-- generic contact information for one person -->
+    <fd:group id="contact">
+      <fd:widgets>
+        
+        <fd:expand id="postalPerson"/>
+
+        <fd:repeater id="contactInformationRepeater" extends="genericRepeater">
+          <fd:widgets>
+            
+            <fd:expand id="contactInformation"/>
+            
+          </fd:widgets>
+        </fd:repeater>
+        <fd:repeater-action repeater="contactInformationRepeater" action-command="add-row" id="contactInformationRepeaterAddRow">
+          <fd:label>Add new record</fd:label>
+          <fd:help>Add a new record.</fd:help>
+        </fd:repeater-action>
+        
+      </fd:widgets>
+    </fd:group>
+    
+  </fd:widgets>
+</fd:library>

Propchange: cocoon/blocks/forms/trunk/samples/library/libraries/common-types/types_model.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/samples/library/libraries/common-types/types_model.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/samples/library/libraries/library_form1-second.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/libraries/library_form1-second.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/libraries/library_form1-second.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/libraries/library_form1-second.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<fd:library
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+  <fd:widgets>
+    
+    <fd:import prefix="ext" uri="library_form1.xml"/>
+    
+    <fd:class id="class1" extends="ext:class1">
+      <fd:widgets>
+        <fd:field id="field1-2">
+          <fd:label>Field1-2:</fd:label>
+          <fd:datatype base="string"/>
+        </fd:field>
+      </fd:widgets>
+    </fd:class>
+    
+    <fd:expand id="ext:field2"/>
+    
+  </fd:widgets>
+</fd:library>

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

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

Added: cocoon/blocks/forms/trunk/samples/library/libraries/library_form1-second_binding.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/libraries/library_form1-second_binding.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/libraries/library_form1-second_binding.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/libraries/library_form1-second_binding.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fb:library
+  xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" 
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" 
+  >
+  
+  <fb:import prefix="ext" uri="library_form1_binding.xml"/>
+  
+  <fb:class id="class1" extends="ext:class1">
+    <fb:value id="field1-2" path="field12"/>
+  </fb:class>
+  
+  <fb:expand id="ext:field2"/>
+  
+</fb:library>

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

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

Added: cocoon/blocks/forms/trunk/samples/library/libraries/library_form1.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/libraries/library_form1.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/libraries/library_form1.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/libraries/library_form1.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<fd:library
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+  <fd:widgets>
+  
+  	<!-- macro -->
+    <fd:class id="class1">
+      <fd:widgets>
+        <fd:field id="field1">
+          <fd:label>Field1:</fd:label>
+          <fd:datatype base="string"/>          
+        </fd:field>
+      </fd:widgets>
+    </fd:class>
+    
+    <!-- simple field -->
+    <fd:field id="field2">
+      <fd:label>Field2:</fd:label>
+      <fd:datatype base="string"/> 
+      <fd:help>
+        This is help text set by the library.
+        <small>Anyway, the point of all this was to show a popup help with mixed html content.</small>
+      </fd:help>       
+    </fd:field>
+    
+    <!-- field - validator inheritance -->
+    <fd:field id="email">
+      <fd:datatype base="string"/>
+      <fd:validation>
+        <fd:email/>
+      </fd:validation>
+      <fd:label>Enter an <b>email</b> address:</fd:label>
+      <fd:help>
+				global email adress
+      </fd:help>
+    </fd:field>   
+    
+    <!-- field - selection list inheritance -->
+    <fd:field id="account">
+      <fd:label>Indicate the size of your bank account (in m<sup>3</sup>):</fd:label>
+      <fd:datatype base="long"/>
+      <fd:selection-list>
+        <fd:item value="1"/>
+        <fd:item value="2"/>
+        <fd:item value="3">
+          <fd:label>three</fd:label>
+        </fd:item>
+        <fd:item value="4"/>
+        <fd:item value="5"/>
+      </fd:selection-list>
+    </fd:field>    
+    
+    <!-- multi value field -->
+    <fd:multivaluefield id="drinks">
+      <fd:label>Indicate which 2 of the following drinks you'd like to receive:</fd:label>
+      <fd:datatype base="string"/>
+      <!--fd:validation>
+        <fd:value-count exact="2"/>
+      </fd:validation-->
+      <fd:selection-list>
+        <fd:item value="Maes"/>
+        <fd:item value="Jupiler"/>
+        <fd:item value="Leffe"/>
+        <fd:item value="Hoegaarden"/>
+        <fd:item value="Coca Cola"/>
+      </fd:selection-list>
+    </fd:multivaluefield>    
+    
+  </fd:widgets>
+</fd:library>

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

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

Added: cocoon/blocks/forms/trunk/samples/library/libraries/library_form1_binding.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/libraries/library_form1_binding.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/libraries/library_form1_binding.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/libraries/library_form1_binding.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fb:library
+  xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" 
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" 
+  >
+  
+  <fb:class id="class1">
+    <fb:value id="field1" path="field1"/>
+  </fb:class>
+  
+  <fb:value id="field2" path="field2"/>
+  
+</fb:library>

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

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

Added: cocoon/blocks/forms/trunk/samples/library/resources/result_jx.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/resources/result_jx.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/resources/result_jx.xml (added)
+++ cocoon/blocks/forms/trunk/samples/library/resources/result_jx.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+  ${document}
+</jx:template>

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

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

Added: cocoon/blocks/forms/trunk/samples/library/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/library/sitemap.xmap?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/samples/library/sitemap.xmap (added)
+++ cocoon/blocks/forms/trunk/samples/library/sitemap.xmap Fri Sep 16 06:46:22 2005
@@ -0,0 +1,163 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+  
+  <map:components>
+    
+    <map:transformers default="xslt">    
+      <map:transformer name="i18n" src="org.apache.cocoon.transformation.I18nTransformer">
+        <catalogues default="other">
+          <catalogue id="other" name="OtherMessages" location="messages"/>
+          <catalogue id="forms" name="FormsMessages" location="messages"/>
+        </catalogues>
+        <cache-at-startup>true</cache-at-startup>
+      </map:transformer>
+    </map:transformers>
+    
+    <map:actions>
+      <map:action name="make-form" src="org.apache.cocoon.forms.acting.MakeFormAction" logger="forms"/>
+      <map:action name="init-form" src="org.apache.cocoon.forms.samples.InitForm1Action" logger="forms"/>
+      <map:action name="handle-form-submit" src="org.apache.cocoon.forms.acting.HandleFormSubmitAction" logger="forms"/>
+    </map:actions>
+    
+    <map:pipes default="caching">
+      <map:pipe name="caching" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/>
+      <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
+    </map:pipes>
+    
+  </map:components>
+  
+  <map:views>
+    <map:view name="content" from-label="content">
+      <map:serialize type="xml"/>
+    </map:view>
+    
+    <map:view from-label="content" name="pretty-content">
+      <map:transform src="context://stylesheets/system/xml2html.xslt"/>
+      <map:serialize type="html"/>
+    </map:view>
+    
+    <map:view name="form" from-label="form">
+      <map:serialize type="xml"/>
+    </map:view>
+    
+    <map:view name="links" from-position="last">
+      <map:serialize type="links"/>
+    </map:view>
+  </map:views>
+  
+  <map:resources>
+    <!-- this will later become a virtual transformer -->
+    <map:resource name="simple-page2html">
+      <map:transform src="context://samples/common/style/xsl/html/simple-page2html.xsl">
+        <map:parameter name="contextPath" value="{request:contextPath}"/>
+        <map:parameter name="servletPath" value="{request:servletPath}"/>
+        <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
+        <map:parameter name="file" value="{file}"/>
+        <map:parameter name="remove" value="{../0}"/>
+      </map:transform> 
+    </map:resource>
+  </map:resources>
+  
+  <!-- indicates what flowscript to attach to this sitemap -->
+  <map:flow language="javascript">
+    <map:script src="flow/library.js"/>
+  </map:flow>
+  
+  <map:pipelines>
+    
+    <map:pipeline type="caching">
+      
+      <map:match pattern="library/**">
+        <map:read src="libraries/{1}"/>
+      </map:match>
+      
+    </map:pipeline>
+    <map:pipeline type="noncaching">
+      
+      <map:match pattern="">
+        <map:generate src="index.xml"/>
+        <map:serialize/>
+      </map:match>
+      
+      
+      
+      <map:match pattern="*.continue">
+        <map:call continuation="{1}"/>
+      </map:match>
+      
+      <map:match pattern="*-display-pipeline">
+        <!-- pipeline to show the form -->
+        <map:generate type="jx" src="forms/{1}_template.xml"/>
+        <map:transform type="forms"/>
+        <map:transform type="i18n" label="form">
+          <map:parameter name="locale" value="en-US"/>
+        </map:transform>
+        <map:call resource="simple-page2html">
+          <map:parameter name="file" value="forms/{1}_template.xml"/>
+        </map:call>
+        <map:transform src="../resources/forms-samples-styling.xsl"/>
+        <map:serialize/>
+      </map:match>
+      
+      <map:match pattern="*-error-pipeline">
+        <map:generate src="error.xml"/>
+        <map:serialize/>
+      </map:match>
+      
+      <map:match pattern="*-success-pipeline.jx">
+        <map:generate type="jx" src="resources/result_jx.xml"/>
+        <map:call resource="simple-page2html">
+          <map:parameter name="file" value="resources/result_jx.xml"/>
+        </map:call>
+        <map:serialize type="xml"/>
+      </map:match>
+      
+      <map:match pattern="resources/**">
+        <map:read src="resource://org/apache/cocoon/forms/{0}"/>
+      </map:match>
+      
+      
+      
+      <!--
+         | Sample building a forms-form-gui editor in forms
+         | Doubles as a showcase for class, new, struct, union widgets
+         -->
+      
+      <!-- TODO: Fix edit-any-file security hole! -->
+      <map:match pattern="*.flow">
+        <map:call function="handleForm">
+          <map:parameter name="function" value="show_{1}"/>
+          <map:parameter name="form-definition" value="forms/{1}_model.xml"/>
+          <map:parameter name="bindingURI" value="forms/{1}_binding.xml"/>
+        </map:call>
+      </map:match>
+      
+      
+      <map:match pattern="*">
+        <map:redirect-to uri="{1}/"/>
+      </map:match>
+      
+      <map:match pattern="*/**">
+        <map:mount check-reload="yes" src="{1}/" uri-prefix="{1}"/>
+      </map:match>
+      
+    </map:pipeline>
+  </map:pipelines>
+  
+</map:sitemap>

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

Propchange: cocoon/blocks/forms/trunk/samples/library/sitemap.xmap
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/blocks/forms/trunk/samples/messages/FormsMessages_de.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/messages/FormsMessages_de.xml?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/samples/messages/FormsMessages_de.xml (original)
+++ cocoon/blocks/forms/trunk/samples/messages/FormsMessages_de.xml Fri Sep 16 06:46:22 2005
@@ -19,7 +19,6 @@
   <message key="validation.captcha.mismatch">Ungültige CAPTCHA check.</message>
 
   <message key="general.field-required">Dieses Feld muss aufgefüllt werden.</message>
-
   <message key="datatype.conversion-failed">Ungültige {0}.</message>
   <message key="datatype.decimal">Dezimalzahl</message>
   <message key="datatype.integer">natürliche Zahl</message>

Modified: cocoon/blocks/forms/trunk/samples/messages/FormsMessages_pl.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/messages/FormsMessages_pl.xml?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/samples/messages/FormsMessages_pl.xml (original)
+++ cocoon/blocks/forms/trunk/samples/messages/FormsMessages_pl.xml Fri Sep 16 06:46:22 2005
@@ -17,6 +17,7 @@
 <!-- This catalogue file contains translations for built-in CForms messages. -->
 <catalogue>
   <message key="validation.captcha.mismatch">#CAPTCHA check failed.#</message>
+  
   <message key="general.field-required">To pole jest wymagane.</message>
 
   <message key="datatype.conversion-failed">Niepoprawna wartość typu: {0}.</message>

Modified: cocoon/blocks/forms/trunk/samples/messages/FormsMessages_zh_CN.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/messages/FormsMessages_zh_CN.xml?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/samples/messages/FormsMessages_zh_CN.xml (original)
+++ cocoon/blocks/forms/trunk/samples/messages/FormsMessages_zh_CN.xml Fri Sep 16 06:46:22 2005
@@ -17,6 +17,7 @@
 <!-- This catalogue file contains translations for built-in CForms messages. -->
 <catalogue>
   <message key="validation.captcha.mismatch">#CAPTCHA check failed.#</message>
+  
   <message key="general.field-required">此域是必须的</message>
 
   <message key="datatype.conversion-failed">不是一个有效的{0}类型.</message>

Modified: cocoon/blocks/forms/trunk/samples/v2/carselector_template.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/v2/carselector_template.xml?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/samples/v2/carselector_template.xml (original)
+++ cocoon/blocks/forms/trunk/samples/v2/carselector_template.xml Fri Sep 16 06:46:22 2005
@@ -74,6 +74,6 @@
     </ft:form-template>
   </content>
   <para>
-    <a href="../">Back to samples</a>
+    <a href="./">Back to samples</a>
   </para>
 </page>

Modified: cocoon/blocks/forms/trunk/samples/welcome.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/samples/welcome.xml?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/samples/welcome.xml (original)
+++ cocoon/blocks/forms/trunk/samples/welcome.xml Fri Sep 16 06:46:22 2005
@@ -156,4 +156,13 @@
   <sample name="Swan" href="swan/">Start page</sample>
  </group>
 
+  <group name="Forms Library samples">
+    <note>
+      This demonstrates the new library subsystem of Cocoon Forms.
+    </note>
+    <sample name="Basic Sample" href="library/form1.flow">Basic Sample</sample>
+    <sample name="Basic Sample 2" href="library/form2.flow">Basic Sample 2 (depends on the same library as above, see how it still changes after editing the library and reloading the first)</sample>
+    <sample name="Hotel Booking Sample" href="library/hotel.flow">Hotel Booking Sample, elaborate use of libraries.</sample>
+  </group>
+
 </samples>

Added: cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.java?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.java (added)
+++ cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.java Fri Sep 16 06:46:22 2005
@@ -0,0 +1,49 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.cocoon.forms.formmodel;
+
+import junit.framework.Assert;
+
+import org.apache.cocoon.core.container.ContainerTestCase;
+import org.apache.cocoon.forms.datatype.typeimpl.IntegerType;
+
+/**
+ * Test case for CForm's group widget and inheritance
+ *
+ * @version $Id$
+ */
+
+public class GroupTestCase extends ContainerTestCase {
+
+    /**
+     * checks for correct inheritance
+     */
+    public void testInheritance() throws Exception {
+        Form form = WidgetTestHelper.loadForm(getManager(), this, "GroupTestCase.model.xml");
+        Field field1 = (Field)((Group)form.getChild("group2")).getChild("field1");
+        Field field2 = (Field)((Group)form.getChild("group2")).getChild("field2");
+        Field field3 = (Field)((Group)form.getChild("group2")).getChild("field3");
+        Group group2 = (Group)form.getChild("group2");
+        
+        Assert.assertNotNull("Inherited field present", field1 );
+        Assert.assertNotNull("Added field present", field2 );
+        Assert.assertNotNull("Internally inherited field present", field3 );
+        
+        // check datatype
+        Assert.assertTrue("Datatype of internally inherited field", field3.getDatatype() instanceof IntegerType);
+    }
+}

Propchange: cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.model.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.model.xml?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.model.xml (added)
+++ cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.model.xml Fri Sep 16 06:46:22 2005
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition">
+    <fd:widgets>
+        
+        <fd:group id="group1">
+            <fd:widgets>
+                <fd:field id="field1">
+                    <fd:label>Field1</fd:label>
+                    <fd:datatype base="integer"/>
+                 </fd:field>
+            </fd:widgets>
+        </fd:group>
+        
+        <fd:group id="group2" extends="group1">
+            <fd:widgets>
+                <fd:field id="field2">
+                    <fd:label>Field2</fd:label>
+                    <fd:datatype base="string"/>
+                </fd:field>
+                <fd:field id="field3" extends="field1"/>
+            </fd:widgets>
+        </fd:group>
+        
+    </fd:widgets>
+</fd:form>

Propchange: cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.model.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.model.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.xtest
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.xtest?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.xtest (added)
+++ cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.xtest Fri Sep 16 06:46:22 2005
@@ -0,0 +1,91 @@
+<?xml version="1.0" ?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<testcase>
+ <roles>
+
+  <role name="org.apache.cocoon.forms.datatype.DatatypeManager"
+        shorthand="forms-datatype"
+        default-class="org.apache.cocoon.forms.datatype.DefaultDatatypeManager"/>
+
+  <role name="org.apache.cocoon.forms.expression.ExpressionManager"
+    shorthand="forms-expression"
+    default-class="org.apache.cocoon.forms.expression.DefaultExpressionManager"/>
+
+  <role name="org.apache.cocoon.forms.FormManager"
+        shorthand="forms-formmanager"
+        default-class="org.apache.cocoon.forms.DefaultFormManager"/>
+
+  <role name="org.apache.cocoon.forms.CacheManager"
+        shorthand="forms-cachemanager"
+        default-class="org.apache.cocoon.forms.DefaultCacheManager"/>
+
+  <role name="org.apache.cocoon.forms.validation.WidgetValidatorBuilderSelector"
+        shorthand="forms-validators"
+        default-class="org.apache.cocoon.core.container.DefaultServiceSelector"/>
+
+  <role name="org.apache.cocoon.forms.event.WidgetListenerBuilderSelector"
+        shorthand="forms-widgetlisteners"
+        default-class="org.apache.cocoon.core.container.DefaultServiceSelector"/>
+</roles>
+
+ <components>
+  <forms-datatype logger="forms">
+    <datatypes>
+      <datatype name="string" src="org.apache.cocoon.forms.datatype.typeimpl.StringTypeBuilder">
+        <convertors default="dummy" plain="dummy">
+          <convertor name="dummy" src="org.apache.cocoon.forms.datatype.convertor.DummyStringConvertorBuilder"/>
+        </convertors>
+      </datatype>
+      <datatype name="integer" src="org.apache.cocoon.forms.datatype.typeimpl.IntegerTypeBuilder">
+        <convertors default="formatting" plain="plain">
+          <convertor name="plain" src="org.apache.cocoon.forms.datatype.convertor.PlainIntegerConvertorBuilder"/>
+          <convertor name="formatting" src="org.apache.cocoon.forms.datatype.convertor.FormattingIntegerConvertorBuilder"/>
+        </convertors>
+      </datatype>
+      <datatype name="float" src="org.apache.cocoon.forms.datatype.typeimpl.FloatTypeBuilder">
+        <convertors default="formatting" plain="plain">
+          <convertor name="plain" src="org.apache.cocoon.forms.datatype.convertor.PlainFloatConvertorBuilder"/>
+        </convertors>
+      </datatype>
+    </datatypes>
+    <!--validation-rules>
+      <validation-rule name="range" src="org.apache.cocoon.forms.datatype.validationruleimpl.RangeValidationRuleBuilder"/>
+    </validation-rules-->
+  </forms-datatype>
+ 	
+  <forms-validators>
+    <validator name="range" class="org.apache.cocoon.forms.validation.impl.RangeValidatorBuilder"/>
+  </forms-validators>
+  
+  <forms-formmanager>
+    <widgets>
+      <widget name="form" src="org.apache.cocoon.forms.formmodel.FormDefinitionBuilder"/>
+      <widget name="group" src="org.apache.cocoon.forms.formmodel.GroupDefinitionBuilder"/>
+      <widget name="field" src="org.apache.cocoon.forms.formmodel.FieldDefinitionBuilder"/>
+      <widget name="action" src="org.apache.cocoon.forms.formmodel.ActionDefinitionBuilder"/>
+    </widgets>
+  </forms-formmanager>
+  
+  <forms-expression logger="forms.expression"/>
+  
+  <forms-cachemanager logger="forms.cache"/>
+  
+  <forms-widgetlisteners logger="forms.listeners"/>
+
+ </components>
+
+</testcase>

Modified: cocoon/trunk/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/status.xml?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/trunk/status.xml (original)
+++ cocoon/trunk/status.xml Fri Sep 16 06:46:22 2005
@@ -561,6 +561,12 @@
    </action>
   </release>
   <release version="2.1.8" date="TBD">
+	 <action dev="SW" type="add" due-to="Max Pfingsthorn" due-to-email="max.pfingsthorn@gmail.com">
+		CForms block: new form libraries features. You can now define form definition and binding
+		library files and import them for reuse and/or extension in regular definition and binding files.
+		<br/>
+		This is the result of the Max Pfingsthorn's Google Summer of Code (GSoC) project.
+	 </action>
     <action dev="SW" type="update">
       When the upload size exceeds the configured limit, an RejectedPart is associated to the request
       rather than throwing a exception at the servlet level. This allows the application to handle



Mime
View raw message