cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject svn commit: r326838 [1/4] - in /cocoon/blocks: ajax/trunk/java/org/apache/cocoon/ajax/ ajax/trunk/java/org/apache/cocoon/ajax/resources/js/ ajax/trunk/java/org/apache/cocoon/transformation/ ajax/trunk/samples/ forms/trunk/java/org/apache/cocoon/forms/ ...
Date Thu, 20 Oct 2005 06:28:25 GMT
Author: sylvain
Date: Wed Oct 19 23:26:53 2005
New Revision: 326838

URL: http://svn.apache.org/viewcvs?rev=326838&view=rev
Log:
- removed scriptaculous, which doesn't play nice with other JS libraries
- renamed Constants to FormsConstants (too much Constants everywhere)
- forbid '.' and '/' in widget names, as this conflicts with full names and lookup paths
- fix Ajax forms that use the request method to select between call function and call continuation
- remove styling type="output" which is buggy as it resets field values. Use widget state output instead

Added:
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/FormsConstants.java   (with props)
Removed:
    cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/resources/js/LICENSE-prototype.txt
    cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/resources/js/LICENSE-scriptaculous.txt
    cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/resources/js/controls.js
    cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/resources/js/domutils.js
    cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/resources/js/dragdrop.js
    cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/resources/js/effects.js
    cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/resources/js/prototype.js
    cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/resources/js/scriptaculous.js
    cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/resources/js/slider.js
    cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/resources/js/unittest.js
    cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/resources/js/util.js
Modified:
    cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/GetContinuationAction.java
    cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/resources/js/cocoon-ajax.js
    cocoon/blocks/ajax/trunk/java/org/apache/cocoon/transformation/BrowserUpdateTransformer.java
    cocoon/blocks/ajax/trunk/samples/file-browser.xml
    cocoon/blocks/ajax/trunk/samples/sitemap.xmap
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/Constants.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/DefaultFormManager.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/MultiValueJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ValueJXPathBindingBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/AbstractJavaSelectionList.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/DefaultSelectionListBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/DynamicSelectionList.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/EmptySelectionList.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/EnumSelectionList.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/StaticSelectionList.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/BeanConvertorBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/ConversionResult.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/EnumConvertorBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/FormattingDateConvertor.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/FormattingDateConvertorBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/FormattingDecimalConvertorBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/Icu4jDateConvertor.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/Icu4jDateConvertorBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/typeimpl/AbstractDatatype.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/typeimpl/AbstractDatatypeBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/validationruleimpl/AbstractValidationRuleBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/validationruleimpl/EmailValidationRule.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/validationruleimpl/LengthValidationRule.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/validationruleimpl/Mod10ValidationRule.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/validationruleimpl/RangeValidationRule.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/validationruleimpl/RegExpValidationRule.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/validationruleimpl/ValueCountValidationRule.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/flow/javascript/Form.js
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/AbstractContainerDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/AbstractDatatypeWidgetDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/AbstractWidget.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/AbstractWidgetDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/AbstractWidgetDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/AggregateField.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/AggregateFieldDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/BooleanField.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/BooleanFieldDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/CaptchaField.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/Field.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/FieldDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/ImageMapDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/Messages.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/MultiValueField.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/Output.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/Repeater.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/RepeaterAction.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/RepeaterActionDefinition.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/RepeaterActionDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/RowActionDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/Upload.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/WidgetList.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/library/Library.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/tree/TreePath.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/tree/builder/SourceTreeModelDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/formmodel/tree/builder/TreeDefinitionBuilder.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/generation/FormsGenerator.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/generation/JXMacrosHelper.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/generation/SelectionListFilter.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/generation/SuggestionListGenerator.java
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/generation/jx-macros.xml
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/forms-advanced-field-styling.xsl
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/forms-calendar-styling.xsl
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/forms-htmlarea-styling.xsl
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/forms-page-styling.xsl
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/htmlarea/htmlarea.js
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/js/cforms.js
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/transformation/EffectWidgetReplacingPipe.java
    cocoon/blocks/forms/trunk/samples/dreamteam/content/teamTemplate.jx
    cocoon/blocks/forms/trunk/samples/dreamteam/sitemap.xmap
    cocoon/blocks/forms/trunk/samples/flow/forms_flow_example.js
    cocoon/blocks/forms/trunk/samples/forms/carselector_success_jx.xml
    cocoon/blocks/forms/trunk/samples/forms/carselector_template.xml
    cocoon/blocks/forms/trunk/samples/forms/datasource_chooser_template.xml
    cocoon/blocks/forms/trunk/samples/forms/dynamicrepeater_template.xml
    cocoon/blocks/forms/trunk/samples/forms/file_explorer_template.xml
    cocoon/blocks/forms/trunk/samples/forms/multipage_template.xml
    cocoon/blocks/forms/trunk/samples/forms/sampletree_template.xml
    cocoon/blocks/forms/trunk/samples/forms/tasktree_template.xml
    cocoon/blocks/forms/trunk/samples/forms/xdoceditor_template.xml
    cocoon/blocks/forms/trunk/samples/library/sitemap.xmap
    cocoon/blocks/forms/trunk/samples/sitemap.xmap
    cocoon/blocks/forms/trunk/samples/sqldatabase/sitemap.xmap
    cocoon/blocks/forms/trunk/samples/swan/forms/binding_template.xml
    cocoon/blocks/forms/trunk/samples/swan/forms/model_template.xml
    cocoon/blocks/forms/trunk/samples/swan/forms/sitemap_template.xml
    cocoon/blocks/forms/trunk/samples/swan/forms/template_template.xml
    cocoon/blocks/forms/trunk/samples/swan/sitemap.xmap
    cocoon/blocks/forms/trunk/samples/welcome.xml
    cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.java
    cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/EnumSelectionListTestCase.java
    cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListTestCase.java
    cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/datatype/convertor/EnumConvertorBuilderTestCase.java
    cocoon/blocks/forms/trunk/test/org/apache/cocoon/forms/formmodel/WidgetTestHelper.java

Modified: cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/GetContinuationAction.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/GetContinuationAction.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/GetContinuationAction.java (original)
+++ cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/GetContinuationAction.java Wed Oct 19 23:26:53 2005
@@ -22,9 +22,8 @@
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.ThreadSafe;
-import org.apache.cocoon.acting.AbstractAction;
+import org.apache.cocoon.acting.ServiceableAction;
 import org.apache.cocoon.components.flow.ContinuationsManager;
 import org.apache.cocoon.components.flow.FlowHelper;
 import org.apache.cocoon.components.flow.WebContinuation;
@@ -47,12 +46,11 @@
  * @since 2.1.8
  * @version $Id$
  */
