cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r447009 - in /cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel: ./ algorithms/
Date Sun, 17 Sep 2006 03:37:50 GMT
Author: vgritsenko
Date: Sat Sep 16 20:37:50 2006
New Revision: 447009

URL: http://svn.apache.org/viewvc?view=rev&rev=447009
Log:
tabs, props

Modified:
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/ImageMapDefinition.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/AbstractBaseAlgorithm.java
  (props changed)
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/AbstractBaseAlgorithmBuilder.java
  (props changed)
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/JavaAlgorithmBuilder.java
  (contents, props changed)
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/JavaScript.java
  (props changed)
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/JavaScriptBuilder.java
  (contents, props changed)
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/RepeatedFormula.java
  (props changed)
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/RepeatedFormulaBuilder.java
  (props changed)
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/SimpleFormula.java
  (props changed)
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/SimpleFormulaBuilder.java
  (props changed)

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/ImageMapDefinition.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/ImageMapDefinition.java?view=diff&rev=447009&r1=447008&r2=447009
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/ImageMapDefinition.java
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/ImageMapDefinition.java
Sat Sep 16 20:37:50 2006
@@ -1,12 +1,12 @@
 /*
  * 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.
@@ -20,14 +20,14 @@
 import org.apache.cocoon.forms.event.WidgetEventMulticaster;
 
 /**
- * The {@link WidgetDefinition} part of an ImageMap widget, see {@link ImageMap} 
+ * The {@link WidgetDefinition} part of an ImageMap widget, see {@link ImageMap}
  * for more information.
- * 
+ *
  * @version $Id$
  * @since 2.1.8
  */
 public class ImageMapDefinition extends AbstractWidgetDefinition {
-	
+
     private String actionCommand;
     private String imgURI; // URI of widget's image
     private ActionListener listener;
@@ -48,7 +48,7 @@
         checkMutable();
         this.listener = WidgetEventMulticaster.add(this.listener, listener);
     }
-    
+
     public void fireActionEvent(ActionEvent event) {
         if (this.listener != null) {
             this.listener.actionPerformed(event);
@@ -65,6 +65,6 @@
     }
 
     public void setImageURI(String newImgURI) {
-    	this.imgURI= newImgURI;
+        this.imgURI= newImgURI;
     }
 }

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/AbstractBaseAlgorithm.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/AbstractBaseAlgorithmBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/JavaAlgorithmBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/JavaAlgorithmBuilder.java?view=diff&rev=447009&r1=447008&r2=447009
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/JavaAlgorithmBuilder.java
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/JavaAlgorithmBuilder.java
Sat Sep 16 20:37:50 2006
@@ -25,7 +25,7 @@
  * If the specified class is a {@link org.apache.cocoon.forms.formmodel.algorithms.AbstractBaseAlgorithm}
  * subclass, the build process will be delegated to
  *  {@link org.apache.cocoon.forms.formmodel.algorithms.AbstractBaseAlgorithmBuilder}.
- * 
+ *
  * @version $Id$
  */
 public class JavaAlgorithmBuilder extends AbstractBaseAlgorithmBuilder {
@@ -34,13 +34,13 @@
         String clazzname = DomHelper.getAttribute(algorithmElement, "class");
         Class clazz = Class.forName(clazzname);
         if (AbstractBaseAlgorithm.class.isAssignableFrom(clazz)) {
-	        AbstractBaseAlgorithm algorithm = (AbstractBaseAlgorithm) clazz.newInstance();
-	        super.setup(algorithmElement, algorithm);
-	        return algorithm;
+            AbstractBaseAlgorithm algorithm = (AbstractBaseAlgorithm) clazz.newInstance();
+            super.setup(algorithmElement, algorithm);
+            return algorithm;
         } else {
-	        CalculatedFieldAlgorithm algorithm = (CalculatedFieldAlgorithm) clazz.newInstance();
-	        super.setupComponent(algorithm);        	        
-	        return algorithm;            
+            CalculatedFieldAlgorithm algorithm = (CalculatedFieldAlgorithm) clazz.newInstance();
+            super.setupComponent(algorithm);
+            return algorithm;
         }
     }
 

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/JavaAlgorithmBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/JavaScript.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/JavaScriptBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/JavaScriptBuilder.java?view=diff&rev=447009&r1=447008&r2=447009
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/JavaScriptBuilder.java
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/JavaScriptBuilder.java
Sat Sep 16 20:37:50 2006
@@ -26,29 +26,26 @@
 
 /**
  * Javascript based calculated field algorithm builder.
- * 
- * <p>
- * With this algorithm the user can implement it's own algorithm directly in javascript and
directly inside
- * the form definition.
- * </p>
- * 
- * <p>
- * The syntax is as follows :
- * <code>
+ *
+ * <p>With this algorithm the user can implement it's own algorithm directly in
+ * javascript and directly inside the form definition.</p>
+ *
+ * <p>The syntax is as follows:
+ * <pre>
  *   &lt;fd:value type="javascript" triggers="items,price,discount"&gt;
- *         var price = parent.lookupWidget('price').getValue();
- *         var items = parent.lookupWidget('items').getValue();
- *         var discount = parent.lookupWidget('discount').getValue();
- * 
- *         if (discount == 'completelyfree') return 0;
- *         var total = price * items;
- *         if (discount == 'halfprice') return total / 2;
- * 		    return total;
+ *     var price = parent.lookupWidget('price').getValue();
+ *     var items = parent.lookupWidget('items').getValue();
+ *     var discount = parent.lookupWidget('discount').getValue();
+ *
+ *     if (discount == 'completelyfree') return 0;
+ *     var total = price * items;
+ *     if (discount == 'halfprice') return total / 2;
+ *       return total;
  *   &lt;/fd:value&gt;
- * </code>
+ * </pre>
  * </p>
- * <p>
- *   From inside the javascript function the following objects are accessible :
+ *
+ * <p>From inside the javascript function the following objects are accessible:
  *   <dl>
  *     <dt>form</dt>
  *     <dd>The form object.</dd>
@@ -58,27 +55,27 @@
  *     <dd>This are accessible only when flowscript is in use (see bug COCOON-1804)</dd>
  *   </dl>
  * </p>
- * <p>
- *   As you can see, the function must return the calculated value, and not set this directly
in the widget. This
- *   way the value can be converted correctly if needed.
- * </p>
+ *
+ * <p>As you can see, the function must return the calculated value, and not set this
+ * directly in the widget. This way the value can be converted correctly if needed.</p>
+ * 
  * @version $Id$
  */
 public class JavaScriptBuilder implements CalculatedFieldAlgorithmBuilder {
 
     public CalculatedFieldAlgorithm build(Element algorithmElement) throws Exception {
         JavaScript ret = new JavaScript();
-        
+
         String fields = DomHelper.getAttribute(algorithmElement, "triggers");
         StringTokenizer stok = new StringTokenizer(fields, ", ");
         while (stok.hasMoreTokens()) {
             String fname = stok.nextToken();
             ret.addTriggerWidget(fname);
         }
-        
+
         Function func = JavaScriptHelper.buildFunction(algorithmElement, "calculate", new
String[]{"form", "parent"});
         ret.setJsfunction(func);
-        
+
         return ret;
     }
 

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/JavaScriptBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/RepeatedFormula.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/RepeatedFormulaBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/SimpleFormula.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/algorithms/SimpleFormulaBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message