cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r450255 [1/3] - in /cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding: ./ library/
Date Tue, 26 Sep 2006 23:48:46 GMT
Author: vgritsenko
Date: Tue Sep 26 16:48:43 2006
New Revision: 450255

URL: http://svn.apache.org/viewvc?view=rev&rev=450255
Log:
cleanup (whitespaces, braces, imports)

Modified:
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/AbstractCustomBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/AggregateJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/AggregateJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/Binding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/BindingBuilderContext.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/BindingException.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/BindingManager.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CaseJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CaseJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ClassJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ClassJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ComposedJXPathBindingBase.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ContextJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ContextJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CustomJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CustomJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/DeleteNodeJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/DeleteNodeJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/EnhancedRepeaterJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ExpandJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/GroupJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/GroupJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ImportJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ImportJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/InsertBeanJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/InsertBeanJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/InsertNodeJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/InsertNodeJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/JXPathBindingBase.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/JXPathBindingBuilderBase.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/JXPathBindingManager.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/JavaScriptJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/JavaScriptJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/MultiValueJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/MultiValueJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/NewJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/NewJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/RepeaterAdapter.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/RepeaterFilter.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/RepeaterItem.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/RepeaterJXPathAdapter.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/RepeaterJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/RepeaterJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/RepeaterJXPathCollection.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/RepeaterSorter.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/SetAttributeJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/SetAttributeJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/SimpleRepeaterJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/SimpleRepeaterJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/StructJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/StructJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/TempRepeaterJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/TempRepeaterJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/UnionJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/UnionJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ValueJXPathBinding.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ValueJXPathBindingBuilder.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/library/Library.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/library/LibraryException.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/library/LibraryManager.java
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/library/LibraryManagerImpl.java

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/AbstractCustomBinding.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/AbstractCustomBinding.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/AbstractCustomBinding.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/AbstractCustomBinding.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,17 +19,18 @@
 import org.apache.cocoon.forms.binding.library.Library;
 import org.apache.cocoon.forms.formmodel.Form;
 import org.apache.cocoon.forms.formmodel.Widget;