-public class GetContinuationAction extends AbstractAction implements ThreadSafe, Serviceable, Disposable {
-    ServiceManager manager;
+public class GetContinuationAction extends ServiceableAction implements ThreadSafe, Disposable {
     ContinuationsManager contManager;
 
     public void service(ServiceManager manager) throws ServiceException {
-        this.manager = manager;
+        super.service(manager);
         this.contManager = (ContinuationsManager)manager.lookup(ContinuationsManager.ROLE);
     }
 
@@ -70,6 +68,8 @@
         if (wk == null || wk.disposed()) {
             return null;
         } else {
+            // Getting the continuation updates the last access time
+            wk.getContinuation();
             FlowHelper.setWebContinuation(objectModel, wk);
             return Collections.EMPTY_MAP;
         }

Modified: cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/resources/js/cocoon-ajax.js
URL: http://svn.apache.org/viewcvs/cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/resources/js/cocoon-ajax.js?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/resources/js/cocoon-ajax.js (original)
+++ cocoon/blocks/ajax/trunk/java/org/apache/cocoon/ajax/resources/js/cocoon-ajax.js Wed Oct 19 23:26:53 2005
@@ -13,33 +13,309 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-var Cocoon = {
-  // Dynamic JS loading code copied from scriptaculous.js
-  require: function(libraryName) {
-    // inserting via DOM fails in Safari 2.0, so brute force approach
-    document.write('<script type="text/javascript" src="'+libraryName+'"></script>');
-  },
-  
-  load: function() {
-    var scriptTags = document.getElementsByTagName("script");
-    for(var i=0;i<scriptTags.length;i++) {
-      if(scriptTags[i].src && scriptTags[i].src.match(/cocoon-ajax\.js$/)) {
-        var path = scriptTags[i].src.replace(/cocoon-ajax\.js$/,'');
-        this.require(path + 'prototype.js');
-        this.require(path + 'util.js');
-        this.require(path + 'effects.js');
-        this.require(path + 'dragdrop.js');
-        this.require(path + 'controls.js');
-        this.require(path + 'slider.js');
-        this.require(path + 'browserupdater.js');
-        this.require(path + 'domutils.js');
-        return;
-      }
-    }
-    alert("Could not load Cocoon Ajax libraries");
-  },
-  CForms: new Object(),
-  Ajax: new Object()
+
+if (typeof cocoon == "undefined") cocoon = {};
+
+cocoon.ajax = {};
+
+/**
+ * Create an XHR if the browser supports it.
+ */
+cocoon.ajax.newXMLHttpRequest = function () {
+    if (window.XMLHttpRequest)
+        return new XMLHttpRequest;
+    else if (window.ActiveXObject)
+        return new ActiveXObject("Microsoft.XMLHTTP");
+}
+
+//-------------------------------------------------------------------------------------------------
+
+cocoon.ajax.DOMUtils = {
+    // Stupid IE doesn't have these constants
+    ELEMENT_NODE : 1,
+    ATTRIBUTE_NODE : 2,
+    TEXT_NODE : 3,
+    CDATA_SECTION_NODE : 4,
+    ENTITY_REFERENCE_NODE : 5,
+    ENTITY_NODE : 6,
+    PROCESSING_INSTRUCTION_NODE : 7,
+    COMMENT_NODE : 8,
+    DOCUMENT_NODE : 9,
+    DOCUMENT_TYPE_NODE : 10,
+    DOCUMENT_FRAGMENT_NODE : 11
+}
+
+/**
+ * Get the first child element of an element, ignoring text nodes
+ */
+cocoon.ajax.DOMUtils.firstChildElement = function(element) {
+    var nodes = element.childNodes;
+    for (var i = 0; i < nodes.length; i++) {
+        var node = nodes[i];
+        if (node.nodeType == this.ELEMENT_NODE) {
+            return node;
+        }
+    }
+}
+
+/**
+ * Imports an element into a document, taking care of using the correct implementation
+ * so that the browser interprets it as displayable XML
+ */
+cocoon.ajax.DOMUtils.importNode = function(node, targetDoc) {
+    if(node.xml) {
+        // IE
+        var div = targetDoc.createElement("DIV");
+        div.innerHTML = node.xml;
+        return this.firstChildElement(div);
+    } else {
+        return this._importNode(node, targetDoc);
+    }
+}
+
+/**
+ * DOM implementation of importNode, recursively creating nodes
+ */
+cocoon.ajax.DOMUtils._importNode = function(node, targetDoc) {
+    switch(node.nodeType) {
+        case this.ELEMENT_NODE:
+            var element = targetDoc.createElement(node.nodeName);
+            //var element = targetDoc.createElementNS(node.namespaceURI, node.nodeName);
+            var attrs = node.attributes;
+            for (var i = 0; i < attrs.length; i++) {
+                attr = attrs[i];
+                element.setAttribute(attr.nodeName, attr.nodeValue);
+                //element.setAttributeNS(attr.namespaceURI, attr.nodeName, attr.nodeValue);
+            }
+            var children = node.childNodes;
+            for (var j = 0; j < children.length; j++) {
+                var imported = this.importNode(children[j], targetDoc);
+                if (imported) element.appendChild(imported);
+            }
+            return element;
+        break;
+        
+        case this.TEXT_NODE:
+            return targetDoc.createTextNode(node.nodeValue);
+        break;
+        
+        case this.CDATA_SECTION_NODE:
+            return targetDoc.createTextNode(node.nodeValue);
+        break;
+    }
+}
+
+//-------------------------------------------------------------------------------------------------
+// General purpose AJAX infrastructure to handle a BU ("browser update") response
+//
+// To implement a new system-wide instruction, add the corresponding function as a property of
+// BrowserUpdate.handlers.
+// To add a new handler for a given request, create a new BrowserUpdater and update its
+// handlers property.
+//-------------------------------------------------------------------------------------------------
+
+cocoon.ajax.BrowserUpdater = function() {
+    this.handlers = {};
+};
+
+cocoon.ajax.BrowserUpdater.highlight = null;
+
+cocoon.ajax.BrowserUpdater.prototype.processResponse = function(doc, request) {
+    var nodes = doc.documentElement.childNodes;
+    for (var i = 0; i < nodes.length; i++) {
+        var node = nodes[i];
+        if (node.nodeType == cocoon.ajax.DOMUtils.ELEMENT_NODE) {
+            var handler;
+            if (node.localName) {
+                handler = node.localName;
+            } else {
+                // No DOM2 support (IE6)
+                handler = node.nodeName.replace(/.*:/, "");
+            }
+            var handlerFunc = this.handlers[handler] || cocoon.ajax.BrowserUpdater.handlers[handler];
+            if (handlerFunc) {
+                handlerFunc(node);
+            } else {
+                this.handleError("No handler found for element " + handler, request);
+            }
+        }
+    }
+}
+
+/**
+ * System-wide handlers
+ */
+cocoon.ajax.BrowserUpdater.handlers = {
+    replace :  function(element) {
+        var id = element.getAttribute("id");
+        if (!id) {
+           alert("no id found on update element");
+           return;
+        }    
+        // Get the first child element (the first child may be some text!)
+        var firstChild = cocoon.ajax.DOMUtils.firstChildElement(element);
+    
+        var oldElement = document.getElementById(id);
+        
+        if (!oldElement) {
+            alert("no element '" + id + "' in source document");
+            return;
+        }
+    
+        var newElement = cocoon.ajax.DOMUtils.importNode(firstChild, document);
+        
+        // Warn: it's replace(new, old)!!
+        oldElement.parentNode.replaceChild(newElement, oldElement);
+        // Ensure the new node has the correct id
+        newElement.setAttribute("id", id);
+        
+        if (cocoon.ajax.BrowserUpdater.highlight) {
+           cocoon.ajax.BrowserUpdater.highlight(newElement);
+        }
+    }
+}
+
+cocoon.ajax.BrowserUpdater.handleError = function(message, request) {
+    if (confirm(message + "\nShow server response?")) {
+        var w = window.open(undefined, "Cocoon Error", "location=no");
+        if (w == undefined) {
+            alert("You must allow popups from this server to display the response.");
+        } else {
+	        var doc = w.document;
+	        doc.open();
+	        doc.write(request.responseText);
+	        doc.close();
+	    }
+    }
+}
+
+//-------------------------------------------------------------------------------------------------
+// Fader used to highlight page areas that have been updated
+// WARNING: don't rely too much on these effects, as they're very likely to be replaced
+//          by some third party library in the near future
+//-------------------------------------------------------------------------------------------------
+
+/**
+ * Create a fader that will progressively change an element's background color from
+ * a given color back to its original color.
+ *
+ * @param elt the element to fade
+ * @param color the starting color (default yellow)
+ * @param duration the fade duration in msecs (default 1000)
+ * @param fps the animation frames per seconds (default 25)
+ */
+cocoon.ajax.Fader = function(elt, color, duration, fps) {
+   // Set default values
+   if (!color) color = "#FFFF80"; // yellow
+   if (!duration) duration = 1000; // 1 sec
+   if (!fps) fps = 25; // 25 frames/sec
+   
+   this.element = elt;
+   this.fromColor = cocoon.ajax.Fader.colorToRgb(color);
+   this.toColor = cocoon.ajax.Fader.colorToRgb(cocoon.ajax.Fader.getBgColor(this.element));
+   
+   this.maxFrames = Math.round(fps * duration / 1000.0);
+   this.delay = duration / this.maxFrames;
+}
+
+/**
+ * Creates a default fader for a given element. This function can be used to set BrowserUpdate.highlight
+ */
+cocoon.ajax.Fader.fade = function(elt) {
+   new cocoon.ajax.Fader(elt).start();
+}
+
+cocoon.ajax.Fader.prototype.start = function() {
+   this.frame = 0;
+   this._changeColor();
+}
+
+cocoon.ajax.Fader.prototype._changeColor = function() {
+    if (this.frame < this.maxFrames) {
+        // Schedule the next iteration right now to keep a more accurate timing
+        var fader = this;
+        setTimeout(function() {fader._changeColor();}, this.delay);
+    }
+    var newColor = new Array(3);
+    for (var channel = 0; channel < 3; channel++) {
+        newColor[channel] = Math.floor(
+            this.fromColor[channel] * ((this.maxFrames - this.frame) / this.maxFrames) +
+            this.toColor[channel] * (this.frame/this.maxFrames)
+        );
+    }
+
+    this.frame++;
+    var color = cocoon.ajax.Fader.rgbToColor(newColor[0], newColor[1], newColor[2]);
+    this.element.style.backgroundColor = color;
+}
+
+/** Converts a "#RRGGBB" color as an array of 3 ints */
+cocoon.ajax.Fader.colorToRgb = function(hex) {
+    return [
+        parseInt(hex.substr(1,2),16),
+        parseInt(hex.substr(3,2),16),
+        parseInt(hex.substr(5,2),16) ];
+}
+
+/** Converts rgb values to a "#RRGGBB" color */
+cocoon.ajax.Fader.rgbToColor = function(r, g, b) {
+    r = r.toString(16); if (r.length == 1) r = '0' + r;
+    g = g.toString(16); if (g.length == 1) g = '0' + g;
+    b = b.toString(16); if (b.length == 1) b = '0' + b;
+    return "#" + r + g + b;
+}
+
+/** Get the background color of an element */
+cocoon.ajax.Fader.getBgColor = function(elt) {
+    while(elt) {
+        var c;
+        if (window.getComputedStyle) c = window.getComputedStyle(elt,null).getPropertyValue("background-color");
+        if (elt.currentStyle) c = elt.currentStyle.backgroundColor;
+        if ((c != "" && c != "transparent") || elt.tagName == "BODY") { break; }
+        elt = elt.parentNode;
+    }
+    if (c == undefined || c == "" || c == "transparent" || c == "white") c = "#FFFFFF";
+
+    var rgb = c.match(/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/);
+    if (rgb) return this.rgbToColor(parseInt(rgb[1]),parseInt(rgb[2]),parseInt(rgb[3]));
+    return c;
+}
+
+//-------------------------------------------------------------------------------------------------
+// Blinker used to highlight page areas that have been updated
+//-------------------------------------------------------------------------------------------------
+
+cocoon.ajax.Blinker = function(elt, color, hltDelay, normalDelay, blinks) {
+    this.element = elt;
+    if (!color) color = "#FFFF80"; // yellow
+    if (!hltDelay) hltDelay = 100;
+    if (!normalDelay) normalDelay = 100;
+    if (!blinks) blinks = 2;
+    
+    this.hltColor = color;
+    this.hltDelay = hltDelay;
+    this.normalDelay = normalDelay;
+    this.normalColor = cocoon.ajax.Fader.getBgColor(elt);
+    this.maxBlinks = blinks * 2;
+    this.blink = 0;
+}
+
+cocoon.ajax.Blinker.prototype.start = function() {
+   this.blink = 0;
+   this._doBlink();
+}
+
+cocoon.ajax.Blinker.blink = function(elt) {
+   new cocoon.ajax.Blinker(elt).start();
+}
+
+cocoon.ajax.Blinker.prototype._doBlink = function() {
+   var hlt = (this.blink % 2 == 0);
+   this.element.style.backgroundColor = hlt ? this.hltColor : this.normalColor;;
+   if (this.blink <= this.maxBlinks) {
+      var blinker = this;
+      setTimeout(function() {blinker._doBlink();}, hlt ? this.hltDelay : this.normalDelay);
+   }
+   this.blink++;
 }
 
-Cocoon.load();
\ No newline at end of file

Modified: cocoon/blocks/ajax/trunk/java/org/apache/cocoon/transformation/BrowserUpdateTransformer.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/ajax/trunk/java/org/apache/cocoon/transformation/BrowserUpdateTransformer.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/ajax/trunk/java/org/apache/cocoon/transformation/BrowserUpdateTransformer.java (original)
+++ cocoon/blocks/ajax/trunk/java/org/apache/cocoon/transformation/BrowserUpdateTransformer.java Wed Oct 19 23:26:53 2005
@@ -35,7 +35,7 @@
     public static final String BU_NSURI = "http://apache.org/cocoon/browser-update/1.0";
     
     public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException {
-        Deprecation.logger.warn("Please use the BrowserUpdateTransformer in the Ajax block");
+        Deprecation.logger.error("Please use the BrowserUpdateTransformer in the Ajax block");
         super.setup(resolver, objectModel, src, par);
     }
 }

Modified: cocoon/blocks/ajax/trunk/samples/file-browser.xml
URL: http://svn.apache.org/viewcvs/cocoon/blocks/ajax/trunk/samples/file-browser.xml?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/ajax/trunk/samples/file-browser.xml (original)
+++ cocoon/blocks/ajax/trunk/samples/file-browser.xml Wed Oct 19 23:26:53 2005
@@ -1,7 +1,32 @@
-<page>
+<page xmlns:dojo="http://www.dojotoolkit.org/2004/dojoml">
   <title>Cocoon suggests</title>
   <!-- include ajax scripts -->
-  <script type="text/javascript" src="resources/ajax/js/cocoon-ajax.js"/>
+  <!-- script type="text/javascript" src="resources/ajax/js/cocoon-ajax.js"/>
+  <script type="text/javascript" src="resources/js/DNDRepeater.js"/-->
+  
+  
+  <script>
+	djConfig = {
+		isDebug: true,
+		debugAtAllCosts: true
+	};
+  </script>
+  <script type="text/javascript" src="resources/ajax/dojo/dojo.js"/>
+  <script>
+  (function() {
+    var _func = dojo.hostenv.loadUri;
+    dojo.hostenv.loadUri = function() {
+      var path = arguments[0];
+        //dojo.debug("loading " + arguments[0]);
+      return _func.apply(this, arguments);
+    }
+   })();
+
+    function $(arg) { return (typeof arg == "string") ? document.getElementById(arg) : arg; }
+    dojo.require("dojo.fx.html");
+    dojo.require("dojo.io.*");
+    dojo.hostenv.writeIncludes();
+    </script>
   <style type="text/css">
     /* autocompletion popup */
     div.auto_complete {
@@ -31,18 +56,61 @@
     Please chose a file in the samples directory:<br/>
     <input  autocomplete="off" id="filename" name="filename" size="50"/>
     <div class="auto_complete" id="update"/>
-    <script type="text/javascript">
+    <!-- script type="text/javascript">
       // Parameters are [id of the input], [id of the suggestion div], [url to be called to get suggestions]
       new Ajax.Autocompleter('filename', 'update', 'file-browser-suggest');
-    </script>
+    </script-->
   </form>
   
   <p><em>Note: there's no submit button on this form as we don't really care about actually using
          that information...</em></p>
          
   <p>Free memory: <span id="freemem"></span></p>
-  <script type="text/javascript">
+  <!-- <script type="text/javascript">
     new Ajax.PeriodicalUpdater('freemem', 'display-freememory', {});
+  </script> -->
+  
+  <div id="blah">
+    <p id="blah.0"><span>Zero</span></p>
+    <p id="blah.1"><span>One</span></p>
+    <p id="blah.2"><span>Two</span></p>
+    <p id="blah.3"><span>Three</span></p>
+    <p id="blah.4"><span>Four</span></p>
+  </div>
+  
+  <div id="console">
+    blah
+  </div>
+  <!-- script>
+  new SortableRepeater('blah');
+  </script> -->
+  
+  <a onclick="dojo.fx.html.fadeOut($('blah'), 150, function() {dojo.fx.html.fadeIn($('blah'), 150)}); return false">Cliquette1 !</a>
+  <a onclick="dojo.fx.html.colorFadeIn($('blah'), [230, 230, 180], 1500, 1500);">Cliquette2 !</a>
+  <a onclick="yo(); return false;">Cliquette3 !</a>
+  
+  <script type="text/javascript">
+  function dump(obj) {
+      for (i in obj) {
+          dojo.debug(i + " - " + obj[i]);  
+      }
+  }
+    function yo() {
+        request = dojo.io.bind({
+           url: "display-freememory",
+           load: function(type, data, evt) { $('freemem').innerHTML = data; },
+           error: function(type, error) {  }
+        });
+    }
   </script>
 </content>
-</page>
\ No newline at end of file
+</page>
+
+
+
+
+
+
+
+
+

Modified: cocoon/blocks/ajax/trunk/samples/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/blocks/ajax/trunk/samples/sitemap.xmap?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/ajax/trunk/samples/sitemap.xmap (original)
+++ cocoon/blocks/ajax/trunk/samples/sitemap.xmap Wed Oct 19 23:26:53 2005
@@ -58,6 +58,9 @@
       </map:transform>
       <map:serialize/>
      </map:match>
+     <map:act type="set-header">
+       <map:parameter name="Connection" value="close"/>
+     </map:act>
      
      <!-- Main page of the file browser -->
      <map:match pattern="file-browser">
@@ -122,9 +125,19 @@
        <map:serialize type="xml"/>
      </map:match>
      
+     <map:match pattern="resources/*/**">
+       <map:read src="file://{realpath:}/../../src/blocks/{1}/trunk/java/org/apache/cocoon/{1}/resources/{2}"/>
+     </map:match>
      <!-- Generic pipeline to load resources in jars -->
      <map:match pattern="resources/*/**">
-       <map:read src="resource://org/apache/cocoon/{1}/resources/{2}"/>
+       <map:select type="resource-exists">
+         <map:when test="{0}">
+           <map:read src="{0}"/>
+         </map:when>
+         <map:otherwise>
+           <map:read src="resource://org/apache/cocoon/{1}/resources/{2}"/>
+         </map:otherwise>
+       </map:select>
      </map:match>
   </map:pipeline>
 </map:pipelines>

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/Constants.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/Constants.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/Constants.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/Constants.java Wed Oct 19 23:26:53 2005
@@ -16,41 +16,9 @@
 package org.apache.cocoon.forms;
 
 /**
- * Various constants used in the Cocoon Forms framework.
- * 
+ * @deprecated There are so many <code>Constant<code> classes around that this one has been renamed to {@link FormsConstants}.
  * @version $Id$
  */
-public final class Constants {
-// TODO : see this later
-//    /**
-//     * The value returned by {@link org.apache.cocoon.forms.formmodel.Widget#getValue()}
-//     * when the widget's value is invalid.
-//     */
-//    public static final Object INVALID_VALUE = new Object() {
-//        public String toString() {
-//            return "Invalid value";
-//        }
-//    };
-    
-    /** Namespace for Template elements */
-    public static final String TEMPLATE_NS = "http://apache.org/cocoon/forms/1.0#template";
-    public static final String TEMPLATE_PREFIX = "ft";
-    public static final String TEMPLATE_PREFIX_COLON = "ft:";
-
-    /** Namespace for Instance elements */
-    public static final String INSTANCE_NS = "http://apache.org/cocoon/forms/1.0#instance";
-    public static final String INSTANCE_PREFIX = "fi";
-    public static final String INSTANCE_PREFIX_COLON = "fi:";
-
-    /** Namespace for Definition elements */
-    public static final String DEFINITION_NS = "http://apache.org/cocoon/forms/1.0#definition";
-    public static final String DEFINITION_PREFIX = "fd";
-    public static final String DEFINITION_PREFIX_COLON = "fd:";
-
-    /** I18n catalogue containing the built-in messages. */
-    public static final String I18N_CATALOGUE = "forms";
-    public static final String I18N_NS = "http://apache.org/cocoon/i18n/2.1";
-    public static final String I18N_PREFIX = "i18n";
-    public static final String I18N_PREFIX_COLON = "i18n:";
-
+public class Constants extends FormsConstants {
+    // Moved!
 }

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/DefaultFormManager.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/DefaultFormManager.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/DefaultFormManager.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/DefaultFormManager.java Wed Oct 19 23:26:53 2005
@@ -172,7 +172,7 @@
 
     public FormDefinition getFormDefinition(Element formElement) throws Exception {
         // check that the root element is a fd:form element
-        if (!(formElement.getLocalName().equals("form") || Constants.DEFINITION_NS.equals(formElement.getNamespaceURI())))
+        if (!(formElement.getLocalName().equals("form") || FormsConstants.DEFINITION_NS.equals(formElement.getNamespaceURI())))
             throw new Exception("Expected a Cocoon Forms form element at " + DomHelper.getLocation(formElement));
 
         FormDefinitionBuilder formDefinitionBuilder = (FormDefinitionBuilder)widgetDefinitionBuilderSelector.select("form");

Added: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/FormsConstants.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/FormsConstants.java?rev=326838&view=auto
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/FormsConstants.java (added)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/FormsConstants.java Wed Oct 19 23:26:53 2005
@@ -0,0 +1,56 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.forms;
+
+/**
+ * Various constants used in the Cocoon Forms framework.
+ * 
+ * @version $Id$
+ */
+public class FormsConstants {
+// TODO : see this later
+//    /**
+//     * The value returned by {@link org.apache.cocoon.forms.formmodel.Widget#getValue()}
+//     * when the widget's value is invalid.
+//     */
+//    public static final Object INVALID_VALUE = new Object() {
+//        public String toString() {
+//            return "Invalid value";
+//        }
+//    };
+    
+    /** Namespace for Template elements */
+    public static final String TEMPLATE_NS = "http://apache.org/cocoon/forms/1.0#template";
+    public static final String TEMPLATE_PREFIX = "ft";
+    public static final String TEMPLATE_PREFIX_COLON = "ft:";
+
+    /** Namespace for Instance elements */
+    public static final String INSTANCE_NS = "http://apache.org/cocoon/forms/1.0#instance";
+    public static final String INSTANCE_PREFIX = "fi";
+    public static final String INSTANCE_PREFIX_COLON = "fi:";
+
+    /** Namespace for Definition elements */
+    public static final String DEFINITION_NS = "http://apache.org/cocoon/forms/1.0#definition";
+    public static final String DEFINITION_PREFIX = "fd";
+    public static final String DEFINITION_PREFIX_COLON = "fd:";
+
+    /** I18n catalogue containing the built-in messages. */
+    public static final String I18N_CATALOGUE = "forms";
+    public static final String I18N_NS = "http://apache.org/cocoon/i18n/2.1";
+    public static final String I18N_PREFIX = "i18n";
+    public static final String I18N_PREFIX_COLON = "i18n:";
+
+}

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

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

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/MultiValueJXPathBindingBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/MultiValueJXPathBindingBuilder.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/MultiValueJXPathBindingBuilder.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/MultiValueJXPathBindingBuilder.java Wed Oct 19 23:26:53 2005
@@ -17,7 +17,7 @@
 
 import java.util.Locale;
 
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.forms.datatype.convertor.Convertor;
 import org.apache.cocoon.forms.util.DomHelper;
 import org.apache.cocoon.i18n.I18nUtils;
@@ -56,7 +56,7 @@
             
             Convertor convertor = null;
             Locale convertorLocale = Locale.US;
-            Element convertorEl = DomHelper.getChildElement(bindingElem, Constants.DEFINITION_NS, "convertor");
+            Element convertorEl = DomHelper.getChildElement(bindingElem, FormsConstants.DEFINITION_NS, "convertor");
             if (convertorEl != null) {
                 String datatype = DomHelper.getAttribute(convertorEl, "datatype", null);
                 String localeStr = DomHelper.getAttribute(convertorEl, "locale", null);

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ValueJXPathBindingBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ValueJXPathBindingBuilder.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ValueJXPathBindingBuilder.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/binding/ValueJXPathBindingBuilder.java Wed Oct 19 23:26:53 2005
@@ -15,7 +15,7 @@
  */
 package org.apache.cocoon.forms.binding;
 
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.forms.datatype.convertor.Convertor;
 import org.apache.cocoon.forms.util.DomHelper;
 import org.apache.cocoon.i18n.I18nUtils;
@@ -54,7 +54,7 @@
 
             Convertor convertor = null;
             Locale convertorLocale = Locale.US;
-            Element convertorEl = DomHelper.getChildElement(bindingElm, Constants.DEFINITION_NS, "convertor");
+            Element convertorEl = DomHelper.getChildElement(bindingElm, FormsConstants.DEFINITION_NS, "convertor");
             if (convertorEl != null) {
                 String datatype = DomHelper.getAttribute(convertorEl, "datatype");
                 String localeStr = DomHelper.getAttribute(convertorEl, "locale", null);

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/AbstractJavaSelectionList.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/AbstractJavaSelectionList.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/AbstractJavaSelectionList.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/AbstractJavaSelectionList.java Wed Oct 19 23:26:53 2005
@@ -24,7 +24,7 @@
 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.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.forms.datatype.convertor.Convertor;
 import org.apache.cocoon.forms.datatype.convertor.DefaultFormatCache;
 import org.apache.cocoon.xml.AttributesImpl;
@@ -111,13 +111,13 @@
         }
 
         Convertor.FormatCache formatCache = new DefaultFormatCache();
-        contentHandler.startElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, XMLUtils.EMPTY_ATTRIBUTES);
+        contentHandler.startElement(FormsConstants.INSTANCE_NS, SELECTION_LIST_EL, FormsConstants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, XMLUtils.EMPTY_ATTRIBUTES);
 
         if (this.nullable) {
             AttributesImpl voidAttrs = new AttributesImpl();
             voidAttrs.addCDATAAttribute("value", "");
-            contentHandler.startElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL, voidAttrs);
-            contentHandler.endElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL);
+            contentHandler.startElement(FormsConstants.INSTANCE_NS, ITEM_EL, FormsConstants.INSTANCE_PREFIX_COLON + ITEM_EL, voidAttrs);
+            contentHandler.endElement(FormsConstants.INSTANCE_NS, ITEM_EL, FormsConstants.INSTANCE_PREFIX_COLON + ITEM_EL);
         }
 
         Iterator itemIt = items.iterator();
@@ -126,7 +126,7 @@
             item.generateSaxFragment(contentHandler, locale, formatCache);
         }
 
-        contentHandler.endElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL);
+        contentHandler.endElement(FormsConstants.INSTANCE_NS, SELECTION_LIST_EL, FormsConstants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL);
     }
 
     /**
@@ -198,8 +198,8 @@
 
             AttributesImpl attrs = new AttributesImpl();
             attrs.addCDATAAttribute("value", stringValue);
-            contentHandler.startElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL, attrs);
-            contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
+            contentHandler.startElement(FormsConstants.INSTANCE_NS, ITEM_EL, FormsConstants.INSTANCE_PREFIX_COLON + ITEM_EL, attrs);
+            contentHandler.startElement(FormsConstants.INSTANCE_NS, LABEL_EL, FormsConstants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
             if (this.label == null) {
                 contentHandler.characters(stringValue.toCharArray(), 0, stringValue.length());
             } else if (this.label instanceof XMLizable) {
@@ -208,8 +208,8 @@
                 String stringLabel = (String) this.label;
                 contentHandler.characters(stringLabel.toCharArray(), 0, stringLabel.length());
             }
-            contentHandler.endElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL);
-            contentHandler.endElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL);
+            contentHandler.endElement(FormsConstants.INSTANCE_NS, LABEL_EL, FormsConstants.INSTANCE_PREFIX_COLON + LABEL_EL);
+            contentHandler.endElement(FormsConstants.INSTANCE_NS, ITEM_EL, FormsConstants.INSTANCE_PREFIX_COLON + ITEM_EL);
         }
     }
 }

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/DefaultSelectionListBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/DefaultSelectionListBuilder.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/DefaultSelectionListBuilder.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/DefaultSelectionListBuilder.java Wed Oct 19 23:26:53 2005
@@ -25,7 +25,7 @@
 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.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.forms.datatype.convertor.Convertor;
 import org.apache.cocoon.forms.datatype.convertor.DefaultFormatCache;
 import org.apache.cocoon.forms.datatype.convertor.ConversionResult;
@@ -106,14 +106,14 @@
         NodeList children = selectionListElement.getChildNodes();
         for (int i = 0; children.item(i) != null; i++) {
             Node node = children.item(i);
-            if (convertor == null && node instanceof Element && Constants.DEFINITION_NS.equals(node.getNamespaceURI()) && "convertor".equals(node.getLocalName())) {
+            if (convertor == null && node instanceof Element && FormsConstants.DEFINITION_NS.equals(node.getNamespaceURI()) && "convertor".equals(node.getLocalName())) {
                 Element convertorConfigElement = (Element)node;
                 try {
                     convertor = datatype.getBuilder().buildConvertor(convertorConfigElement);
                 } catch (Exception e) {
                     throw new SAXException("Error building convertor from convertor configuration embedded in selection list XML.", e);
                 }
-            } else if (node instanceof Element && Constants.DEFINITION_NS.equals(node.getNamespaceURI()) && "item".equals(node.getLocalName())) {
+            } else if (node instanceof Element && FormsConstants.DEFINITION_NS.equals(node.getNamespaceURI()) && "item".equals(node.getLocalName())) {
                 if (convertor == null) {
                     convertor = datatype.getConvertor();
                 }
@@ -134,7 +134,7 @@
                 }
 
                 XMLizable label = null;
-                Element labelEl = DomHelper.getChildElement(element, Constants.DEFINITION_NS, "label");
+                Element labelEl = DomHelper.getChildElement(element, FormsConstants.DEFINITION_NS, "label");
                 if (labelEl != null) {
                     label = DomHelper.compileElementContent(labelEl);
                 }
@@ -155,7 +155,7 @@
             inputSource.setSystemId(source.getURI());
             Document document = DomHelper.parse(inputSource, this.serviceManager);
             Element selectionListElement = document.getDocumentElement();
-            if (!Constants.DEFINITION_NS.equals(selectionListElement.getNamespaceURI()) ||
+            if (!FormsConstants.DEFINITION_NS.equals(selectionListElement.getNamespaceURI()) ||
                     !"selection-list".equals(selectionListElement.getLocalName())) {
                 throw new Exception("Expected a fd:selection-list element at " +
                                     DomHelper.getLocation(selectionListElement));

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/DynamicSelectionList.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/DynamicSelectionList.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/DynamicSelectionList.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/DynamicSelectionList.java Wed Oct 19 23:26:53 2005
@@ -26,7 +26,7 @@
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.components.source.SourceUtil;
 import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.forms.datatype.convertor.Convertor;
 import org.apache.cocoon.forms.datatype.convertor.DefaultFormatCache;
 import org.apache.cocoon.forms.datatype.convertor.ConversionResult;
@@ -199,7 +199,7 @@
             if (convertorConfigNestingLevel > 0) {
                 convertorConfigNestingLevel++;
                 convertorConfigDOMBuilder.startElement(namespaceURI, localName,  qName, attributes);
-            } else if (namespaceURI.equals(Constants.DEFINITION_NS)) {
+            } else if (namespaceURI.equals(FormsConstants.DEFINITION_NS)) {
                 if (localName.equals("item")) {
                     if (convertor == null) {
                         // if no convertor was explicitely configured, use the default one of the datatype
@@ -221,12 +221,12 @@
                     }
                     AttributesImpl attrs = new AttributesImpl();
                     attrs.addCDATAAttribute("value", currentValueAsString);
-                    super.startElement(Constants.INSTANCE_NS, localName, Constants.INSTANCE_PREFIX_COLON + localName, attrs);
+                    super.startElement(FormsConstants.INSTANCE_NS, localName, FormsConstants.INSTANCE_PREFIX_COLON + localName, attrs);
                 } else if (localName.equals("label")) {
                     hasLabel = true;
-                    super.startElement(Constants.INSTANCE_NS, localName, Constants.INSTANCE_PREFIX_COLON + localName, attributes);
+                    super.startElement(FormsConstants.INSTANCE_NS, localName, FormsConstants.INSTANCE_PREFIX_COLON + localName, attributes);
                 } else if (localName.equals("selection-list")) {
-                    super.startElement(Constants.INSTANCE_NS, localName, Constants.INSTANCE_PREFIX_COLON + localName, attributes);
+                    super.startElement(FormsConstants.INSTANCE_NS, localName, FormsConstants.INSTANCE_PREFIX_COLON + localName, attributes);
                 } else if (convertor == null && localName.equals("convertor")) {
                     // record the content of this element in a dom-tree
                     convertorConfigDOMBuilder = new DOMBuilder();
@@ -255,19 +255,19 @@
                         throw new SAXException("Error building convertor from convertor configuration embedded in selection list XML.", e);
                     }
                 }
-            } else if (namespaceURI.equals(Constants.DEFINITION_NS)) {
+            } else if (namespaceURI.equals(FormsConstants.DEFINITION_NS)) {
                 if (localName.equals("item")) {
                     if (!hasLabel) {
                         // make the label now
-                        super.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
+                        super.startElement(FormsConstants.INSTANCE_NS, LABEL_EL, FormsConstants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
                         super.characters(currentValueAsString.toCharArray(), 0, currentValueAsString.length());
-                        super.endElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL);
+                        super.endElement(FormsConstants.INSTANCE_NS, LABEL_EL, FormsConstants.INSTANCE_PREFIX_COLON + LABEL_EL);
                     }
-                    super.endElement(Constants.INSTANCE_NS, localName, Constants.INSTANCE_PREFIX_COLON + localName);
+                    super.endElement(FormsConstants.INSTANCE_NS, localName, FormsConstants.INSTANCE_PREFIX_COLON + localName);
                 } else if (localName.equals("label")) {
-                    super.endElement(Constants.INSTANCE_NS, localName, Constants.INSTANCE_PREFIX_COLON + localName);
+                    super.endElement(FormsConstants.INSTANCE_NS, localName, FormsConstants.INSTANCE_PREFIX_COLON + localName);
                 } else if (localName.equals("selection-list")) {
-                    super.endElement(Constants.INSTANCE_NS, localName, Constants.INSTANCE_PREFIX_COLON + localName);
+                    super.endElement(FormsConstants.INSTANCE_NS, localName, FormsConstants.INSTANCE_PREFIX_COLON + localName);
                 } else {
                     super.endElement(namespaceURI, localName, qName);
                 }

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/EmptySelectionList.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/EmptySelectionList.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/EmptySelectionList.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/EmptySelectionList.java Wed Oct 19 23:26:53 2005
@@ -17,7 +17,7 @@
 
 import java.util.Locale;
 
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.transformation.I18nTransformer;
 import org.apache.cocoon.xml.AttributesImpl;
 import org.apache.cocoon.xml.XMLUtils;
@@ -50,15 +50,15 @@
 
     public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException {
         // Start wi:selection list
-        contentHandler.startElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, XMLUtils.EMPTY_ATTRIBUTES);
+        contentHandler.startElement(FormsConstants.INSTANCE_NS, SELECTION_LIST_EL, FormsConstants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, XMLUtils.EMPTY_ATTRIBUTES);
 
         // Start wi:item
         AttributesImpl itemAttrs = new AttributesImpl();
         itemAttrs.addCDATAAttribute("value", "");
-        contentHandler.startElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL, itemAttrs);
+        contentHandler.startElement(FormsConstants.INSTANCE_NS, ITEM_EL, FormsConstants.INSTANCE_PREFIX_COLON + ITEM_EL, itemAttrs);
 
         // Start wi:label
-        contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
+        contentHandler.startElement(FormsConstants.INSTANCE_NS, LABEL_EL, FormsConstants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
         if (this.text != null) {
 
             if (i18n) {
@@ -75,12 +75,12 @@
         }
         
         // End wi:label
-        contentHandler.endElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL);
+        contentHandler.endElement(FormsConstants.INSTANCE_NS, LABEL_EL, FormsConstants.INSTANCE_PREFIX_COLON + LABEL_EL);
         
         // End wi:item
-        contentHandler.endElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL);
+        contentHandler.endElement(FormsConstants.INSTANCE_NS, ITEM_EL, FormsConstants.INSTANCE_PREFIX_COLON + ITEM_EL);
         
         // End wi:selection-list
-        contentHandler.endElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL);
+        contentHandler.endElement(FormsConstants.INSTANCE_NS, SELECTION_LIST_EL, FormsConstants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL);
     }
 }

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/EnumSelectionList.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/EnumSelectionList.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/EnumSelectionList.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/EnumSelectionList.java Wed Oct 19 23:26:53 2005
@@ -19,7 +19,7 @@
 import java.lang.reflect.Modifier;
 import java.util.Locale;
 
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.xml.AttributesImpl;
 import org.apache.cocoon.xml.XMLUtils;
 import org.xml.sax.ContentHandler;
@@ -86,14 +86,14 @@
                                     Locale locale)
     throws SAXException {
         try {
-            contentHandler.startElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, XMLUtils.EMPTY_ATTRIBUTES);
+            contentHandler.startElement(FormsConstants.INSTANCE_NS, SELECTION_LIST_EL, FormsConstants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, XMLUtils.EMPTY_ATTRIBUTES);
             Field fields[] = clazz.getDeclaredFields();
             // Create void element
             if (nullable) {
                 AttributesImpl voidAttrs = new AttributesImpl();
                 voidAttrs.addCDATAAttribute("value", "");
-                contentHandler.startElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL, voidAttrs);
-                contentHandler.endElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL);
+                contentHandler.startElement(FormsConstants.INSTANCE_NS, ITEM_EL, FormsConstants.INSTANCE_PREFIX_COLON + ITEM_EL, voidAttrs);
+                contentHandler.endElement(FormsConstants.INSTANCE_NS, ITEM_EL, FormsConstants.INSTANCE_PREFIX_COLON + ITEM_EL);
             }
             for (int i = 0 ; i < fields.length ; ++i) {
                 int mods = fields[i].getModifiers();
@@ -103,18 +103,18 @@
                     // Output this item
                     AttributesImpl itemAttrs = new AttributesImpl();
                     itemAttrs.addCDATAAttribute("value", stringValue);
-                    contentHandler.startElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL, itemAttrs);
-                    contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
+                    contentHandler.startElement(FormsConstants.INSTANCE_NS, ITEM_EL, FormsConstants.INSTANCE_PREFIX_COLON + ITEM_EL, itemAttrs);
+                    contentHandler.startElement(FormsConstants.INSTANCE_NS, LABEL_EL, FormsConstants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
                     // TODO: make i18n element optional
-                    contentHandler.startElement(Constants.I18N_NS, TEXT_EL, Constants.I18N_PREFIX_COLON + TEXT_EL, XMLUtils.EMPTY_ATTRIBUTES);
+                    contentHandler.startElement(FormsConstants.I18N_NS, TEXT_EL, FormsConstants.I18N_PREFIX_COLON + TEXT_EL, XMLUtils.EMPTY_ATTRIBUTES);
                     contentHandler.characters(stringValue.toCharArray(), 0, stringValue.length());
-                    contentHandler.endElement(Constants.I18N_NS, TEXT_EL, Constants.I18N_PREFIX_COLON + TEXT_EL);
-                    contentHandler.endElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL);
-                    contentHandler.endElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL);
+                    contentHandler.endElement(FormsConstants.I18N_NS, TEXT_EL, FormsConstants.I18N_PREFIX_COLON + TEXT_EL);
+                    contentHandler.endElement(FormsConstants.INSTANCE_NS, LABEL_EL, FormsConstants.INSTANCE_PREFIX_COLON + LABEL_EL);
+                    contentHandler.endElement(FormsConstants.INSTANCE_NS, ITEM_EL, FormsConstants.INSTANCE_PREFIX_COLON + ITEM_EL);
                 }
             }
             // End the selection-list
-            contentHandler.endElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL);
+            contentHandler.endElement(FormsConstants.INSTANCE_NS, SELECTION_LIST_EL, FormsConstants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL);
         } catch (Exception e) {
             throw new SAXException("Got exception trying to get enum's values", e);
         }

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionList.java Wed Oct 19 23:26:53 2005
@@ -21,7 +21,7 @@
 import org.apache.avalon.framework.context.Context;
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.components.flow.FlowHelper;
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.forms.util.I18nMessage;
 import org.apache.cocoon.xml.AttributesImpl;
 import org.apache.cocoon.xml.XMLUtils;
@@ -118,17 +118,17 @@
         }
 
         // Start the selection-list
-        contentHandler.startElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, XMLUtils.EMPTY_ATTRIBUTES);
+        contentHandler.startElement(FormsConstants.INSTANCE_NS, SELECTION_LIST_EL, FormsConstants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, XMLUtils.EMPTY_ATTRIBUTES);
         if( this.nullable ) {
             final AttributesImpl voidAttrs = new AttributesImpl(  );
             voidAttrs.addCDATAAttribute( "value", "" );
-            contentHandler.startElement( Constants.INSTANCE_NS, ITEM_EL,
-                                         Constants.INSTANCE_PREFIX_COLON +
+            contentHandler.startElement( FormsConstants.INSTANCE_NS, ITEM_EL,
+                                         FormsConstants.INSTANCE_PREFIX_COLON +
                                          ITEM_EL, voidAttrs );
 
             if( this.nullText != null ) {
-                contentHandler.startElement( Constants.INSTANCE_NS, LABEL_EL,
-                                             Constants.INSTANCE_PREFIX_COLON +
+                contentHandler.startElement( FormsConstants.INSTANCE_NS, LABEL_EL,
+                                             FormsConstants.INSTANCE_PREFIX_COLON +
                                              LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES );
 
                 if( this.nullTextIsI18nKey ) {
@@ -143,13 +143,13 @@
                                                this.nullText.length(  ) );
                 }
 
-                contentHandler.endElement( Constants.INSTANCE_NS, LABEL_EL,
-                                           Constants.INSTANCE_PREFIX_COLON +
+                contentHandler.endElement( FormsConstants.INSTANCE_NS, LABEL_EL,
+                                           FormsConstants.INSTANCE_PREFIX_COLON +
                                            LABEL_EL );
             }
 
-            contentHandler.endElement( Constants.INSTANCE_NS, ITEM_EL,
-                                       Constants.INSTANCE_PREFIX_COLON +
+            contentHandler.endElement( FormsConstants.INSTANCE_NS, ITEM_EL,
+                                       FormsConstants.INSTANCE_PREFIX_COLON +
                                        ITEM_EL );
         }
 
@@ -182,9 +182,9 @@
             // Output this item
             AttributesImpl itemAttrs = new AttributesImpl();
             itemAttrs.addCDATAAttribute("value", stringValue);
-            contentHandler.startElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL, itemAttrs);
+            contentHandler.startElement(FormsConstants.INSTANCE_NS, ITEM_EL, FormsConstants.INSTANCE_PREFIX_COLON + ITEM_EL, itemAttrs);
             if (label != null) {
-                contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
+                contentHandler.startElement(FormsConstants.INSTANCE_NS, LABEL_EL, FormsConstants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
                 if (label instanceof XMLizable) {
                     ((XMLizable)label).toSAX(contentHandler);
                 }  else if( this.labelIsI18nKey ) {
@@ -200,12 +200,12 @@
                     String stringLabel = label.toString();
                     contentHandler.characters(stringLabel.toCharArray(), 0, stringLabel.length());
                 }
-                contentHandler.endElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL);
+                contentHandler.endElement(FormsConstants.INSTANCE_NS, LABEL_EL, FormsConstants.INSTANCE_PREFIX_COLON + LABEL_EL);
             }
-            contentHandler.endElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL);
+            contentHandler.endElement(FormsConstants.INSTANCE_NS, ITEM_EL, FormsConstants.INSTANCE_PREFIX_COLON + ITEM_EL);
         }
 
         // End the selection-list
-        contentHandler.endElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL);
+        contentHandler.endElement(FormsConstants.INSTANCE_NS, SELECTION_LIST_EL, FormsConstants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL);
     }
 }

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListBuilder.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListBuilder.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListBuilder.java Wed Oct 19 23:26:53 2005
@@ -18,7 +18,7 @@
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.ContextException;
 import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.forms.util.DomHelper;
 import org.w3c.dom.Element;
 
@@ -61,11 +61,11 @@
         String listPath = DomHelper.getAttribute(selectionListElement, "list-path");
         String valuePath = DomHelper.getAttribute(selectionListElement, "value-path");
         Map nspfx = DomHelper.getInheritedNSDeclarations(selectionListElement);
-        String i18nPfx = Constants.I18N_PREFIX;
+        String i18nPfx = FormsConstants.I18N_PREFIX;
         if (nspfx != null) {
-            i18nPfx = (String)nspfx.get( Constants.I18N_NS );
+            i18nPfx = (String)nspfx.get( FormsConstants.I18N_NS );
             if (i18nPfx == null ) {
-                i18nPfx = Constants.I18N_PREFIX;
+                i18nPfx = FormsConstants.I18N_PREFIX;
             }
         }
         String labelPath = DomHelper.getAttribute(selectionListElement, "label-path", null);

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/StaticSelectionList.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/StaticSelectionList.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/StaticSelectionList.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/StaticSelectionList.java Wed Oct 19 23:26:53 2005
@@ -17,7 +17,7 @@
 
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.forms.datatype.convertor.Convertor;
 import org.apache.cocoon.forms.datatype.convertor.DefaultFormatCache;
 import org.apache.cocoon.xml.AttributesImpl;
@@ -60,7 +60,7 @@
 
     public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException {
         Convertor.FormatCache formatCache = new DefaultFormatCache();
-        contentHandler.startElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, XMLUtils.EMPTY_ATTRIBUTES);
+        contentHandler.startElement(FormsConstants.INSTANCE_NS, SELECTION_LIST_EL, FormsConstants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL, XMLUtils.EMPTY_ATTRIBUTES);
 
         Iterator itemIt = this.items.iterator();
         while (itemIt.hasNext()) {
@@ -68,7 +68,7 @@
             item.generateSaxFragment(contentHandler, locale, formatCache);
         }
 
-        contentHandler.endElement(Constants.INSTANCE_NS, SELECTION_LIST_EL, Constants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL);
+        contentHandler.endElement(FormsConstants.INSTANCE_NS, SELECTION_LIST_EL, FormsConstants.INSTANCE_PREFIX_COLON + SELECTION_LIST_EL);
     }
 
     public List getItems() {
@@ -109,15 +109,15 @@
 
             AttributesImpl attrs = new AttributesImpl();
             attrs.addCDATAAttribute("value", stringValue);
-            contentHandler.startElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL, attrs);
-            contentHandler.startElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
+            contentHandler.startElement(FormsConstants.INSTANCE_NS, ITEM_EL, FormsConstants.INSTANCE_PREFIX_COLON + ITEM_EL, attrs);
+            contentHandler.startElement(FormsConstants.INSTANCE_NS, LABEL_EL, FormsConstants.INSTANCE_PREFIX_COLON + LABEL_EL, XMLUtils.EMPTY_ATTRIBUTES);
             if (this.label != null) {
                 this.label.toSAX(contentHandler);
             } else {
                 contentHandler.characters(stringValue.toCharArray(), 0, stringValue.length());
             }
-            contentHandler.endElement(Constants.INSTANCE_NS, LABEL_EL, Constants.INSTANCE_PREFIX_COLON + LABEL_EL);
-            contentHandler.endElement(Constants.INSTANCE_NS, ITEM_EL, Constants.INSTANCE_PREFIX_COLON + ITEM_EL);
+            contentHandler.endElement(FormsConstants.INSTANCE_NS, LABEL_EL, FormsConstants.INSTANCE_PREFIX_COLON + LABEL_EL);
+            contentHandler.endElement(FormsConstants.INSTANCE_NS, ITEM_EL, FormsConstants.INSTANCE_PREFIX_COLON + ITEM_EL);
         }
     }
 }

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/BeanConvertorBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/BeanConvertorBuilder.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/BeanConvertorBuilder.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/BeanConvertorBuilder.java Wed Oct 19 23:26:53 2005
@@ -15,7 +15,7 @@
  */
 package org.apache.cocoon.forms.datatype.convertor;
 
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.forms.util.DomHelper;
 
 import org.w3c.dom.Element;
