You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by si...@apache.org on 2006/05/26 02:54:05 UTC

svn commit: r409529 - in /cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf: forms-calculated-algorithms.xconf forms-calculated-algorithms.xroles forms-expression.xconf forms-form.xconf

Author: simoneg
Date: Thu May 25 17:54:04 2006
New Revision: 409529

URL: http://svn.apache.org/viewvc?rev=409529&view=rev
Log:
Calculated fields configuration

Added:
    cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-calculated-algorithms.xconf
    cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-calculated-algorithms.xroles
Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-expression.xconf
    cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-form.xconf

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-calculated-algorithms.xconf
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-calculated-algorithms.xconf?rev=409529&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-calculated-algorithms.xconf (added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-calculated-algorithms.xconf Thu May 25 17:54:04 2006
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- $Id$ -->
+<xconf xpath="/cocoon" unless="@version != '2.1' or forms-calculated-algorithms">
+
+  <!--+
+      | Cocoon Forms calculated fields algorithms
+      +-->
+  <forms-calculated-algorithms logger="forms.algorithms" default="formula">
+    <algorithm name="formula" class="org.apache.cocoon.forms.formmodel.algorithms.SimpleFormulaBuilder"/>
+    <algorithm name="javascript" class="org.apache.cocoon.forms.formmodel.algorithms.JavaScriptBuilder"/>
+    <algorithm name="java" class="org.apache.cocoon.forms.formmodel.algorithms.JavaAlgorithmBuilder"/>
+    <algorithm name="repeatedformula" class="org.apache.cocoon.forms.formmodel.algorithms.RepeatedFormulaBuilder"/>
+  </forms-calculated-algorithms>
+
+</xconf>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-calculated-algorithms.xroles
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-calculated-algorithms.xroles?rev=409529&view=auto
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-calculated-algorithms.xroles (added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-calculated-algorithms.xroles Thu May 25 17:54:04 2006
@@ -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.formmodel.CalculatedFieldAlgorithmBuilderSelector']">
+
+  <role name="org.apache.cocoon.forms.formmodel.CalculatedFieldAlgorithmBuilderSelector"
+        shorthand="forms-calculated-algorithms"
+        default-class="org.apache.cocoon.components.ExtendedComponentSelector"/>
+</xroles>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-expression.xconf
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-expression.xconf?rev=409529&r1=409528&r2=409529&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-expression.xconf (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-expression.xconf Thu May 25 17:54:04 2006
@@ -25,6 +25,7 @@
     <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"/>
+    <function name="Sum" class="org.apache.cocoon.forms.expression.SumFunction"/>
   </forms-expression>
 
 </xconf>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-form.xconf
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-form.xconf?rev=409529&r1=409528&r2=409529&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-form.xconf (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/conf/forms-form.xconf Thu May 25 17:54:04 2006
@@ -47,6 +47,7 @@
       <widget name="captcha" src="org.apache.cocoon.forms.formmodel.CaptchaDefinitionBuilder"/>
       <widget name="tree" src="org.apache.cocoon.forms.formmodel.tree.builder.TreeDefinitionBuilder"/>
       <widget name="imagemap" src="org.apache.cocoon.forms.formmodel.ImageMapDefinitionBuilder"/>
+      <widget name="calculatedfield" src="org.apache.cocoon.forms.formmodel.CalculatedFieldDefinitionBuilder"/>
     </widgets>
   </forms-formmanager>