+
 import org.apache.commons.jxpath.JXPathContext;
 
 /**
  * AbstractCustomBinding
+ * @version $Id$
  */
 public abstract class AbstractCustomBinding implements Binding {
 
     //TODO: following stuff should be removed after we cleaned out the Binding interface
     private Binding parent;
     private String id;
-
     private String xpath;
 
     public void setXpath(String path) {
@@ -46,14 +47,16 @@
     public void setParent(Binding binding) {
         this.parent = binding;
     }
+
     /**
      * Returns binding definition id.
      */
     public String getId() {
         return this.id;
     }
+
     public Binding getClass(String id) {
-        return this.parent.getClass(id);        
+        return this.parent.getClass(id);
     }
     //TODO: end of stuff to clean out over time
     //below is the real useful stuff...
@@ -66,28 +69,30 @@
     public Library getEnclosingLibrary() {
     	return null;
     }
-    public void setEnclosingLibrary(Library lib) {}
+
+    public void setEnclosingLibrary(Library lib) {
+    }
 
     /**
      * Binding service method called upon loading.
      * This will delegate to the overloaded version specific for this base-class.
      * {@link #doLoad(Widget, JXPathContext)}
-     * 
+     *
      * @param frmModel
      * @param objModel
      * @throws BindingException
      */
     public final void loadFormFromModel(Widget frmModel, Object objModel) throws BindingException {
-        if ( frmModel instanceof Form ) {
-            ((Form)frmModel).informStartLoadingModel();
+        if (frmModel instanceof Form) {
+            ((Form) frmModel).informStartLoadingModel();
         }
         try {
-            doLoad(frmModel, (JXPathContext)objModel);
+            doLoad(frmModel, (JXPathContext) objModel);
         } catch (Exception e) {
             throw new BindingException("Error executing custom binding", e);
         }
-        if ( frmModel instanceof Form ) {
-            ((Form)frmModel).informEndLoadingModel();
+        if (frmModel instanceof Form) {
+            ((Form) frmModel).informEndLoadingModel();
         }
     }
 
@@ -95,27 +100,26 @@
      * Binding service method called upon saving.
      * This will delegate to the overloaded version specific for this base-class.
      * {@link #doSave(Widget, JXPathContext)}
-     * 
+     *
      * @param frmModel
      * @param objModel
      * @throws BindingException
      */
     public final void saveFormToModel(Widget frmModel, Object objModel) throws BindingException {
-        if ( frmModel instanceof Form ) {
-            ((Form)frmModel).informStartSavingModel();
+        if (frmModel instanceof Form) {
+            ((Form) frmModel).informStartSavingModel();
         }
         try {
-            doSave(frmModel, (JXPathContext)objModel);
+            doSave(frmModel, (JXPathContext) objModel);
         } catch (Exception e) {
             throw new BindingException("Error executing custom binding", e);
         }
-        if ( frmModel instanceof Form ) {
-            ((Form)frmModel).informEndSavingModel();
+        if (frmModel instanceof Form) {
+            ((Form) frmModel).informEndSavingModel();
         }
     }
 
     /**
-     * 
      * @param frmModel
      * @param context
      */

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/AggregateJXPathBinding.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/AggregateJXPathBinding.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/AggregateJXPathBinding.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/AggregateJXPathBinding.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,13 +18,14 @@
 
 import org.apache.cocoon.forms.formmodel.AggregateField;
 import org.apache.cocoon.forms.formmodel.Widget;
+
 import org.apache.commons.jxpath.JXPathContext;
 
 /**
  * AggregateJXPathBinding provides an implementation of a {@link Binding}
  * that narrows the context towards provided childbindings.
- * <p>
- * NOTES: <ol>
+ * <p>NOTES:
+ * <ol>
  * <li>This Binding assumes that the provided widget-id points to a widget
  * that contains other widgets.</li>
  * </ol>
@@ -43,14 +44,15 @@
      * @param xpath
      * @param childBindings
      */
-    public AggregateJXPathBinding(
-            JXPathBindingBuilderBase.CommonAttributes commonAtts,
-            String widgetId, String xpath, JXPathBindingBase[] childBindings) {
+    public AggregateJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts,
+                                  String widgetId,
+                                  String xpath,
+                                  JXPathBindingBase[] childBindings) {
         super(commonAtts, childBindings);
         this.widgetId = widgetId;
         this.xpath = xpath;
     }
-    
+
     public String getXPath() { return xpath; }
     public String getId() { return widgetId; }
 
@@ -59,12 +61,12 @@
      * narrows the scope on the object-model to the member xpath-context
      * before continuing the binding over the child-bindings.
      */
-    public void doLoad(Widget frmModel,
-            JXPathContext jxpc) throws BindingException {
+    public void doLoad(Widget frmModel, JXPathContext jxpc)
+    throws BindingException {
         AggregateField aggregate =
-            (AggregateField)selectWidget(frmModel, this.widgetId);
+                (AggregateField) selectWidget(frmModel, this.widgetId);
         JXPathContext subContext =
-            jxpc.getRelativeContext(jxpc.getPointer(this.xpath));
+                jxpc.getRelativeContext(jxpc.getPointer(this.xpath));
         super.doLoad(aggregate, subContext);
         aggregate.combineFields();
         if (getLogger().isDebugEnabled()) {
@@ -77,12 +79,12 @@
      * narrows the scope on the object-model to the member xpath-context
      * before continuing the binding over the child-bindings.
      */
-    public void doSave(Widget frmModel,
-            JXPathContext jxpc) throws BindingException {
+    public void doSave(Widget frmModel, JXPathContext jxpc)
+    throws BindingException {
         AggregateField aggregate =
-            (AggregateField)selectWidget(frmModel, this.widgetId);
+                (AggregateField) selectWidget(frmModel, this.widgetId);
         JXPathContext subContext =
-            jxpc.getRelativeContext(jxpc.getPointer(this.xpath));
+                jxpc.getRelativeContext(jxpc.getPointer(this.xpath));
         super.doSave(aggregate, subContext);
         if (getLogger().isDebugEnabled()) {
             getLogger().debug("Done saving " + toString());
@@ -90,7 +92,6 @@
     }
 
     public String toString() {
-        return "AggregateJXPathBinding [widget=" + this.widgetId +
-            ", xpath=" + this.xpath + "]";
+        return "AggregateJXPathBinding [widget=" + this.widgetId + ", xpath=" + this.xpath + "]";
     }
 }

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/AggregateJXPathBindingBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/AggregateJXPathBindingBuilder.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/AggregateJXPathBindingBuilder.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/AggregateJXPathBindingBuilder.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,6 +17,7 @@
 package org.apache.cocoon.forms.binding;
 
 import org.apache.cocoon.forms.util.DomHelper;
+
 import org.w3c.dom.Element;
 
 /**
@@ -32,35 +33,34 @@
  *
  * @version $Id$
  */
-public class AggregateJXPathBindingBuilder
-    extends JXPathBindingBuilderBase {
+public class AggregateJXPathBindingBuilder extends JXPathBindingBuilderBase {
 
     public JXPathBindingBase buildBinding(Element bindingElm, JXPathBindingManager.Assistant assistant)
-            throws BindingException {
+    throws BindingException {
         try {
             CommonAttributes commonAtts = JXPathBindingBuilderBase.getCommonAttributes(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();
+            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;
+            return new AggregateJXPathBinding(commonAtts, widgetId, xpath, childBindings);
         } catch (BindingException e) {
             throw e;
         } catch (Exception e) {

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/Binding.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/Binding.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/Binding.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/Binding.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,17 +38,17 @@
      * Gets binding definition id.
      */
     String getId();
-    
+
     /**
      * returns the local library for this tree of bindings
      */
     Library getEnclosingLibrary();
-    
+
     /**
      * sets the library this binding is a part of
      */
     void setEnclosingLibrary(Library lib);
-    
+
     /**
      * checks for deep validity of this binding tree (taking into accound included libraries)
      */
@@ -67,7 +67,7 @@
      * @param objModel
      */
     void loadFormFromModel(Widget frmModel, Object objModel)
-            throws BindingException;
+    throws BindingException;
 
     /**
      * Saves the infortmation-elements to the objModel from the frmModel.
@@ -75,5 +75,5 @@
      * @param objModel
      */
     void saveFormToModel(Widget frmModel, Object objModel)
-            throws BindingException;
+    throws BindingException;
 }

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/BindingBuilderContext.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/BindingBuilderContext.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/BindingBuilderContext.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/BindingBuilderContext.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,28 +23,33 @@
  */
 public class BindingBuilderContext {
 
-	private Library localLibrary = null;
-	private Binding superBinding = null;
-	
-	public BindingBuilderContext(BindingBuilderContext other) {
+	private Library localLibrary;
+	private Binding superBinding;
+
+
+    public BindingBuilderContext(BindingBuilderContext other) {
 		this.localLibrary = other.localLibrary;
 		this.superBinding = other.superBinding;
 	}
-	public BindingBuilderContext() {
+
+    public BindingBuilderContext() {
 		this.localLibrary = null;
 		this.superBinding = null;
 	}
-	
+
 	public Library getLocalLibrary() {
 		return localLibrary;
 	}
-	public void setLocalLibrary(Library lib) {
+
+    public void setLocalLibrary(Library lib) {
 		this.localLibrary = lib;
 	}
-	public Binding getSuperBinding() {
+
+    public Binding getSuperBinding() {
 		return superBinding;
 	}
-	public void setSuperBinding(Binding binding) {
+
+    public void setSuperBinding(Binding binding) {
 		this.superBinding = binding;
 	}
 }

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/BindingException.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/BindingException.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/BindingException.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/BindingException.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,22 +28,17 @@
 
     public BindingException(String message, Location location) {
         super(message, location);
-        // TODO Auto-generated constructor stub
     }
 
     public BindingException(String message, Throwable cause, Location location) {
         super(message, cause, location);
-        // TODO Auto-generated constructor stub
     }
 
     public BindingException(String message, Throwable cause) {
         super(message, cause);
-        // TODO Auto-generated constructor stub
     }
 
     public BindingException(String message) {
         super(message);
-        // TODO Auto-generated constructor stub
     }
-
 }

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/BindingManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/BindingManager.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/BindingManager.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/BindingManager.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,6 +20,7 @@
 
 /**
  * BindingManager declares the factory method that produces actual Bindings.
+ *
  * @version $Id$
  */
 public interface BindingManager {

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CaseJXPathBinding.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CaseJXPathBinding.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CaseJXPathBinding.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CaseJXPathBinding.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,13 +18,14 @@
 
 import org.apache.cocoon.forms.formmodel.Union;
 import org.apache.cocoon.forms.formmodel.Widget;
+
 import org.apache.commons.jxpath.JXPathContext;
 
 /**
  * CaseJXPathBinding provides an implementation of a {@link Binding}
  * that narrows the context towards provided childbindings.
- * <p>
- * NOTES: <ol>
+ * <p>NOTES:
+ * <ol>
  * <li>This Binding assumes that the provided widget-id points to a
  * case of a union.</li>
  * </ol>
@@ -34,7 +35,6 @@
 public class CaseJXPathBinding extends ComposedJXPathBindingBase {
 
     private final String xpath;
-
     private final String widgetId;
 
     /**
@@ -44,7 +44,10 @@
      * @param xpath
      * @param childBindings
      */
-    public CaseJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts, String widgetId, String xpath, JXPathBindingBase[] childBindings) {
+    public CaseJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts,
+                             String widgetId,
+                             String xpath,
+                             JXPathBindingBase[] childBindings) {
         super(commonAtts, childBindings);
         this.widgetId = widgetId;
         this.xpath = xpath;

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CaseJXPathBindingBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CaseJXPathBindingBuilder.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CaseJXPathBindingBuilder.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CaseJXPathBindingBuilder.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,6 +17,7 @@
 package org.apache.cocoon.forms.binding;
 
 import org.apache.cocoon.forms.util.DomHelper;
+
 import org.w3c.dom.Element;
 
 /**
@@ -36,30 +37,31 @@
 public class CaseJXPathBindingBuilder extends JXPathBindingBuilderBase {
 
     public JXPathBindingBase buildBinding(Element bindingElm, JXPathBindingManager.Assistant assistant)
-            throws BindingException {
+    throws BindingException {
         try {
             String widgetId = DomHelper.getAttribute(bindingElm, "id", null);
             CommonAttributes commonAtts = JXPathBindingBuilderBase.getCommonAttributes(bindingElm);
             String xpath = DomHelper.getAttribute(bindingElm, "path", null);
 
             JXPathBindingBase[] childBindings = new JXPathBindingBase[0];
-            
+
             // do inheritance
             CaseJXPathBinding otherBinding = (CaseJXPathBinding)assistant.getContext().getSuperBinding();
-            if(otherBinding!=null) {
-            	childBindings = otherBinding.getChildBindings();
+            if (otherBinding != null) {
+                childBindings = otherBinding.getChildBindings();
             	commonAtts = JXPathBindingBuilderBase.mergeCommonAttributes(otherBinding.getCommonAtts(),commonAtts);
-            	
-            	if(xpath==null)
-            		xpath = otherBinding.getXPath();
-            	if(widgetId==null)
-            		widgetId = otherBinding.getId();
+
+                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;
+            childBindings = assistant.makeChildBindings(bindingElm, childBindings);
+
+            return new CaseJXPathBinding(commonAtts, widgetId, xpath, childBindings);
         } catch (BindingException e) {
             throw e;
         } catch (Exception e) {

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ClassJXPathBinding.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ClassJXPathBinding.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ClassJXPathBinding.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ClassJXPathBinding.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,13 +17,14 @@
 package org.apache.cocoon.forms.binding;
 
 import org.apache.cocoon.forms.formmodel.Widget;
+
 import org.apache.commons.jxpath.JXPathContext;
 
 /**
  * ClassJXPathBinding provides an implementation of a {@link Binding}
  * which allows the specification of a class of reusable bindings.
- * <p>
- * NOTES: <ol>
+ * <p>NOTES:
+ * <ol>
  * <li>This Binding uses the provided widget-id as the name for the class.</li>
  * </ol>
  *
@@ -39,7 +40,9 @@
      * @param widgetId
      * @param childBindings
      */
-    public ClassJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts, String widgetId, JXPathBindingBase[] childBindings) {
+    public ClassJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts,
+                              String widgetId,
+                              JXPathBindingBase[] childBindings) {
         super(commonAtts, childBindings);
         this.widgetId = widgetId;
     }

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ClassJXPathBindingBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ClassJXPathBindingBuilder.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ClassJXPathBindingBuilder.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ClassJXPathBindingBuilder.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,6 +17,7 @@
 package org.apache.cocoon.forms.binding;
 
 import org.apache.cocoon.forms.util.DomHelper;
+
 import org.w3c.dom.Element;
 
 /**
@@ -33,33 +34,30 @@
  *
  * @version $Id$
  */
-public class ClassJXPathBindingBuilder
-    extends JXPathBindingBuilderBase {
+public class ClassJXPathBindingBuilder extends JXPathBindingBuilderBase {
 
     public JXPathBindingBase buildBinding(Element bindingElm, JXPathBindingManager.Assistant assistant)
-            throws BindingException {
+    throws BindingException {
         try {
             String widgetId = DomHelper.getAttribute(bindingElm, "id", null);
             CommonAttributes commonAtts = JXPathBindingBuilderBase.getCommonAttributes(bindingElm);
 
-            JXPathBindingBase[] childBindings = new JXPathBindingBase[0]; 
-            
-//          do inheritance
+            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();
+            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;
+            return new ClassJXPathBinding(commonAtts, widgetId, childBindings);
         } catch (BindingException e) {
             throw e;
         } catch (Exception e) {

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ComposedJXPathBindingBase.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ComposedJXPathBindingBase.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ComposedJXPathBindingBase.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ComposedJXPathBindingBase.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,7 +20,9 @@
 import java.util.HashMap;
 
 import org.apache.avalon.framework.logger.Logger;
+
 import org.apache.cocoon.forms.formmodel.Widget;
+
 import org.apache.commons.jxpath.JXPathContext;
 
 /**
@@ -31,16 +33,17 @@
  * @version $Id$
  */
 public class ComposedJXPathBindingBase extends JXPathBindingBase {
+
     private final JXPathBindingBase[] subBindings;
 
-    public String getXPath() { return null; }
-    
+
     /**
      * Constructs ComposedJXPathBindingBase
      *
      * @param childBindings sets the array of childBindings
      */
-    public ComposedJXPathBindingBase(JXPathBindingBuilderBase.CommonAttributes commonAtts, JXPathBindingBase[] childBindings) {
+    public ComposedJXPathBindingBase(JXPathBindingBuilderBase.CommonAttributes commonAtts,
+                                     JXPathBindingBase[] childBindings) {
         super(commonAtts);
         this.subBindings = childBindings;
         if (this.subBindings != null) {
@@ -63,6 +66,10 @@
         }
     }
 
+    public String getXPath() {
+        return null;
+    }
+
     /**
      * Gets a binding class by id.
      * @param id Id of binding class to get.
@@ -79,7 +86,7 @@
                           classes.put(bindingId, binding);
                     }
                 }
-                
+
                 // Fee memory used by an empty map
                 if (classes.size() == 0) {
                     classes = Collections.EMPTY_MAP;

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ContextJXPathBinding.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ContextJXPathBinding.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ContextJXPathBinding.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ContextJXPathBinding.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,9 +17,10 @@
 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;
@@ -37,9 +38,9 @@
      * 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 
+     * The name of a factory class for building intermediate elements. Must implement
      * {@link org.apache.commons.jxpath.AbstractFactory}.
      */
     private AbstractFactory factory;
@@ -47,7 +48,9 @@
     /**
      * Constructs ContextJXPathBinding for the specified xpath sub-context
      */
-    public ContextJXPathBinding(CommonAttributes commonAtts, String contextPath, JXPathBindingBase[] childBindings) {
+    public ContextJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts,
+                                String contextPath,
+                                JXPathBindingBase[] childBindings) {
         super(commonAtts, childBindings);
         this.xpath = contextPath;
     }
@@ -55,7 +58,10 @@
     /**
      * Constructs ContextJXPathBinding for the specified xpath sub-context and optional JXPath factory class.
      */
-    public ContextJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts, String contextPath, String factoryClassName, JXPathBindingBase[] childBindings) {
+    public ContextJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts,
+                                String contextPath,
+                                String factoryClassName,
+                                JXPathBindingBase[] childBindings) {
         super(commonAtts, childBindings);
         this.xpath = contextPath;
         if (factoryClassName != null) {
@@ -66,7 +72,7 @@
             }
         }
     }
-    
+
     public String getFactoryClassName() {
         return this.factory == null ? null : this.factory.getClass().getName();
     }
@@ -109,7 +115,7 @@
             getLogger().debug("done saving " + toString());
         }
     }
-    
+
     /** To allow child classes to know which path they bind to */
     public String getXPath() {
         return this.xpath;

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ContextJXPathBindingBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ContextJXPathBindingBuilder.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ContextJXPathBindingBuilder.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ContextJXPathBindingBuilder.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,6 +17,7 @@
 package org.apache.cocoon.forms.binding;
 
 import org.apache.cocoon.forms.util.DomHelper;
+
 import org.w3c.dom.Element;
 
 /**
@@ -45,32 +46,34 @@
      * path and nested child bindings from the declarations in the bindingElm
      */
     public JXPathBindingBase buildBinding(Element bindingElm,
-        JXPathBindingManager.Assistant assistant) throws BindingException {
+                                          JXPathBindingManager.Assistant assistant)
+    throws BindingException {
 
         try {
             CommonAttributes commonAtts = JXPathBindingBuilderBase.getCommonAttributes(bindingElm);
             String xpath = DomHelper.getAttribute(bindingElm, "path", null);
             String factory = DomHelper.getAttribute(bindingElm, "factory", null);
 
-            JXPathBindingBase[] childBindings = new JXPathBindingBase[0]; 
-            
+            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();
-            
+            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;
+
+            return new ContextJXPathBinding(commonAtts, xpath, factory, childBindings);
         } catch (BindingException e) {
             throw e;
         } catch (Exception e) {

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CustomJXPathBinding.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CustomJXPathBinding.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CustomJXPathBinding.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CustomJXPathBinding.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,39 +19,42 @@
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
+
 import org.apache.cocoon.forms.binding.JXPathBindingBuilderBase.CommonAttributes;
 import org.apache.cocoon.forms.formmodel.Widget;
+
 import org.apache.commons.jxpath.JXPathContext;
 
 /**
  * CustomJXPathBinding
  */
-public class CustomJXPathBinding extends JXPathBindingBase implements Serviceable {
-    
-    /** 
+public class CustomJXPathBinding extends JXPathBindingBase
+                                 implements Serviceable {
+
+    /**
      * The id of the cforms widget
      */
     private final String widgetId;
-    
+
     /**
      * The path into the objectModel to select
      */
     private final String xpath;
-    
+
     /**
      * The actual custom provided binding
      */
     private final AbstractCustomBinding wrappedBinding;
-    
+
     /**
      * Constructs CustomJXPathBinding
-     * 
+     *
      * @param commonAtts common configuration attributes {@link org.apache.cocoon.forms.binding.JXPathBindingBuilderBase.CommonAttributes}
      * @param widgetId id of the widget to bind to
      * @param xpath jxpath expression to narrow down the context to before calling the wrapped Binding
      * @param wrappedBinding the actual custom written Binding implementation of {@link Binding}
      */
-    public CustomJXPathBinding(CommonAttributes commonAtts, String widgetId, 
+    public CustomJXPathBinding(CommonAttributes commonAtts, String widgetId,
                                String xpath, AbstractCustomBinding wrappedBinding) {
         super(commonAtts);
         this.widgetId = widgetId;
@@ -59,36 +62,34 @@
         this.wrappedBinding = wrappedBinding;
         wrappedBinding.setXpath(xpath);
     }
-    
+
     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)
-     * 
+     *
      * @param frmModel the narrowed widget-scope from the parent binding
-     * @param jxpc the narrowed jxpath context from the parent binding 
+     * @param jxpc the narrowed jxpath context from the parent binding
      * @throws BindingException when the wrapped CustomBinding fails
      */
     public void doLoad(Widget frmModel, JXPathContext jxpc) throws BindingException {
         Widget selectedWidget = selectWidget(frmModel, this.widgetId);
-
         this.wrappedBinding.loadFormFromModel(selectedWidget, jxpc);
     }
 
     /**
      * Delegates the actual saving operation to the provided Custom Binding Class
      * after narrowing down on the selected widget (@id) and context (@path)
-     * 
+     *
      * @param frmModel the narrowed widget-scope from the parent binding
-     * @param jxpc the narrowed jxpath context from the parent binding 
+     * @param jxpc the narrowed jxpath context from the parent binding
      * @throws BindingException when the wrapped CustomBinding fails
      */
     public void doSave(Widget frmModel, JXPathContext jxpc) throws BindingException {
         Widget selectedWidget = selectWidget(frmModel, this.widgetId);
-
         this.wrappedBinding.saveFormToModel(selectedWidget, jxpc);
     }
 
@@ -96,7 +97,7 @@
      * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
      */
     public void service(ServiceManager manager) throws ServiceException {
-	    	if (wrappedBinding instanceof Serviceable) {
+        if (wrappedBinding instanceof Serviceable) {
             ((Serviceable) wrappedBinding).service(manager);
         }
     }

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CustomJXPathBindingBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CustomJXPathBindingBuilder.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CustomJXPathBindingBuilder.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/CustomJXPathBindingBuilder.java Tue Sep 26 16:48:43 2006
@@ -21,6 +21,7 @@
 import org.apache.cocoon.components.LifecycleHelper;
 import org.apache.cocoon.forms.binding.JXPathBindingManager.Assistant;
 import org.apache.cocoon.forms.util.DomHelper;
+
 import org.w3c.dom.Element;
 
 /**
@@ -51,6 +52,7 @@
  * @version $Id$
  */
 public class CustomJXPathBindingBuilder extends JXPathBindingBuilderBase {
+
     private static final Class[] DOMELEMENT_METHODARGS;
     private static final Class[] EMPTY_METHODARGS;
 
@@ -68,8 +70,8 @@
      * @return the freshly built binding based on the configuration element
      * @throws BindingException
      */
-    public JXPathBindingBase buildBinding(Element bindingElm,
-        Assistant assistant) throws BindingException {
+    public JXPathBindingBase buildBinding(Element bindingElm, Assistant assistant)
+    throws BindingException {
 
         try {
             CommonAttributes commonAtts =
@@ -116,16 +118,19 @@
             }
 
             // do inheritance
-            CustomJXPathBinding otherBinding = (CustomJXPathBinding)assistant.getContext().getSuperBinding();
-            if(otherBinding!=null) {
-            	commonAtts = JXPathBindingBuilderBase.mergeCommonAttributes(otherBinding.getCommonAtts(),commonAtts);
-
-            	if(xpath==null)
-            		xpath = otherBinding.getXPath();
-            	if(widgetId==null)
-            		widgetId = otherBinding.getId();
-            	if(bindingInstance==null)
-            		bindingInstance = otherBinding.getWrappedBinding();
+            CustomJXPathBinding otherBinding = (CustomJXPathBinding) assistant.getContext().getSuperBinding();
+            if (otherBinding != null) {
+                commonAtts = JXPathBindingBuilderBase.mergeCommonAttributes(otherBinding.getCommonAtts(), commonAtts);
+
+                if (xpath == null) {
+                    xpath = otherBinding.getXPath();
+                }
+                if (widgetId == null) {
+                    widgetId = otherBinding.getId();
+                }
+                if (bindingInstance == null) {
+                    bindingInstance = otherBinding.getWrappedBinding();
+                }
             }
 
             CustomJXPathBinding customBinding =

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/DeleteNodeJXPathBinding.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/DeleteNodeJXPathBinding.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/DeleteNodeJXPathBinding.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/DeleteNodeJXPathBinding.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,6 +17,7 @@
 package org.apache.cocoon.forms.binding;
 
 import org.apache.cocoon.forms.formmodel.Widget;
+
 import org.apache.commons.jxpath.JXPathContext;
 
 /**

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/DeleteNodeJXPathBindingBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/DeleteNodeJXPathBindingBuilder.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/DeleteNodeJXPathBindingBuilder.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/DeleteNodeJXPathBindingBuilder.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,6 +17,7 @@
 package org.apache.cocoon.forms.binding;
 
 import org.apache.cocoon.forms.binding.JXPathBindingManager.Assistant;
+
 import org.w3c.dom.Element;
 
 /**
@@ -30,8 +31,7 @@
  *
  * @version $Id$
  */
-public class DeleteNodeJXPathBindingBuilder
-    extends JXPathBindingBuilderBase {
+public class DeleteNodeJXPathBindingBuilder extends JXPathBindingBuilderBase {
 
     /**
      * Creates an instance of {@link DeleteNodeJXPathBinding}.
@@ -39,12 +39,12 @@
     public JXPathBindingBase buildBinding(Element bindingElm, Assistant assistant) throws BindingException {
         CommonAttributes commonAtts = JXPathBindingBuilderBase.getCommonAttributes(bindingElm);
 
-//      do inheritance
-        DeleteNodeJXPathBinding otherBinding = (DeleteNodeJXPathBinding)assistant.getContext().getSuperBinding();
-        if(otherBinding!=null) {
-        	commonAtts = JXPathBindingBuilderBase.mergeCommonAttributes(otherBinding.getCommonAtts(),commonAtts);
+        // do inheritance
+        DeleteNodeJXPathBinding otherBinding = (DeleteNodeJXPathBinding) assistant.getContext().getSuperBinding();
+        if (otherBinding != null) {
+            commonAtts = JXPathBindingBuilderBase.mergeCommonAttributes(otherBinding.getCommonAtts(), commonAtts);
         }
-        
+
         return new DeleteNodeJXPathBinding(commonAtts);
     }
 }

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/EnhancedRepeaterJXPathBinding.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/EnhancedRepeaterJXPathBinding.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/EnhancedRepeaterJXPathBinding.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/EnhancedRepeaterJXPathBinding.java Tue Sep 26 16:48:43 2006
@@ -3,11 +3,13 @@
 import java.util.Iterator;
 
 import org.apache.avalon.framework.CascadingRuntimeException;
+
 import org.apache.cocoon.forms.binding.JXPathBindingBuilderBase.CommonAttributes;
 import org.apache.cocoon.forms.formmodel.EnhancedRepeater;
 import org.apache.cocoon.forms.formmodel.Repeater;
-import org.apache.cocoon.forms.formmodel.Widget;
 import org.apache.cocoon.forms.formmodel.Repeater.RepeaterRow;
+import org.apache.cocoon.forms.formmodel.Widget;
+
 import org.apache.commons.jxpath.JXPathContext;
 import org.apache.commons.jxpath.Pointer;
 
@@ -15,23 +17,30 @@
 
 	private String adapterClass;
 
-	public EnhancedRepeaterJXPathBinding(CommonAttributes commonAtts, String repeaterId, String repeaterPath, 
-			String rowPath, String rowPathForInsert, JXPathBindingBase[] childBindings, 
-			JXPathBindingBase insertBinding, JXPathBindingBase[] deleteBindings, 
-			JXPathBindingBase[] identityBindings, String adapterClass) {
+
+    public EnhancedRepeaterJXPathBinding(CommonAttributes commonAtts,
+                                         String repeaterId,
+                                         String repeaterPath,
+                                         String rowPath, String rowPathForInsert,
+                                         JXPathBindingBase[] childBindings,
+                                         JXPathBindingBase insertBinding,
+                                         JXPathBindingBase[] deleteBindings,
+                                         JXPathBindingBase[] identityBindings,
+                                         String adapterClass) {
 		super(commonAtts, repeaterId, repeaterPath, rowPath, rowPathForInsert,
-				childBindings, insertBinding, deleteBindings, identityBindings);
+                childBindings, insertBinding, deleteBindings, identityBindings);
 		this.adapterClass = adapterClass;
 	}
 
 	public void doLoad(Widget frmModel, JXPathContext jxpc) throws BindingException {
-		Repeater repeater = (Repeater) selectWidget(frmModel, super.getId());
-		if (!(repeater instanceof EnhancedRepeater)) {
-			super.doLoad(frmModel, jxpc);
-			return;
-		}
-		EnhancedRepeater rep = (EnhancedRepeater) repeater;
-		RepeaterAdapter adapter = null;
+        Repeater repeater = (Repeater) selectWidget(frmModel, super.getId());
+        if (!(repeater instanceof EnhancedRepeater)) {
+            super.doLoad(frmModel, jxpc);
+            return;
+        }
+
+        EnhancedRepeater rep = (EnhancedRepeater) repeater;
+        RepeaterAdapter adapter;
 		if (this.adapterClass != null) {
 			try {
 				adapter = (RepeaterAdapter) Class.forName(this.adapterClass).newInstance();
@@ -41,7 +50,8 @@
 		} else {
 			adapter = new RepeaterJXPathAdapter();
 		}
-		RepeaterJXPathCollection collection = new RepeaterJXPathCollection();
+
+        RepeaterJXPathCollection collection = new RepeaterJXPathCollection();
 		//Pointer ptr = jxpc.getPointer(super.getRepeaterPath());
 		//JXPathContext repeaterContext = jxpc.getRelativeContext(ptr);
 		collection.init(jxpc, super.getRowPath(), adapter);
@@ -57,28 +67,29 @@
 			super.doLoad(frmModel, jxpc);
 			return;
 		}
-		EnhancedRepeater rep = (EnhancedRepeater) repeater;
+
+        EnhancedRepeater rep = (EnhancedRepeater) repeater;
 		Pointer ptr = jxpc.getPointer(super.getRepeaterPath());
 		JXPathContext repeaterContext = jxpc.getRelativeContext(ptr);
-		RepeaterJXPathCollection collection = rep.getCollection(); 
-		
+		RepeaterJXPathCollection collection = rep.getCollection();
+
         // iterate updated rows. note: we don't iterate over the whole context
         for (Iterator iter = collection.getUpdatedRows().iterator(); iter.hasNext();) {
             RepeaterItem item = (RepeaterItem) iter.next();
             getRowBinding().saveFormToModel((RepeaterRow)item.getRow(), item.getContext());
         }
-        
+
         for (Iterator iter = collection.getDeletedRows().iterator(); iter.hasNext();) {
             RepeaterItem item = (RepeaterItem) iter.next();
             jxpc.removePath(item.getContext().createPath(".").asPath());
         }
-        
+
         // insert rows
         int indexCount = collection.getOriginalCollectionSize() - collection.getDeletedRows().size();
         for (Iterator iter = collection.getInsertedRows().iterator(); iter.hasNext();) {
             indexCount++;
             RepeaterItem item= (RepeaterItem) iter.next();
-            
+
             // Perform the insert row binding.
             if (getInsertRowBinding() != null) {
             	getInsertRowBinding().saveFormToModel(item.getRow(), repeaterContext);
@@ -90,7 +101,7 @@
                 repeaterContext.getRelativeContext(newRowContextPointer);
             //    + rebind to children for update
             super.getRowBinding().saveFormToModel(item.getRow(), newRowContext);
-        }		
+        }
 	}
 
 }

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ExpandJXPathBindingBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ExpandJXPathBindingBuilder.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ExpandJXPathBindingBuilder.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ExpandJXPathBindingBuilder.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,6 +20,7 @@
 import org.apache.cocoon.forms.binding.library.Library;
 import org.apache.cocoon.forms.binding.library.LibraryException;
 import org.apache.cocoon.forms.util.DomHelper;
+
 import org.w3c.dom.Element;
 
 /**
@@ -30,20 +31,21 @@
 	/* (non-Javadoc)
 	 * @see org.apache.cocoon.forms.binding.JXPathBindingBuilderBase#buildBinding(org.w3c.dom.Element, org.apache.cocoon.forms.binding.JXPathBindingManager.Assistant)
 	 */
-	public JXPathBindingBase buildBinding(Element bindingElm,
-			Assistant assistant) throws BindingException {
+	public JXPathBindingBase buildBinding(Element bindingElm, Assistant assistant)
+    throws BindingException {
 
 		Library lib = assistant.getContext().getLocalLibrary();
-		
+
 		String id = DomHelper.getAttribute(bindingElm, "id", null);
-		
-		if(id == null)
-			throw new BindingException("Attribute id is required! (at "+DomHelper.getLocation(bindingElm)+")");
-		
-		try {
-			return (JXPathBindingBase)lib.getBinding(id);
-		} catch(LibraryException e) {
-			throw new BindingException("Could not expand binding from library! (at "+DomHelper.getLocation(bindingElm)+")",e);
-		}	
-	}
+
+        if (id == null) {
+            throw new BindingException("Attribute id is required! (at " + DomHelper.getLocation(bindingElm) + ")");
+        }
+
+        try {
+            return (JXPathBindingBase) lib.getBinding(id);
+        } catch (LibraryException e) {
+            throw new BindingException("Could not expand binding from library! (at " + DomHelper.getLocation(bindingElm) + ")", e);
+        }
+    }
 }

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/GroupJXPathBinding.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/GroupJXPathBinding.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/GroupJXPathBinding.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/GroupJXPathBinding.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,6 +18,7 @@
 
 import org.apache.cocoon.forms.formmodel.Group;
 import org.apache.cocoon.forms.formmodel.Widget;
+
 import org.apache.commons.jxpath.JXPathContext;
 
 /**
@@ -35,19 +36,23 @@
 
     private final String widgetId;
 
+
     /**
      * Constructs GroupJXPathBinding
      * @param widgetId
      * @param xpath
      * @param childBindings
      */
-    public GroupJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts, String widgetId, String xpath, JXPathBindingBase[] childBindings) {
+    public GroupJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts,
+                              String widgetId,
+                              String xpath,
+                              JXPathBindingBase[] childBindings) {
         super(commonAtts, xpath, childBindings);
         this.widgetId = widgetId;
     }
 
     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/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/GroupJXPathBindingBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/GroupJXPathBindingBuilder.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/GroupJXPathBindingBuilder.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/GroupJXPathBindingBuilder.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,6 +17,7 @@
 package org.apache.cocoon.forms.binding;
 
 import org.apache.cocoon.forms.util.DomHelper;
+
 import org.w3c.dom.Element;
 
 /**
@@ -33,11 +34,10 @@
  *
  * @version $Id$
  */
-public class GroupJXPathBindingBuilder
-    extends JXPathBindingBuilderBase {
+public class GroupJXPathBindingBuilder extends JXPathBindingBuilderBase {
 
     public JXPathBindingBase buildBinding(Element bindingElm, JXPathBindingManager.Assistant assistant)
-            throws BindingException {
+    throws BindingException {
         try {
             String widgetId = DomHelper.getAttribute(bindingElm, "id",null);
             CommonAttributes commonAtts = JXPathBindingBuilderBase.getCommonAttributes(bindingElm);
@@ -45,23 +45,23 @@
 
             JXPathBindingBase[] childBindings = new JXPathBindingBase[0];
 
-//          do inheritance
-            GroupJXPathBinding otherBinding = (GroupJXPathBinding)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();
+            // do inheritance
+            GroupJXPathBinding otherBinding = (GroupJXPathBinding) 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);
-            
-            GroupJXPathBinding groupBinding =
-                new GroupJXPathBinding(commonAtts, widgetId, xpath, childBindings);
-            return groupBinding;
+
+            return new GroupJXPathBinding(commonAtts, widgetId, xpath, childBindings);
         } catch (BindingException e) {
             throw e;
         } catch (Exception e) {

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ImportJXPathBinding.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ImportJXPathBinding.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ImportJXPathBinding.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ImportJXPathBinding.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,11 +17,12 @@
 package org.apache.cocoon.forms.binding;
 
 import org.apache.cocoon.forms.formmodel.Widget;
+
 import org.apache.commons.jxpath.JXPathContext;
 
 /**
  * Dummy class cause binding doesn't accept null results from binding builders
- * 
+ *
  * @version $Id$
  */
 public class ImportJXPathBinding extends JXPathBindingBase {
@@ -29,12 +30,12 @@
 	public ImportJXPathBinding() {
 		super(JXPathBindingBuilderBase.CommonAttributes.DEFAULT);
 	}
-	
+
 	/* (non-Javadoc)
 	 * @see org.apache.cocoon.forms.binding.JXPathBindingBase#doLoad(org.apache.cocoon.forms.formmodel.Widget, org.apache.commons.jxpath.JXPathContext)
 	 */
 	public void doLoad(Widget frmModel, JXPathContext jxpc)
-			throws BindingException {
+    throws BindingException {
 		// dont do anything
 
 	}
@@ -43,9 +44,7 @@
 	 * @see org.apache.cocoon.forms.binding.JXPathBindingBase#doSave(org.apache.cocoon.forms.formmodel.Widget, org.apache.commons.jxpath.JXPathContext)
 	 */
 	public void doSave(Widget frmModel, JXPathContext jxpc)
-			throws BindingException {
-//		 dont do anything
-
+    throws BindingException {
+        // dont do anything
 	}
-
 }

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ImportJXPathBindingBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ImportJXPathBindingBuilder.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ImportJXPathBindingBuilder.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/ImportJXPathBindingBuilder.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,6 +20,7 @@
 import org.apache.cocoon.forms.binding.library.Library;
 import org.apache.cocoon.forms.binding.library.LibraryException;
 import org.apache.cocoon.forms.util.DomHelper;
+
 import org.w3c.dom.Element;
 
 /**
@@ -30,26 +31,26 @@
 public class ImportJXPathBindingBuilder extends JXPathBindingBuilderBase {
 
 	/* (non-Javadoc)
-	 * @see org.apache.cocoon.forms.binding.JXPathBindingBuilderBase#buildBinding(org.w3c.dom.Element, org.apache.cocoon.forms.binding.JXPathBindingManager.Assistant)
+	 * @see JXPathBindingBuilderBase#buildBinding(Element, JXPathBindingManager.Assistant)
 	 */
-	public JXPathBindingBase buildBinding(Element bindingElm,
-			Assistant assistant) throws BindingException {
-
+	public JXPathBindingBase buildBinding(Element bindingElm, Assistant assistant)
+    throws BindingException {
 		Library lib = assistant.getContext().getLocalLibrary();
-		
-		String prefix = DomHelper.getAttribute(bindingElm, "prefix", null);
-		String uri = DomHelper.getAttribute(bindingElm, "uri", null);
-		
-		if(prefix==null || uri==null)
-			throw new BindingException("Import needs to specify both @uri and @prefix! (at "+DomHelper.getLocation(bindingElm)+")");
-		
-		try {
-			lib.includeAs(prefix,uri);
-		} catch(LibraryException e) {
-			throw new BindingException("Could not import library !(at "+DomHelper.getLocation(bindingElm)+")",e);
-		}
-		
-		return new ImportJXPathBinding();
+
+        String prefix = DomHelper.getAttribute(bindingElm, "prefix", null);
+        String uri = DomHelper.getAttribute(bindingElm, "uri", null);
+
+        if (prefix == null || uri == null) {
+            throw new BindingException("Import needs to specify both @uri and @prefix! (at " + DomHelper.getLocation(bindingElm) + ")");
+        }
+
+        try {
+            lib.includeAs(prefix, uri);
+        } catch (LibraryException e) {
+            throw new BindingException("Could not import library !(at " + DomHelper.getLocation(bindingElm) + ")", e);
+        }
+
+        return new ImportJXPathBinding();
 	}
 
 }

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/InsertBeanJXPathBinding.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/InsertBeanJXPathBinding.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/InsertBeanJXPathBinding.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/InsertBeanJXPathBinding.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,7 +19,9 @@
 import java.lang.reflect.Method;
 
 import org.apache.avalon.framework.CascadingRuntimeException;
+
 import org.apache.cocoon.forms.formmodel.Widget;
+
 import org.apache.commons.jxpath.JXPathContext;
 
 /**
@@ -42,12 +44,14 @@
     /**
      * Constructs InsertBeanJXPathBinding
      */
-    public InsertBeanJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts, String className, String addMethod) {
+    public InsertBeanJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts,
+                                   String className,
+                                   String addMethod) {
         super(commonAtts);
         this.className = className;
         this.addMethodName = addMethod;
     }
-    
+
     public String getClassName() { return className; }
     public String getAddMethodName() { return addMethodName; }
 

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/InsertBeanJXPathBindingBuilder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/InsertBeanJXPathBindingBuilder.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/InsertBeanJXPathBindingBuilder.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/InsertBeanJXPathBindingBuilder.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -18,6 +18,7 @@
 
 import org.apache.cocoon.forms.binding.JXPathBindingManager.Assistant;
 import org.apache.cocoon.forms.util.DomHelper;
+
 import org.w3c.dom.Element;
 
 /**
@@ -51,17 +52,19 @@
             String addMethod =
                 DomHelper.getAttribute(bindingElm, "addmethod",null);
 
-//          do inheritance
-            InsertBeanJXPathBinding otherBinding = (InsertBeanJXPathBinding)assistant.getContext().getSuperBinding();
-            if(otherBinding!=null) {
-            	commonAtts = JXPathBindingBuilderBase.mergeCommonAttributes(otherBinding.getCommonAtts(),commonAtts);
-            	
-            	if(className==null)
-            		className = otherBinding.getClassName();
-            	if(addMethod==null)
-            		addMethod = otherBinding.getAddMethodName();
+            // do inheritance
+            InsertBeanJXPathBinding otherBinding = (InsertBeanJXPathBinding) assistant.getContext().getSuperBinding();
+            if (otherBinding != null) {
+                commonAtts = JXPathBindingBuilderBase.mergeCommonAttributes(otherBinding.getCommonAtts(), commonAtts);
+
+                if (className == null) {
+                    className = otherBinding.getClassName();
+                }
+                if (addMethod == null) {
+                    addMethod = otherBinding.getAddMethodName();
+                }
             }
-            
+
             return new InsertBeanJXPathBinding(commonAtts, className, addMethod);
         } catch (BindingException e) {
             throw e;

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/InsertNodeJXPathBinding.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/InsertNodeJXPathBinding.java?view=diff&rev=450255&r1=450254&r2=450255
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/InsertNodeJXPathBinding.java (original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/InsertNodeJXPathBinding.java Tue Sep 26 16:48:43 2006
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,6 +17,7 @@
 package org.apache.cocoon.forms.binding;
 
 import org.apache.cocoon.forms.formmodel.Widget;
+
 import org.apache.commons.jxpath.JXPathContext;
 import org.w3c.dom.Document;
 import org.w3c.dom.DocumentFragment;
@@ -26,8 +27,8 @@
  * InsertNodeJXPathBinding provides an implementation of a {@link Binding}
  * that inserts a clone of some 'template document-fragment' into the target
  * back-end model upon save.
- * <p>
- * NOTES: <ol>
+ * <p>NOTES:
+ * <ol>
  * <li>This Binding does not perform any actions when loading.</li>
  * <li>This expects the back-end model to be an XML file.</li>
  * </ol>
@@ -41,11 +42,12 @@
     /**
      * Constructs InsertNodeJXPathBinding
      */
-    public InsertNodeJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts, DocumentFragment domTemplate) {
+    public InsertNodeJXPathBinding(JXPathBindingBuilderBase.CommonAttributes commonAtts,
+                                   DocumentFragment domTemplate) {
         super(commonAtts);
         this.template = domTemplate;
     }
-    
+
     public DocumentFragment getTemplate() { return template; }
 
     /**



Mime
View raw message