@@ -61,13 +61,13 @@
         }
 
         final Element beanEl =
-            DomHelper.getChildElement( configElement, Constants.DEFINITION_NS,
+            DomHelper.getChildElement( configElement, FormsConstants.DEFINITION_NS,
                                        "bean", false );
         final String clazz =
             ( ( beanEl == null ) ? Object.class.getName(  )
               : beanEl.getFirstChild(  ).getNodeValue(  ) );
         final Element idPathEl =
-            DomHelper.getChildElement( configElement, Constants.DEFINITION_NS,
+            DomHelper.getChildElement( configElement, FormsConstants.DEFINITION_NS,
                                        "id-path", false );
         final String idPath =
             ( ( idPathEl != null )

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/ConversionResult.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/ConversionResult.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/ConversionResult.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/ConversionResult.java Wed Oct 19 23:26:53 2005
@@ -17,7 +17,7 @@
 
 import org.apache.cocoon.forms.validation.ValidationError;
 import org.apache.cocoon.forms.util.I18nMessage;
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 
 /**
  * Object returned as result of {@link Convertor#convertFromString(java.lang.String, java.util.Locale, org.apache.cocoon.forms.datatype.convertor.Convertor.FormatCache)}.
@@ -57,7 +57,7 @@
             "datatype.conversion-failed",
             new String[] {"datatype." + datatypeName},
             new boolean[] { true },
-            Constants.I18N_CATALOGUE
+            FormsConstants.I18N_CATALOGUE
         ));
         return new ConversionResult(validationError);
     }

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/EnumConvertorBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/EnumConvertorBuilder.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/EnumConvertorBuilder.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/EnumConvertorBuilder.java Wed Oct 19 23:26:53 2005
@@ -15,7 +15,7 @@
  */
 package org.apache.cocoon.forms.datatype.convertor;
 
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.forms.util.DomHelper;
 import org.w3c.dom.Element;
 
@@ -34,7 +34,7 @@
             return null;
         }
         Element enumEl = DomHelper.getChildElement(configElement,
-                Constants.DEFINITION_NS, "enum", true);
+                FormsConstants.DEFINITION_NS, "enum", true);
         String clazz = enumEl.getFirstChild().getNodeValue();
         return new EnumConvertor(clazz);
     }

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/FormattingDateConvertor.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/FormattingDateConvertor.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/FormattingDateConvertor.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/FormattingDateConvertor.java Wed Oct 19 23:26:53 2005
@@ -17,7 +17,7 @@
 
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.xml.AttributesImpl;
 
 import java.util.Locale;
