cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject svn commit: r289538 [1/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
Author: sylvain
Date: Fri Sep 16 06:46:22 2005
New Revision: 289538

URL: http://svn.apache.org/viewcvs?rev=289538&view=rev
Log:
Merge GSoC libraries and 2.1 branches

Added:
    cocoon/blocks/forms/trunk/conf/
    cocoon/blocks/forms/trunk/conf/README.txt   (with props)
    cocoon/blocks/forms/trunk/conf/forms-binding.xconf   (with props)
    cocoon/blocks/forms/trunk/conf/forms-binding.xroles
    cocoon/blocks/forms/trunk/conf/forms-cache.xroles
    cocoon/blocks/forms/trunk/conf/forms-category.xlog
    cocoon/blocks/forms/trunk/conf/forms-datatype.xconf   (with props)
    cocoon/blocks/forms/trunk/conf/forms-datatype.xroles
    cocoon/blocks/forms/trunk/conf/forms-expression.xconf   (with props)
    cocoon/blocks/forms/trunk/conf/forms-expression.xroles
    cocoon/blocks/forms/trunk/conf/forms-form.xconf   (with props)
    cocoon/blocks/forms/trunk/conf/forms-form.xroles
    cocoon/blocks/forms/trunk/conf/forms-generator.xmap   (with props)
    cocoon/blocks/forms/trunk/conf/forms-selection-lists.xconf   (with props)
    cocoon/blocks/forms/trunk/conf/forms-selection-lists.xroles
    cocoon/blocks/forms/trunk/conf/forms-target.xlog
    cocoon/blocks/forms/trunk/conf/forms-transformator.xmap   (with props)
    cocoon/blocks/forms/trunk/conf/forms-validators.xconf   (with props)
    cocoon/blocks/forms/trunk/conf/forms-validators.xroles
    cocoon/blocks/forms/trunk/conf/forms-widgetlisteners.xconf   (with props)
    cocoon/blocks/forms/trunk/conf/forms-widgetlisteners.xroles
    cocoon/blocks/forms/trunk/conf/forms.xsamples
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/BindingBuilderContext.java   (with props)
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ExpandJXPathBindingBuilder.java   (with props)
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ImportJXPathBinding.java   (with props)
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ImportJXPathBindingBuilder.java   (with props)
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/library/
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/library/Library.java   (with props)
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/library/LibraryException.java   (with props)
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/library/LibraryManager.java   (with props)
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/library/LibraryManagerImpl.java   (with props)
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/AbstractContainerDefinitionBuilder.java   (with props)
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/ExpandDefinitionBuilder.java   (with props)
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/ImportDefinitionBuilder.java   (with props)
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/IncompletenessException.java   (with props)
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/WidgetDefinitionBuilderContext.java   (with props)
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/library/
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/library/Library.java   (with props)
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/library/LibraryException.java   (with props)
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/library/LibraryManager.java   (with props)
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/library/LibraryManagerImpl.java   (with props)
    cocoon/blocks/forms/trunk/samples/forms/textresult_template.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/
    cocoon/blocks/forms/trunk/samples/library/flow/
    cocoon/blocks/forms/trunk/samples/library/flow/library.js   (with props)
    cocoon/blocks/forms/trunk/samples/library/forms/
    cocoon/blocks/forms/trunk/samples/library/forms/form1_binding.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/forms/form1_data.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/forms/form1_model.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/forms/form1_template.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/forms/form2_binding.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/forms/form2_data.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/forms/form2_model.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/forms/form2_template.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/forms/hotel_binding.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/forms/hotel_data.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/forms/hotel_model.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/forms/hotel_template.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/libraries/
    cocoon/blocks/forms/trunk/samples/library/libraries/common-types/
    cocoon/blocks/forms/trunk/samples/library/libraries/common-types/types_binding.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/libraries/common-types/types_model.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/libraries/library_form1-second.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/libraries/library_form1-second_binding.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/libraries/library_form1.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/libraries/library_form1_binding.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/resources/
    cocoon/blocks/forms/trunk/samples/library/resources/result_jx.xml   (with props)
    cocoon/blocks/forms/trunk/samples/library/sitemap.xmap   (with props)
    cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.java   (with props)
    cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.model.xml   (with props)
    cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/GroupTestCase.xtest
Modified:
    cocoon/blocks/forms/trunk/WEB-INF/xconf/cocoon-forms.xconf
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/DefaultCacheManager.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/DefaultFormManager.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/AbstractCustomBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/AggregateJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/AggregateJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/Binding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/CaseJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/CaseJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ClassJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ComposedJXPathBindingBase.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ContextJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ContextJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/CustomJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/CustomJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/DeleteNodeJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/GroupJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/GroupJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/InsertBeanJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/InsertBeanJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/InsertNodeJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/InsertNodeJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/JXPathBindingBase.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/JXPathBindingBuilderBase.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/JXPathBindingManager.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/JavaScriptJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/JavaScriptJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/MultiValueJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/MultiValueJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/NewJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/NewJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/RepeaterJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/RepeaterJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/SetAttributeJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/SetAttributeJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/SimpleRepeaterJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/SimpleRepeaterJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/StructJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/StructJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/TempRepeaterJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/TempRepeaterJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/UnionJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/UnionJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ValueJXPathBinding.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ValueJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/DefaultSelectionListBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/DynamicSelectionList.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/event/ImageMapEvent.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/expression/DefaultExpressionManager.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/flow/javascript/ScriptableWidget.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/AbstractContainerDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/AbstractDatatypeWidgetDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/AbstractDatatypeWidgetDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/AbstractWidget.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/AbstractWidgetDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/AbstractWidgetDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/ActionDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/AggregateFieldDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/AggregateFieldDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/BooleanFieldDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/BooleanFieldDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/ButtonDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/CaptchaFieldDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/ClassDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/FieldDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/FieldDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/FormDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/FormDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/GroupDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/ImageMap.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/ImageMapDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/MultiValueFieldDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/MultiValueFieldDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/NewDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/RepeaterActionDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/RepeaterDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/RepeaterDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/StructDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/SubmitDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/UnionDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/UnionDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/Upload.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/UploadDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/UploadDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/Widget.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/WidgetDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/WidgetDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/WidgetDefinitionList.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/WidgetList.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/generation/JXMacrosHelper.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/generation/jx-macros.xml
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/forms-calendar-styling.xsl
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/transformation/EffectPipe.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/transformation/FormsPipelineConfig.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/util/DomHelper.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/util/JavaScriptHelper.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/validation/WidgetValidatorBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/validation/impl/JavaScriptValidatorBuilder.java
    cocoon/blocks/forms/trunk/samples/captcha/forms/captcha.tpl.xml
    cocoon/blocks/forms/trunk/samples/captcha/sitemap.xmap
    cocoon/blocks/forms/trunk/samples/dreamteam/content/showTeam.jx
    cocoon/blocks/forms/trunk/samples/dreamteam/content/soccer.xml
    cocoon/blocks/forms/trunk/samples/dreamteam/content/teamTemplate.jx
    cocoon/blocks/forms/trunk/samples/dreamteam/flow/team.js
    cocoon/blocks/forms/trunk/samples/dreamteam/messages/DreamTeamMessages.xml
    cocoon/blocks/forms/trunk/samples/dreamteam/messages/DreamTeamMessages_de.xml
    cocoon/blocks/forms/trunk/samples/dreamteam/messages/DreamTeamMessages_it.xml
    cocoon/blocks/forms/trunk/samples/dreamteam/messages/FormsMessages.xml
    cocoon/blocks/forms/trunk/samples/dreamteam/messages/FormsMessages_nl_NL.xml
    cocoon/blocks/forms/trunk/samples/dreamteam/resources/styles/dreamteam.css
    cocoon/blocks/forms/trunk/samples/forms/dynamicrepeater_template.xml
    cocoon/blocks/forms/trunk/samples/messages/FormsMessages_de.xml
    cocoon/blocks/forms/trunk/samples/messages/FormsMessages_pl.xml
    cocoon/blocks/forms/trunk/samples/messages/FormsMessages_zh_CN.xml
    cocoon/blocks/forms/trunk/samples/v2/carselector_template.xml
    cocoon/blocks/forms/trunk/samples/welcome.xml
    cocoon/trunk/status.xml

Modified: cocoon/blocks/forms/trunk/WEB-INF/xconf/cocoon-forms.xconf
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/WEB-INF/xconf/cocoon-forms.xconf?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/WEB-INF/xconf/cocoon-forms.xconf (original)
+++ cocoon/blocks/forms/trunk/WEB-INF/xconf/cocoon-forms.xconf Fri Sep 16 06:46:22 2005
@@ -44,6 +44,8 @@
       <binding name="new" src="org.apache.cocoon.forms.binding.NewJXPathBindingBuilder"/>
       <binding name="struct" src="org.apache.cocoon.forms.binding.StructJXPathBindingBuilder"/>
       <binding name="union" src="org.apache.cocoon.forms.binding.UnionJXPathBindingBuilder"/>
+      <binding name="expand" src="org.apache.cocoon.forms.binding.ExpandJXPathBindingBuilder"/>
+      <binding name="import" src="org.apache.cocoon.forms.binding.ImportJXPathBindingBuilder"/>
     </bindings>
   </forms-binding>
 
@@ -138,6 +140,8 @@
   <forms-formmanager>
     <widgets>
       <widget name="form" src="org.apache.cocoon.forms.formmodel.FormDefinitionBuilder"/>
+      <widget name="import" src="org.apache.cocoon.forms.formmodel.ImportDefinitionBuilder"/>
+      <widget name="expand" src="org.apache.cocoon.forms.formmodel.ExpandDefinitionBuilder"/>
       <widget name="field" src="org.apache.cocoon.forms.formmodel.FieldDefinitionBuilder"/>
       <widget name="group" src="org.apache.cocoon.forms.formmodel.GroupDefinitionBuilder"/>
       <widget name="repeater" src="org.apache.cocoon.forms.formmodel.RepeaterDefinitionBuilder"/>

Added: cocoon/blocks/forms/trunk/conf/README.txt
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/README.txt?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/README.txt (added)
+++ cocoon/blocks/forms/trunk/conf/README.txt Fri Sep 16 06:46:22 2005
@@ -0,0 +1,2 @@
+These configuration files are only used for Cocoon 2.1 build.
+Config files for 2.2 are in WEB-INF and are automatically included at run time.

Propchange: cocoon/blocks/forms/trunk/conf/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/conf/README.txt
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/conf/forms-binding.xconf
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-binding.xconf?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-binding.xconf (added)
+++ cocoon/blocks/forms/trunk/conf/forms-binding.xconf Fri Sep 16 06:46:22 2005
@@ -0,0 +1,46 @@
+<?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.
+-->
+
+<xconf xpath="/cocoon" unless="@version != '2.1' or forms-binding">
+       
+  <forms-binding logger="forms.binding">
+    <bindings>
+      <binding name="value" src="org.apache.cocoon.forms.binding.ValueJXPathBindingBuilder"/>
+      <binding name="multi-value" src="org.apache.cocoon.forms.binding.MultiValueJXPathBindingBuilder"/>
+      <binding name="context" src="org.apache.cocoon.forms.binding.ContextJXPathBindingBuilder"/>
+      <binding name="repeater" src="org.apache.cocoon.forms.binding.RepeaterJXPathBindingBuilder"/>
+      <binding name="simple-repeater" src="org.apache.cocoon.forms.binding.SimpleRepeaterJXPathBindingBuilder"/>
+      <binding name="temp-repeater" src="org.apache.cocoon.forms.binding.TempRepeaterJXPathBindingBuilder"/>
+      <binding name="aggregate" src="org.apache.cocoon.forms.binding.AggregateJXPathBindingBuilder"/>
+      <binding name="set-attribute" src="org.apache.cocoon.forms.binding.SetAttributeJXPathBindingBuilder"/>
+      <binding name="insert-node" src="org.apache.cocoon.forms.binding.InsertNodeJXPathBindingBuilder"/>
+      <binding name="delete-node" src="org.apache.cocoon.forms.binding.DeleteNodeJXPathBindingBuilder"/>
+      <binding name="insert-bean" src="org.apache.cocoon.forms.binding.InsertBeanJXPathBindingBuilder"/>
+      <binding name="javascript" src="org.apache.cocoon.forms.binding.JavaScriptJXPathBindingBuilder"/>
+      <binding name="custom" src="org.apache.cocoon.forms.binding.CustomJXPathBindingBuilder" />
+      <binding name="case" src="org.apache.cocoon.forms.binding.CaseJXPathBindingBuilder"/>
+      <binding name="class" src="org.apache.cocoon.forms.binding.ClassJXPathBindingBuilder"/>
+      <binding name="new" src="org.apache.cocoon.forms.binding.NewJXPathBindingBuilder"/>
+      <binding name="struct" src="org.apache.cocoon.forms.binding.StructJXPathBindingBuilder"/>
+      <binding name="union" src="org.apache.cocoon.forms.binding.UnionJXPathBindingBuilder"/>
+      <binding name="group" src="org.apache.cocoon.forms.binding.GroupJXPathBindingBuilder"/>
+      <binding name="expand" src="org.apache.cocoon.forms.binding.ExpandJXPathBindingBuilder"/>
+      <binding name="import" src="org.apache.cocoon.forms.binding.ImportJXPathBindingBuilder"/>
+    </bindings>
+  </forms-binding>
+
+</xconf>

Propchange: cocoon/blocks/forms/trunk/conf/forms-binding.xconf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/conf/forms-binding.xconf
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/conf/forms-binding.xroles
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-binding.xroles?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-binding.xroles (added)
+++ cocoon/blocks/forms/trunk/conf/forms-binding.xroles Fri Sep 16 06:46:22 2005
@@ -0,0 +1,24 @@
+<?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.
+-->
+
+<xroles xpath="/role-list"
+        unless="/role-list[@cocoon-version != '2.1']|role[@name='org.apache.cocoon.forms.binding.BindingManager']">
+
+  <role name="org.apache.cocoon.forms.binding.BindingManager"
+        shorthand="forms-binding"
+        default-class="org.apache.cocoon.forms.binding.JXPathBindingManager"/>
+</xroles>

Added: cocoon/blocks/forms/trunk/conf/forms-cache.xroles
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-cache.xroles?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-cache.xroles (added)
+++ cocoon/blocks/forms/trunk/conf/forms-cache.xroles Fri Sep 16 06:46:22 2005
@@ -0,0 +1,23 @@
+<?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.
+-->
+
+<xroles xpath="/role-list" unless="/role-list[@cocoon-version != '2.1']|role[@name='org.apache.cocoon.forms.CacheManager']">
+
+  <role name="org.apache.cocoon.forms.CacheManager"
+        shorthand="forms-cachemanager"
+        default-class="org.apache.cocoon.forms.DefaultCacheManager"/>
+</xroles>

Added: cocoon/blocks/forms/trunk/conf/forms-category.xlog
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-category.xlog?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-category.xlog (added)
+++ cocoon/blocks/forms/trunk/conf/forms-category.xlog Fri Sep 16 06:46:22 2005
@@ -0,0 +1,28 @@
+<?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.
+-->
+
+<!-- mind how xpatch oddly requires the file extension to 
+	be equal to the root elm -->
+	
+<xlog xpath="/logkit/categories" 
+      unless="category[@name='forms']">
+    
+    <category log-level="${build.webapp.loglevel}" name="forms">
+      <log-target id-ref="forms" />
+    </category>
+    
+</xlog>

Added: cocoon/blocks/forms/trunk/conf/forms-datatype.xconf
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-datatype.xconf?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-datatype.xconf (added)
+++ cocoon/blocks/forms/trunk/conf/forms-datatype.xconf Fri Sep 16 06:46:22 2005
@@ -0,0 +1,96 @@
+<?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.
+-->
+
+<xconf xpath="/cocoon" unless="@version != '2.1' or forms-datatype">
+
+  <!--+
+      | forms's datatypes and validation rules.
+      +-->
+  <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"/>
+          <convertor name="htmlcleaner" src="org.apache.cocoon.forms.datatype.convertor.HtmlCleaningConvertorBuilder"/>
+        </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="long" src="org.apache.cocoon.forms.datatype.typeimpl.LongTypeBuilder">
+        <convertors default="formatting" plain="plain">
+          <convertor name="plain" src="org.apache.cocoon.forms.datatype.convertor.PlainLongConvertorBuilder"/>
+          <convertor name="formatting" src="org.apache.cocoon.forms.datatype.convertor.FormattingLongConvertorBuilder"/>
+        </convertors>
+      </datatype>
+      <datatype name="decimal" src="org.apache.cocoon.forms.datatype.typeimpl.DecimalTypeBuilder">
+        <convertors default="formatting" plain="plain">
+          <convertor name="plain" src="org.apache.cocoon.forms.datatype.convertor.PlainDecimalConvertorBuilder"/>
+          <convertor name="formatting" src="org.apache.cocoon.forms.datatype.convertor.FormattingDecimalConvertorBuilder"/>
+        </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"/>
+          <convertor name="formatting" src="org.apache.cocoon.forms.datatype.convertor.FormattingFloatConvertorBuilder"/>
+        </convertors>
+      </datatype>
+      <datatype name="double" src="org.apache.cocoon.forms.datatype.typeimpl.DoubleTypeBuilder">
+        <convertors default="formatting" plain="plain">
+          <convertor name="plain" src="org.apache.cocoon.forms.datatype.convertor.PlainDoubleConvertorBuilder"/>
+          <convertor name="formatting" src="org.apache.cocoon.forms.datatype.convertor.FormattingDoubleConvertorBuilder"/>
+        </convertors>
+      </datatype>
+      <datatype name="date" src="org.apache.cocoon.forms.datatype.typeimpl.DateTypeBuilder">
+        <convertors default="formatting" plain="millis">
+          <convertor name="formatting" src="org.apache.cocoon.forms.datatype.convertor.FormattingDateConvertorBuilder"/>
+          <convertor name="millis" src="org.apache.cocoon.forms.datatype.convertor.MillisDateConvertorBuilder"/>
+          <convertor name="icu4j" src="org.apache.cocoon.forms.datatype.convertor.Icu4jDateConvertorBuilder"/>
+        </convertors>
+      </datatype>
+      <datatype name="boolean" src="org.apache.cocoon.forms.datatype.typeimpl.BooleanTypeBuilder">
+        <convertors default="plain" plain="plain">
+          <convertor name="plain" src="org.apache.cocoon.forms.datatype.convertor.PlainBooleanConvertorBuilder"/>
+        </convertors>
+      </datatype>  
+      <datatype name="enum" src="org.apache.cocoon.forms.datatype.typeimpl.EnumTypeBuilder">
+        <convertors default="enum" plain="enum">
+          <convertor name="enum" src="org.apache.cocoon.forms.datatype.convertor.EnumConvertorBuilder"/>
+        </convertors>
+      </datatype>
+      <datatype name="bean" src="org.apache.cocoon.forms.datatype.typeimpl.BeanTypeBuilder">
+        <convertors default="bean" plain="bean">
+          <convertor name="bean" src="org.apache.cocoon.forms.datatype.convertor.BeanConvertorBuilder"/>
+        </convertors>
+      </datatype>
+    </datatypes>
+    <validation-rules>
+      <!-- old-style datatype validators (deprecated) -->
+      <validation-rule name="length" src="org.apache.cocoon.forms.datatype.validationruleimpl.LengthValidationRuleBuilder"/>
+      <validation-rule name="email" src="org.apache.cocoon.forms.datatype.validationruleimpl.EmailValidationRuleBuilder"/>
+      <validation-rule name="value-count" src="org.apache.cocoon.forms.datatype.validationruleimpl.ValueCountValidationRuleBuilder"/>
+      <validation-rule name="range" src="org.apache.cocoon.forms.datatype.validationruleimpl.RangeValidationRuleBuilder"/>
+      <validation-rule name="assert" src="org.apache.cocoon.forms.datatype.validationruleimpl.AssertValidationRuleBuilder"/>
+      <validation-rule name="mod10" src="org.apache.cocoon.forms.datatype.validationruleimpl.Mod10ValidationRuleBuilder"/>
+      <validation-rule name="regexp" src="org.apache.cocoon.forms.datatype.validationruleimpl.RegExpValidationRuleBuilder"/>
+    </validation-rules>
+  </forms-datatype>
+  
+</xconf>

Propchange: cocoon/blocks/forms/trunk/conf/forms-datatype.xconf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/conf/forms-datatype.xconf
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/conf/forms-datatype.xroles
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-datatype.xroles?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-datatype.xroles (added)
+++ cocoon/blocks/forms/trunk/conf/forms-datatype.xroles Fri Sep 16 06:46:22 2005
@@ -0,0 +1,23 @@
+<?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.
+-->
+
+<xroles xpath="/role-list" unless="/role-list[@cocoon-version != '2.1']|role[@name='org.apache.cocoon.forms.datatype.DatatypeManager']">
+
+  <role name="org.apache.cocoon.forms.datatype.DatatypeManager"
+        shorthand="forms-datatype"
+        default-class="org.apache.cocoon.forms.datatype.DefaultDatatypeManager"/>
+</xroles>

Added: cocoon/blocks/forms/trunk/conf/forms-expression.xconf
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-expression.xconf?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-expression.xconf (added)
+++ cocoon/blocks/forms/trunk/conf/forms-expression.xconf Fri Sep 16 06:46:22 2005
@@ -0,0 +1,25 @@
+<?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.
+-->
+
+<xconf xpath="/cocoon" unless="@version != '2.1' or forms-expression">
+
+  <forms-expression logger="forms.expression">
+    <function name="Null" class="org.apache.cocoon.forms.expression.NullFunction"/>
+    <function name="IsNull" class="org.apache.cocoon.forms.expression.IsNullFunction"/>
+    <function name="String" class="org.apache.cocoon.forms.expression.StringFunction"/>
+  </forms-expression>
+</xconf>

Propchange: cocoon/blocks/forms/trunk/conf/forms-expression.xconf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/conf/forms-expression.xconf
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/conf/forms-expression.xroles
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-expression.xroles?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-expression.xroles (added)
+++ cocoon/blocks/forms/trunk/conf/forms-expression.xroles Fri Sep 16 06:46:22 2005
@@ -0,0 +1,23 @@
+<?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.
+-->
+
+<xroles xpath="/role-list" unless="/role-list[@cocoon-version != '2.1']|role[@name='org.apache.cocoon.forms.expression.ExpressionManager']">
+
+  <role name="org.apache.cocoon.forms.expression.ExpressionManager"
+        shorthand="forms-expression"
+        default-class="org.apache.cocoon.forms.expression.DefaultExpressionManager"/>
+</xroles>

Added: cocoon/blocks/forms/trunk/conf/forms-form.xconf
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-form.xconf?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-form.xconf (added)
+++ cocoon/blocks/forms/trunk/conf/forms-form.xconf Fri Sep 16 06:46:22 2005
@@ -0,0 +1,50 @@
+<?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.
+-->
+
+<xconf xpath="/cocoon" unless="@version != '2.1' or forms-formmanager" logger="forms">
+
+  <!--+
+      | forms's FormManager component
+      +-->
+  <forms-formmanager>
+    <widgets>
+      <widget name="form" src="org.apache.cocoon.forms.formmodel.FormDefinitionBuilder"/>
+      <widget name="import" src="org.apache.cocoon.forms.formmodel.ImportDefinitionBuilder"/>
+      <widget name="expand" src="org.apache.cocoon.forms.formmodel.ExpandDefinitionBuilder"/>
+      <widget name="field" src="org.apache.cocoon.forms.formmodel.FieldDefinitionBuilder"/>
+      <widget name="repeater" src="org.apache.cocoon.forms.formmodel.RepeaterDefinitionBuilder"/>
+      <widget name="booleanfield" src="org.apache.cocoon.forms.formmodel.BooleanFieldDefinitionBuilder"/>
+      <widget name="multivaluefield" src="org.apache.cocoon.forms.formmodel.MultiValueFieldDefinitionBuilder"/>
+      <widget name="action" src="org.apache.cocoon.forms.formmodel.ActionDefinitionBuilder"/>
+      <widget name="repeater-action" src="org.apache.cocoon.forms.formmodel.RepeaterActionDefinitionBuilder"/>
+      <widget name="row-action" src="org.apache.cocoon.forms.formmodel.RowActionDefinitionBuilder"/>
+      <widget name="submit" src="org.apache.cocoon.forms.formmodel.SubmitDefinitionBuilder"/>
+      <widget name="button" src="org.apache.cocoon.forms.formmodel.ButtonDefinitionBuilder"/>
+      <widget name="aggregatefield" src="org.apache.cocoon.forms.formmodel.AggregateFieldDefinitionBuilder"/>
+      <widget name="output" src="org.apache.cocoon.forms.formmodel.OutputDefinitionBuilder"/>
+      <widget name="upload" src="org.apache.cocoon.forms.formmodel.UploadDefinitionBuilder"/>
+      <widget name="messages" src="org.apache.cocoon.forms.formmodel.MessagesDefinitionBuilder"/>
+      <widget name="class" src="org.apache.cocoon.forms.formmodel.ClassDefinitionBuilder"/>
+      <widget name="new" src="org.apache.cocoon.forms.formmodel.NewDefinitionBuilder"/>
+      <widget name="struct" src="org.apache.cocoon.forms.formmodel.StructDefinitionBuilder"/>
+      <widget name="union" src="org.apache.cocoon.forms.formmodel.UnionDefinitionBuilder"/>
+      <widget name="group" src="org.apache.cocoon.forms.formmodel.GroupDefinitionBuilder"/>
+      <widget name="captcha" src="org.apache.cocoon.forms.formmodel.CaptchaDefinitionBuilder"/>
+      <widget name="imagemap" src="org.apache.cocoon.forms.formmodel.ImageMapDefinitionBuilder"/>
+    </widgets>
+  </forms-formmanager>
+</xconf>

Propchange: cocoon/blocks/forms/trunk/conf/forms-form.xconf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/conf/forms-form.xconf
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/conf/forms-form.xroles
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-form.xroles?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-form.xroles (added)
+++ cocoon/blocks/forms/trunk/conf/forms-form.xroles Fri Sep 16 06:46:22 2005
@@ -0,0 +1,23 @@
+<?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.
+-->
+
+<xroles xpath="/role-list" unless="/role-list[@cocoon-version != '2.1']|role[@name='org.apache.cocoon.forms.FormManager']">
+
+  <role name="org.apache.cocoon.forms.FormManager"
+        shorthand="forms-formmanager"
+        default-class="org.apache.cocoon.forms.DefaultFormManager"/>
+</xroles>

Added: cocoon/blocks/forms/trunk/conf/forms-generator.xmap
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-generator.xmap?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-generator.xmap (added)
+++ cocoon/blocks/forms/trunk/conf/forms-generator.xmap Fri Sep 16 06:46:22 2005
@@ -0,0 +1,21 @@
+<?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.
+-->
+<xmap xmlns:map="http://apache.org/cocoon/sitemap/1.0"
+      xpath="/sitemap/components/generators" unless="generator[@name='forms']">
+    <map:generator name="forms" logger="forms"
+                   src="org.apache.cocoon.forms.generation.FormsGenerator"/>
+</xmap>

Propchange: cocoon/blocks/forms/trunk/conf/forms-generator.xmap
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/conf/forms-generator.xmap
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/conf/forms-selection-lists.xconf
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-selection-lists.xconf?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-selection-lists.xconf (added)
+++ cocoon/blocks/forms/trunk/conf/forms-selection-lists.xconf Fri Sep 16 06:46:22 2005
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<xconf xpath="/cocoon" unless="@version != '2.1' or forms-selection-lists">
+
+  <forms-selection-lists default="default">
+    <selection-list name="default" class="org.apache.cocoon.forms.datatype.DefaultSelectionListBuilder"/>
+    <selection-list name="flow-jxpath" class="org.apache.cocoon.forms.datatype.FlowJXPathSelectionListBuilder"/>
+    <selection-list name="enum" class="org.apache.cocoon.forms.datatype.EnumSelectionListBuilder"/>
+    <selection-list name="java" class="org.apache.cocoon.forms.datatype.JavaSelectionListBuilder"/>
+  </forms-selection-lists>
+  
+</xconf>

Propchange: cocoon/blocks/forms/trunk/conf/forms-selection-lists.xconf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/conf/forms-selection-lists.xconf
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/conf/forms-selection-lists.xroles
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-selection-lists.xroles?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-selection-lists.xroles (added)
+++ cocoon/blocks/forms/trunk/conf/forms-selection-lists.xroles Fri Sep 16 06:46:22 2005
@@ -0,0 +1,23 @@
+<?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.
+-->
+
+<xroles xpath="/role-list" unless="/role-list[@cocoon-version != '2.1']|role[@name='org.apache.cocoon.forms.datatype.SelectionListBuilderSelector']">
+
+  <role name="org.apache.cocoon.forms.datatype.SelectionListBuilderSelector"
+        shorthand="forms-selection-lists"
+        default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>
+</xroles>

Added: cocoon/blocks/forms/trunk/conf/forms-target.xlog
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-target.xlog?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-target.xlog (added)
+++ cocoon/blocks/forms/trunk/conf/forms-target.xlog Fri Sep 16 06:46:22 2005
@@ -0,0 +1,30 @@
+<?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.
+-->
+
+<xlog xpath="/logkit/targets" 
+      unless="cocoon[@id='forms']">
+    
+    <cocoon id="forms">
+      <filename>${context-root}/WEB-INF/logs/forms.log</filename>
+
+      <format type="cocoon">
+        %7.7{priority} %{time}   [%{category}] (%{uri}) %{thread}/%{class:short}: %{message}\n%{throwable}
+      </format>
+      <append>false</append>
+    </cocoon>
+    
+</xlog>

Added: cocoon/blocks/forms/trunk/conf/forms-transformator.xmap
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-transformator.xmap?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-transformator.xmap (added)
+++ cocoon/blocks/forms/trunk/conf/forms-transformator.xmap Fri Sep 16 06:46:22 2005
@@ -0,0 +1,21 @@
+<?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.
+-->
+<xmap xmlns:map="http://apache.org/cocoon/sitemap/1.0"
+      xpath="/sitemap/components/transformers" unless="transformer[@name='forms']">
+    <map:transformer name="forms" logger="forms"
+                     src="org.apache.cocoon.forms.transformation.FormsTemplateTransformer"/>
+</xmap>

Propchange: cocoon/blocks/forms/trunk/conf/forms-transformator.xmap
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/conf/forms-transformator.xmap
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/conf/forms-validators.xconf
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-validators.xconf?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-validators.xconf (added)
+++ cocoon/blocks/forms/trunk/conf/forms-validators.xconf Fri Sep 16 06:46:22 2005
@@ -0,0 +1,33 @@
+<?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.
+-->
+
+<xconf xpath="/cocoon" unless="@version != '2.1' or forms-validators">
+
+  <forms-validators>
+    <!-- new-style validators -->
+    <validator name="javascript" class="org.apache.cocoon.forms.validation.impl.JavaScriptValidatorBuilder"/>
+    <validator name="length" class="org.apache.cocoon.forms.validation.impl.LengthValidatorBuilder"/>
+    <validator name="email" class="org.apache.cocoon.forms.validation.impl.EmailValidatorBuilder"/>
+    <validator name="value-count" class="org.apache.cocoon.forms.validation.impl.ValueCountValidatorBuilder"/>
+    <validator name="range" class="org.apache.cocoon.forms.validation.impl.RangeValidatorBuilder"/>
+    <validator name="assert" class="org.apache.cocoon.forms.validation.impl.AssertValidatorBuilder"/>
+    <validator name="mod10" class="org.apache.cocoon.forms.validation.impl.Mod10ValidatorBuilder"/>
+    <validator name="regexp" class="org.apache.cocoon.forms.validation.impl.RegExpValidatorBuilder"/>
+    <validator name="captcha" class="org.apache.cocoon.forms.validation.impl.CaptchaValidatorBuilder"/>
+  </forms-validators>
+
+</xconf>

Propchange: cocoon/blocks/forms/trunk/conf/forms-validators.xconf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/conf/forms-validators.xconf
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/conf/forms-validators.xroles
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-validators.xroles?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-validators.xroles (added)
+++ cocoon/blocks/forms/trunk/conf/forms-validators.xroles Fri Sep 16 06:46:22 2005
@@ -0,0 +1,23 @@
+<?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.
+-->
+
+<xroles xpath="/role-list" unless="/role-list[@cocoon-version != '2.1']|role[@name='org.apache.cocoon.forms.validation.WidgetValidatorBuilderSelector']">
+
+  <role name="org.apache.cocoon.forms.validation.WidgetValidatorBuilderSelector"
+        shorthand="forms-validators"
+        default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>
+</xroles>

Added: cocoon/blocks/forms/trunk/conf/forms-widgetlisteners.xconf
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-widgetlisteners.xconf?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-widgetlisteners.xconf (added)
+++ cocoon/blocks/forms/trunk/conf/forms-widgetlisteners.xconf Fri Sep 16 06:46:22 2005
@@ -0,0 +1,25 @@
+<?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.
+-->
+
+<xconf xpath="/cocoon" unless="@version != '2.1' or forms-widgetlisteners">
+
+  <forms-widgetlisteners>
+    <listener name="java" class="org.apache.cocoon.forms.event.impl.JavaClassWidgetListenerBuilder"/>
+    <listener name="javascript" class="org.apache.cocoon.forms.event.impl.JavaScriptWidgetListenerBuilder"/>
+  </forms-widgetlisteners>
+
+</xconf>
\ No newline at end of file

Propchange: cocoon/blocks/forms/trunk/conf/forms-widgetlisteners.xconf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/conf/forms-widgetlisteners.xconf
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/blocks/forms/trunk/conf/forms-widgetlisteners.xroles
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms-widgetlisteners.xroles?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms-widgetlisteners.xroles (added)
+++ cocoon/blocks/forms/trunk/conf/forms-widgetlisteners.xroles Fri Sep 16 06:46:22 2005
@@ -0,0 +1,23 @@
+<?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.
+-->
+
+<xroles xpath="/role-list" unless="/role-list[@cocoon-version != '2.1']|role[@name='org.apache.cocoon.forms.event.WidgetListenerBuilderSelector']">
+
+  <role name="org.apache.cocoon.forms.event.WidgetListenerBuilderSelector"
+        shorthand="forms-widgetlisteners"
+        default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>
+</xroles>

Added: cocoon/blocks/forms/trunk/conf/forms.xsamples
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/conf/forms.xsamples?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/conf/forms.xsamples (added)
+++ cocoon/blocks/forms/trunk/conf/forms.xsamples Fri Sep 16 06:46:22 2005
@@ -0,0 +1,26 @@
+<?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.
+-->
+
+<xsamples xpath="/samples" unless="group[@name='Cocoon Forms']">
+
+  <group name="Cocoon Forms">
+    <sample name="Forms Block" href="forms/">
+      Cocoon Forms examples.
+    </sample>
+  </group>
+
+</xsamples>

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/DefaultCacheManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/DefaultCacheManager.java?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/DefaultCacheManager.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/DefaultCacheManager.java Fri Sep 16 06:46:22 2005
@@ -16,6 +16,7 @@
 package org.apache.cocoon.forms;
 
 import org.apache.avalon.framework.activity.Disposable;
+import org.apache.avalon.framework.component.Component;
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
@@ -40,7 +41,8 @@
 public class DefaultCacheManager
         extends AbstractLogEnabled
         implements CacheManager, ThreadSafe, Serviceable, Disposable,
-                   Configurable {
+                   Configurable, Component {
+// FIXME: Component is there to allow this block to also run in the 2.1 branch
 
     protected ServiceManager manager;
     protected Configuration configuration;

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/DefaultFormManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/DefaultFormManager.java?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/DefaultFormManager.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/DefaultFormManager.java Fri Sep 16 06:46:22 2005
@@ -18,6 +18,7 @@
 import org.apache.avalon.framework.CascadingException;
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.activity.Initializable;
+import org.apache.avalon.framework.component.Component;
 import org.apache.avalon.framework.configuration.Configurable;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.ConfigurationException;
@@ -27,12 +28,15 @@
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.avalon.framework.service.ServiceSelector;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.ThreadSafe;
 import org.apache.cocoon.forms.formmodel.Form;
 import org.apache.cocoon.forms.formmodel.FormDefinition;
 import org.apache.cocoon.forms.formmodel.FormDefinitionBuilder;
 import org.apache.cocoon.forms.formmodel.WidgetDefinitionBuilder;
+import org.apache.cocoon.forms.formmodel.library.LibraryManager;
+import org.apache.cocoon.forms.formmodel.library.LibraryManagerImpl;
 import org.apache.cocoon.forms.util.DomHelper;
 import org.apache.cocoon.forms.util.SimpleServiceSelector;
 import org.apache.excalibur.source.Source;
@@ -48,13 +52,16 @@
  */
 public class DefaultFormManager
   extends AbstractLogEnabled
-  implements FormManager, Contextualizable, ThreadSafe, Serviceable, Disposable, Configurable, Initializable {
+  implements FormManager, Contextualizable, ThreadSafe, Serviceable, Disposable, Configurable, Component, Initializable {
+// FIXME: Component is there to allow this block to also run in the 2.1 branch
 
     protected static final String PREFIX = "CocoonForm:";
     protected ServiceManager manager;
     protected Configuration configuration;
     protected SimpleServiceSelector widgetDefinitionBuilderSelector;
     protected CacheManager cacheManager;
+    
+    protected LibraryManagerImpl libraryManager;
 
     private Context avalonContext;
     public void contextualize(Context context) throws ContextException {
@@ -80,31 +87,22 @@
     }
 
     public void initialize() throws Exception {
+
+        libraryManager = new LibraryManagerImpl();
+        libraryManager.enableLogging(getLogger().getChildLogger("library"));
+        libraryManager.service(new FormServiceManager());
+        libraryManager.configure(configuration.getChild("libraries"));
+        
         widgetDefinitionBuilderSelector = new SimpleServiceSelector("widget", WidgetDefinitionBuilder.class);
         widgetDefinitionBuilderSelector.contextualize(avalonContext);
-        widgetDefinitionBuilderSelector.service(new ServiceManager() {
-            final String WIDGET_DEFINITION_BUILDER_SELECTOR_ROLE = WidgetDefinitionBuilder.class.getName() + "Selector";
-
-            public Object lookup(String name) throws ServiceException {
-                if (WIDGET_DEFINITION_BUILDER_SELECTOR_ROLE.equals(name))
-                    return widgetDefinitionBuilderSelector;
-                else
-                    return manager.lookup(name);
-            }
-
-            public boolean hasService(String name) {
-                if (WIDGET_DEFINITION_BUILDER_SELECTOR_ROLE.equals(name))
-                    return true;
-                else
-                    return manager.hasService(name);
-            }
-
-            public void release(Object service) {
-                if (service != widgetDefinitionBuilderSelector)
-                    manager.release(service);
-            }
-        });
+        widgetDefinitionBuilderSelector.service(new FormServiceManager());
         widgetDefinitionBuilderSelector.configure(configuration.getChild("widgets"));
+        
+        libraryManager.initialize();
+    }
+    
+    public ServiceSelector getWidgetDefinitionBuilderSelector() {
+    	return this.widgetDefinitionBuilderSelector;
     }
 
     public Form createForm(Source source) throws Exception {
@@ -146,7 +144,15 @@
 
     public FormDefinition getFormDefinition(Source source) throws Exception {
         FormDefinition formDefinition = (FormDefinition)this.cacheManager.get(source, PREFIX);
+        
+        if(formDefinition != null && formDefinition.getLocalLibrary().dependenciesHaveChanged())
+        	formDefinition = null; // invalidate
+        
         if (formDefinition == null) {
+        	
+        	if(getLogger().isDebugEnabled())
+        		getLogger().debug("Building Form: "+source.getURI());
+        	
             Document formDocument;
             try {
                 InputSource inputSource = new InputSource(source.getInputStream());
@@ -210,8 +216,42 @@
             this.widgetDefinitionBuilderSelector.dispose();
             this.widgetDefinitionBuilderSelector = null;
         }
+        if(this.libraryManager != null) {
+        	this.libraryManager.dispose();
+        	this.libraryManager = null;
+        }
         this.manager.release(this.cacheManager);
         this.cacheManager = null;
         this.manager = null;
+    }
+    
+    
+    public class FormServiceManager implements ServiceManager {
+        final String WIDGET_DEFINITION_BUILDER_SELECTOR_ROLE = WidgetDefinitionBuilder.class.getName() + "Selector";
+        final String LIBRARY_MANAGER_ROLE = LibraryManager.ROLE;
+
+        public Object lookup(String name) throws ServiceException {
+            if (WIDGET_DEFINITION_BUILDER_SELECTOR_ROLE.equals(name))
+                return widgetDefinitionBuilderSelector;
+            else if(LIBRARY_MANAGER_ROLE.equals(name))
+            	return libraryManager;
+            else
+                return manager.lookup(name);
+        }
+
+        public boolean hasService(String name) {
+            if (WIDGET_DEFINITION_BUILDER_SELECTOR_ROLE.equals(name))
+                return true;
+            else if(LIBRARY_MANAGER_ROLE.equals(name))
+            	return true;
+            else
+                return manager.hasService(name);
+        }
+
+        public void release(Object service) {
+            if (service != widgetDefinitionBuilderSelector
+            		&& service != libraryManager)
+                manager.release(service);
+        }
     }
 }

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/AbstractCustomBinding.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/AbstractCustomBinding.java?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/AbstractCustomBinding.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/AbstractCustomBinding.java Fri Sep 16 06:46:22 2005
@@ -15,6 +15,7 @@
  */
 package org.apache.cocoon.forms.binding;
 
+import org.apache.cocoon.forms.binding.library.Library;
 import org.apache.cocoon.forms.formmodel.Widget;
 import org.apache.commons.jxpath.JXPathContext;
 
@@ -43,8 +44,14 @@
         return this.parent.getClass(id);        
     }
     //TODO: end of stuff to clean out over time
-    //below is the real usefull stuff...
+    //below is the real useful stuff...
     
+    public boolean isValid() {
+    	return false; // pessimistic
+    }
+    public Library getLocalLibrary() {
+    	return null;
+    }
     
     /**
      * Binding service method called upon loading.

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/AggregateJXPathBinding.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/AggregateJXPathBinding.java?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/AggregateJXPathBinding.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/AggregateJXPathBinding.java Fri Sep 16 06:46:22 2005
@@ -49,6 +49,9 @@
         this.widgetId = widgetId;
         this.xpath = xpath;
     }
+    
+    public String getXPath() { return xpath; }
+    public String getId() { return widgetId; }
 
     /**
      * Narrows the scope on the form-model to the member widget-field, and

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/AggregateJXPathBindingBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/AggregateJXPathBindingBuilder.java?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/AggregateJXPathBindingBuilder.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/AggregateJXPathBindingBuilder.java Fri Sep 16 06:46:22 2005
@@ -38,10 +38,25 @@
             throws BindingException {
         try {
             CommonAttributes commonAtts = JXPathBindingBuilderBase.getCommonAttributes(bindingElm);
-            String xpath = DomHelper.getAttribute(bindingElm, "path");
-            String widgetId = DomHelper.getAttribute(bindingElm, "id");
-
-            JXPathBindingBase[] childBindings = assistant.makeChildBindings(bindingElm);
+            String xpath = DomHelper.getAttribute(bindingElm, "path", null);
+            String widgetId = DomHelper.getAttribute(bindingElm, "id", null);
+            
+            JXPathBindingBase[] childBindings = new JXPathBindingBase[0];
+            
+            // do inheritance
+            AggregateJXPathBinding otherBinding = (AggregateJXPathBinding)assistant.getContext().getSuperBinding();
+            if(otherBinding!=null) {
+            	childBindings = otherBinding.getChildBindings();
+            	commonAtts = JXPathBindingBuilderBase.mergeCommonAttributes(otherBinding.getCommonAtts(),commonAtts);
+            	
+            	if(xpath==null)
+            		xpath = otherBinding.getXPath();
+            	if(widgetId==null)
+            		widgetId = otherBinding.getId();
+            }
+            
+            childBindings = assistant.makeChildBindings(bindingElm,childBindings);
+            
 
             AggregateJXPathBinding aggregateBinding = new AggregateJXPathBinding(commonAtts, widgetId, xpath, childBindings);
             return aggregateBinding;

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/Binding.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/Binding.java?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/Binding.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/Binding.java Fri Sep 16 06:46:22 2005
@@ -15,6 +15,7 @@
  */
 package org.apache.cocoon.forms.binding;
 
+import org.apache.cocoon.forms.binding.library.Library;
 import org.apache.cocoon.forms.formmodel.Widget;
 
 /**
@@ -36,6 +37,16 @@
      * Gets binding definition id.
      */
     String getId();
+    
+    /**
+     * returns the local library for this tree of bindings
+     */
+    Library getLocalLibrary();
+    
+    /**
+     * checks for deep validity of this binding tree (taking into accound included libraries)
+     */
+    boolean isValid();
 
     /**
      * Gets a binding class.

Added: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/BindingBuilderContext.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/BindingBuilderContext.java?rev=289538&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/BindingBuilderContext.java (added)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/BindingBuilderContext.java Fri Sep 16 06:46:22 2005
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2005 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.binding;
+
+import org.apache.cocoon.forms.binding.library.Library;
+
+/**
+ * @version $Id$
+ */
+public class BindingBuilderContext {
+
+	private Library localLibrary = null;
+	private Binding superBinding = null;
+	
+	public BindingBuilderContext(BindingBuilderContext other) {
+		this.localLibrary = other.localLibrary;
+		this.superBinding = other.superBinding;
+	}
+	public BindingBuilderContext() {
+		this.localLibrary = null;
+		this.superBinding = null;
+	}
+	
+	public Library getLocalLibrary() {
+		return localLibrary;
+	}
+	public void setLocalLibrary(Library lib) {
+		this.localLibrary = lib;
+	}
+	public Binding getSuperBinding() {
+		return superBinding;
+	}
+	public void setSuperBinding(Binding binding) {
+		this.superBinding = binding;
+	}
+}

Propchange: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/BindingBuilderContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/BindingBuilderContext.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/CaseJXPathBinding.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/CaseJXPathBinding.java?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/CaseJXPathBinding.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/CaseJXPathBinding.java Fri Sep 16 06:46:22 2005
@@ -49,6 +49,9 @@
         this.xpath = xpath;
     }
 
+    public String getXPath() { return xpath; }
+    public String getId() { return widgetId; }
+
     /**
      * Narrows the scope on the form-model to the member widget-field, and
      * narrows the scope on the object-model to the member xpath-context

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/CaseJXPathBindingBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/CaseJXPathBindingBuilder.java?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/CaseJXPathBindingBuilder.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/CaseJXPathBindingBuilder.java Fri Sep 16 06:46:22 2005
@@ -37,11 +37,25 @@
     public JXPathBindingBase buildBinding(Element bindingElm, JXPathBindingManager.Assistant assistant)
             throws BindingException {
         try {
-            String widgetId = DomHelper.getAttribute(bindingElm, "id");
+            String widgetId = DomHelper.getAttribute(bindingElm, "id", null);
             CommonAttributes commonAtts = JXPathBindingBuilderBase.getCommonAttributes(bindingElm);
-            String xpath = DomHelper.getAttribute(bindingElm, "path");
+            String xpath = DomHelper.getAttribute(bindingElm, "path", null);
 
-            JXPathBindingBase[] childBindings = assistant.makeChildBindings(bindingElm);
+            JXPathBindingBase[] childBindings = new JXPathBindingBase[0];
+            
+            // do inheritance
+            CaseJXPathBinding otherBinding = (CaseJXPathBinding)assistant.getContext().getSuperBinding();
+            if(otherBinding!=null) {
+            	childBindings = otherBinding.getChildBindings();
+            	commonAtts = JXPathBindingBuilderBase.mergeCommonAttributes(otherBinding.getCommonAtts(),commonAtts);
+            	
+            	if(xpath==null)
+            		xpath = otherBinding.getXPath();
+            	if(widgetId==null)
+            		widgetId = otherBinding.getId();
+            }
+            
+            childBindings = assistant.makeChildBindings(bindingElm,childBindings);
 
             CaseJXPathBinding caseBinding = new CaseJXPathBinding(commonAtts, widgetId, xpath, childBindings);
             return caseBinding;

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ClassJXPathBindingBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ClassJXPathBindingBuilder.java?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ClassJXPathBindingBuilder.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ClassJXPathBindingBuilder.java Fri Sep 16 06:46:22 2005
@@ -38,11 +38,24 @@
     public JXPathBindingBase buildBinding(Element bindingElm, JXPathBindingManager.Assistant assistant)
             throws BindingException {
         try {
-            String widgetId = DomHelper.getAttribute(bindingElm, "id");
+            String widgetId = DomHelper.getAttribute(bindingElm, "id", null);
             CommonAttributes commonAtts = JXPathBindingBuilderBase.getCommonAttributes(bindingElm);
 
-            JXPathBindingBase[] childBindings = assistant.makeChildBindings(bindingElm);
+            JXPathBindingBase[] childBindings = new JXPathBindingBase[0]; 
+            
+//          do inheritance
+            ClassJXPathBinding otherBinding = (ClassJXPathBinding)assistant.getContext().getSuperBinding();
+            if(otherBinding!=null) {
+            	childBindings = otherBinding.getChildBindings();
+            	commonAtts = JXPathBindingBuilderBase.mergeCommonAttributes(otherBinding.getCommonAtts(),commonAtts);
+            	
+            	if(widgetId==null)
+            		widgetId = otherBinding.getId();
+            }
+            
+            childBindings = assistant.makeChildBindings(bindingElm,childBindings);
 
+            
             ClassJXPathBinding classBinding =
                 new ClassJXPathBinding(commonAtts, widgetId, childBindings);
             return classBinding;

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ComposedJXPathBindingBase.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ComposedJXPathBindingBase.java?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ComposedJXPathBindingBase.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ComposedJXPathBindingBase.java Fri Sep 16 06:46:22 2005
@@ -31,6 +31,8 @@
 public class ComposedJXPathBindingBase extends JXPathBindingBase {
     private final JXPathBindingBase[] subBindings;
 
+    public String getXPath() { return null; }
+    
     /**
      * Constructs ComposedJXPathBindingBase
      *

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ContextJXPathBinding.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ContextJXPathBinding.java?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ContextJXPathBinding.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ContextJXPathBinding.java Fri Sep 16 06:46:22 2005
@@ -15,7 +15,11 @@
  */
 package org.apache.cocoon.forms.binding;
 
+import org.apache.avalon.framework.CascadingRuntimeException;
+import org.apache.cocoon.forms.binding.JXPathBindingBuilderBase.CommonAttributes;
 import org.apache.cocoon.forms.formmodel.Widget;
+import org.apache.cocoon.util.ClassUtils;
+import org.apache.commons.jxpath.AbstractFactory;
 import org.apache.commons.jxpath.JXPathContext;
 import org.apache.commons.jxpath.Pointer;
 
@@ -32,13 +36,38 @@
      * the relative contextPath for the sub-bindings of this context
      */
     private final String xpath;
+    
+    /**
+     * The name of a factory class for building intermediate elements. Must implement 
+     * {@link org.apache.commons.jxpath.AbstractFactory}.
+     */
+    private AbstractFactory factory;
 
     /**
      * Constructs ContextJXPathBinding for the specified xpath sub-context
      */
-    public ContextJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts, String contextPath, JXPathBindingBase[] childBindings) {
+    public ContextJXPathBinding(CommonAttributes commonAtts, String contextPath, JXPathBindingBase[] childBindings) {
+        super(commonAtts, childBindings);
+        this.xpath = contextPath;
+    }
+
+    /**
+     * Constructs ContextJXPathBinding for the specified xpath sub-context and optional JXPath factory class.
+     */
+    public ContextJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts, String contextPath, String factoryClassName, JXPathBindingBase[] childBindings) {
         super(commonAtts, childBindings);
         this.xpath = contextPath;
+        if (factoryClassName != null) {
+            try {
+                this.factory = (AbstractFactory) ClassUtils.newInstance(factoryClassName);
+            } catch (Exception e) {
+                throw new CascadingRuntimeException("Cannot create an instance of " + factoryClassName, e);
+            }
+        }
+    }
+    
+    public String getFactoryClassName() {
+        return this.factory == null ? null : this.factory.getClass().getName();
     }
 
     /**
@@ -64,6 +93,9 @@
      * wrapped in a jxpath context.
      */
     public void doSave(Widget frmModel, JXPathContext jxpc) throws BindingException {
+        if (this.factory != null) {
+            jxpc.setFactory(this.factory);
+        }
         Pointer ptr = jxpc.getPointer(this.xpath);
         if (ptr.getNode() == null) {
             jxpc.createPath(this.xpath);
@@ -78,7 +110,7 @@
     }
     
     /** To allow child classes to know which path they bind to */
-    protected String getXPath() {
+    public String getXPath() {
         return this.xpath;
     }
 

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ContextJXPathBindingBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ContextJXPathBindingBuilder.java?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ContextJXPathBindingBuilder.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ContextJXPathBindingBuilder.java Fri Sep 16 06:46:22 2005
@@ -28,6 +28,12 @@
  *   &lt;!-- in here come the nested child bindings on the sub-context --&gt;
  * &lt;/fb:context&gt;
  * </code></pre>
+ * <p>The <code>fb:context</code> element can have an optional <code>factory</code>
+ * attribute, whose value, if present, must be the name of a class extending
+ * {@link org.apache.commons.jxpath.AbstractFactory}. If this attribute is present,
+ * an instance of the named class is registered with the JXPath context and can be used to
+ * create an object corresponding to the path of the <code>fb:context</code> element
+ * upon save, if needed.</p>
  *
  * @version $Id$
  */
@@ -42,11 +48,27 @@
 
         try {
             CommonAttributes commonAtts = JXPathBindingBuilderBase.getCommonAttributes(bindingElm);
-            String xpath = DomHelper.getAttribute(bindingElm, "path");
+            String xpath = DomHelper.getAttribute(bindingElm, "path", null);
+            String factory = DomHelper.getAttribute(bindingElm, "factory", null);
 
-            JXPathBindingBase[] childBindings = assistant.makeChildBindings(bindingElm);
-
-            ContextJXPathBinding contextBinding = new ContextJXPathBinding(commonAtts, xpath, childBindings);
+            JXPathBindingBase[] childBindings = new JXPathBindingBase[0]; 
+            
+            // do inheritance
+            ContextJXPathBinding otherBinding = (ContextJXPathBinding)assistant.getContext().getSuperBinding();
+            if(otherBinding!=null) {
+            	childBindings = otherBinding.getChildBindings();
+            	commonAtts = JXPathBindingBuilderBase.mergeCommonAttributes(otherBinding.getCommonAtts(),commonAtts);
+            	
+            	if(xpath==null)
+            		xpath = otherBinding.getXPath();
+             if (factory == null)
+                 factory = otherBinding.getFactoryClassName();
+            
+            }
+            
+            childBindings = assistant.makeChildBindings(bindingElm,childBindings);
+            
+            ContextJXPathBinding contextBinding = new ContextJXPathBinding(commonAtts, xpath, factory, childBindings);
             return contextBinding;
         } catch (BindingException e) {
             throw e;

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/CustomJXPathBinding.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/CustomJXPathBinding.java?rev=289538&r1=289537&r2=289538&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/CustomJXPathBinding.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/CustomJXPathBinding.java Fri Sep 16 06:46:22 2005
@@ -55,6 +55,10 @@
         this.wrappedBinding = wrappedBinding;
     }
     
+    public String getXPath() { return xpath; }
+    public String getId() { return widgetId; }
+    public AbstractCustomBinding getWrappedBinding() { return wrappedBinding; }
+    
     /**
      * Delegates the actual loading operation to the provided Custom Binding Class
      * after narrowing down on the selected widget (@id) and context (@path)



Mime
View raw message