@@ -152,8 +152,8 @@
             AttributesImpl attrs = new AttributesImpl();
             attrs.addCDATAAttribute("pattern", pattern);
             attrs.addCDATAAttribute("variant", this.variant);
-            contentHandler.startElement(Constants.INSTANCE_NS, CONVERTOR_EL, Constants.INSTANCE_PREFIX_COLON + CONVERTOR_EL, attrs);
-            contentHandler.endElement(Constants.INSTANCE_NS, CONVERTOR_EL, Constants.INSTANCE_PREFIX_COLON + CONVERTOR_EL);
+            contentHandler.startElement(FormsConstants.INSTANCE_NS, CONVERTOR_EL, FormsConstants.INSTANCE_PREFIX_COLON + CONVERTOR_EL, attrs);
+            contentHandler.endElement(FormsConstants.INSTANCE_NS, CONVERTOR_EL, FormsConstants.INSTANCE_PREFIX_COLON + CONVERTOR_EL);
         }
     }
 }

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/FormattingDateConvertorBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/FormattingDateConvertorBuilder.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/FormattingDateConvertorBuilder.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/FormattingDateConvertorBuilder.java Wed Oct 19 23:26:53 2005
@@ -16,7 +16,7 @@
 package org.apache.cocoon.forms.datatype.convertor;
 
 import org.w3c.dom.Element;
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.forms.util.DomHelper;
 import org.apache.cocoon.i18n.I18nUtils;
 
@@ -60,9 +60,9 @@
             }
         }
 
-        Element patternsEl = DomHelper.getChildElement(configElement, Constants.DEFINITION_NS, "patterns", false);
+        Element patternsEl = DomHelper.getChildElement(configElement, FormsConstants.DEFINITION_NS, "patterns", false);
         if (patternsEl != null) {
-            Element patternEl[] = DomHelper.getChildElements(patternsEl, Constants.DEFINITION_NS, "pattern");
+            Element patternEl[] = DomHelper.getChildElements(patternsEl, FormsConstants.DEFINITION_NS, "pattern");
             for (int i = 0; i < patternEl.length; i++) {
                 String locale = patternEl[i].getAttribute("locale");
                 String pattern = DomHelper.getElementText(patternEl[i]);

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/FormattingDecimalConvertorBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/FormattingDecimalConvertorBuilder.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/FormattingDecimalConvertorBuilder.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/FormattingDecimalConvertorBuilder.java Wed Oct 19 23:26:53 2005
@@ -16,7 +16,7 @@
 package org.apache.cocoon.forms.datatype.convertor;
 
 import org.w3c.dom.Element;
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.forms.util.DomHelper;
 import org.apache.cocoon.i18n.I18nUtils;
 
@@ -48,9 +48,9 @@
                 throw new Exception("Invalid value \"" + variant + "\" for variant attribute at " + DomHelper.getLocation(configElement));
         }
 
-        Element patternsEl = DomHelper.getChildElement(configElement, Constants.DEFINITION_NS, "patterns", false);
+        Element patternsEl = DomHelper.getChildElement(configElement, FormsConstants.DEFINITION_NS, "patterns", false);
         if (patternsEl != null) {
-            Element patternEl[] = DomHelper.getChildElements(patternsEl, Constants.DEFINITION_NS, "pattern");
+            Element patternEl[] = DomHelper.getChildElements(patternsEl, FormsConstants.DEFINITION_NS, "pattern");
             for (int i = 0; i < patternEl.length; i++) {
                 String locale = patternEl[i].getAttribute("locale");
                 String pattern = DomHelper.getElementText(patternEl[i]);

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/Icu4jDateConvertor.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/Icu4jDateConvertor.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/Icu4jDateConvertor.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/Icu4jDateConvertor.java Wed Oct 19 23:26:53 2005
@@ -19,7 +19,7 @@
 import java.util.Date;
 import java.util.Locale;
 
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.xml.AttributesImpl;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
@@ -156,8 +156,8 @@
             AttributesImpl attrs = new AttributesImpl();
             attrs.addCDATAAttribute("pattern", pattern);
             attrs.addCDATAAttribute("variant", this.variant);
-            contentHandler.startElement(Constants.INSTANCE_NS, CONVERTOR_EL, Constants.INSTANCE_PREFIX_COLON + CONVERTOR_EL, attrs);
-            contentHandler.endElement(Constants.INSTANCE_NS, CONVERTOR_EL, Constants.INSTANCE_PREFIX_COLON + CONVERTOR_EL);
+            contentHandler.startElement(FormsConstants.INSTANCE_NS, CONVERTOR_EL, FormsConstants.INSTANCE_PREFIX_COLON + CONVERTOR_EL, attrs);
+            contentHandler.endElement(FormsConstants.INSTANCE_NS, CONVERTOR_EL, FormsConstants.INSTANCE_PREFIX_COLON + CONVERTOR_EL);
         }
     }
 }

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/Icu4jDateConvertorBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/Icu4jDateConvertorBuilder.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/Icu4jDateConvertorBuilder.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/convertor/Icu4jDateConvertorBuilder.java Wed Oct 19 23:26:53 2005
@@ -17,7 +17,7 @@
 
 import java.util.Locale;
 
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.forms.util.DomHelper;
 import org.apache.cocoon.i18n.I18nUtils;
 import org.w3c.dom.Element;
@@ -61,9 +61,9 @@
             }
         }
 
-        Element patternsEl = DomHelper.getChildElement(configElement, Constants.DEFINITION_NS, "patterns", false);
+        Element patternsEl = DomHelper.getChildElement(configElement, FormsConstants.DEFINITION_NS, "patterns", false);
         if (patternsEl != null) {
-            Element patternEl[] = DomHelper.getChildElements(patternsEl, Constants.DEFINITION_NS, "pattern");
+            Element patternEl[] = DomHelper.getChildElements(patternsEl, FormsConstants.DEFINITION_NS, "pattern");
             for (int i = 0; i < patternEl.length; i++) {
                 String locale = patternEl[i].getAttribute("locale");
                 String pattern = DomHelper.getElementText(patternEl[i]);

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/typeimpl/AbstractDatatype.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/typeimpl/AbstractDatatype.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/typeimpl/AbstractDatatype.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/typeimpl/AbstractDatatype.java Wed Oct 19 23:26:53 2005
@@ -26,7 +26,7 @@
 import org.apache.cocoon.forms.datatype.convertor.Convertor;
 import org.apache.cocoon.forms.datatype.convertor.ConversionResult;
 import org.apache.cocoon.forms.validation.ValidationError;
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.xml.AttributesImpl;
 import org.outerj.expression.ExpressionContext;
 import org.xml.sax.ContentHandler;
@@ -99,8 +99,8 @@
     public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException {
         AttributesImpl attrs = new AttributesImpl();
         attrs.addCDATAAttribute("type", getDescriptiveName());
-        contentHandler.startElement(Constants.INSTANCE_NS, DATATYPE_EL, Constants.INSTANCE_PREFIX_COLON + DATATYPE_EL, attrs);
+        contentHandler.startElement(FormsConstants.INSTANCE_NS, DATATYPE_EL, FormsConstants.INSTANCE_PREFIX_COLON + DATATYPE_EL, attrs);
         getConvertor().generateSaxFragment(contentHandler, locale);
-        contentHandler.endElement(Constants.INSTANCE_NS, DATATYPE_EL, Constants.INSTANCE_PREFIX_COLON + DATATYPE_EL);
+        contentHandler.endElement(FormsConstants.INSTANCE_NS, DATATYPE_EL, FormsConstants.INSTANCE_PREFIX_COLON + DATATYPE_EL);
     }
 }

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/typeimpl/AbstractDatatypeBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/typeimpl/AbstractDatatypeBuilder.java?rev=326838&r1=326837&r2=326838&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/typeimpl/AbstractDatatypeBuilder.java (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/datatype/typeimpl/AbstractDatatypeBuilder.java Wed Oct 19 23:26:53 2005
@@ -25,7 +25,7 @@
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.ContextException;
 import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.cocoon.forms.Constants;
+import org.apache.cocoon.forms.FormsConstants;
 import org.apache.cocoon.forms.datatype.DatatypeBuilder;
 import org.apache.cocoon.forms.datatype.DatatypeManager;
 import org.apache.cocoon.forms.datatype.ValidationRule;
@@ -84,7 +84,7 @@
     }
 
     public void buildConvertor(Element datatypeEl, AbstractDatatype datatype) throws Exception {
-        Element convertorEl = DomHelper.getChildElement(datatypeEl, Constants.DEFINITION_NS, "convertor", false);
+        Element convertorEl = DomHelper.getChildElement(datatypeEl, FormsConstants.DEFINITION_NS, "convertor", false);
         Convertor convertor = buildConvertor(convertorEl);
         datatype.setConvertor(convertor);
     }
@@ -105,9 +105,9 @@
     }
 
     protected void buildValidationRules(Element datatypeElement, AbstractDatatype datatype, DatatypeManager datatypeManager) throws Exception {
-        Element validationElement = DomHelper.getChildElement(datatypeElement, Constants.DEFINITION_NS, "validation");
+        Element validationElement = DomHelper.getChildElement(datatypeElement, FormsConstants.DEFINITION_NS, "validation");
         if (validationElement != null) {
-            Element[] validationElements = DomHelper.getChildElements(validationElement, Constants.DEFINITION_NS);
+            Element[] validationElements = DomHelper.getChildElements(validationElement, FormsConstants.DEFINITION_NS);
             for (int i = 0; i < validationElements.length; i++) {
                 ValidationRule rule = datatypeManager.createValidationRule(validationElements[i]);
                 if (rule.supportsType(datatype.getTypeClass(), datatype.isArrayType())) {



Mime
View raw message