cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simo...@apache.org
Subject svn commit: r400045 - in /cocoon: branches/BRANCH_2_1_X/status.xml trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/AbstractDatatypeWidgetDefinitionBuilder.java
Date Fri, 05 May 2006 11:10:54 GMT
Author: simoneg
Date: Fri May  5 04:10:51 2006
New Revision: 400045

URL: http://svn.apache.org/viewcvs?rev=400045&view=rev
Log:
Fixes bug COCOON-1844, a null locale was passed while parsing an initial value if no locale
attribute was given

Modified:
    cocoon/branches/BRANCH_2_1_X/status.xml
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/AbstractDatatypeWidgetDefinitionBuilder.java

Modified: cocoon/branches/BRANCH_2_1_X/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/status.xml?rev=400045&r1=400044&r2=400045&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml Fri May  5 04:10:51 2006
@@ -228,6 +228,9 @@
       The listener can be added in definition with an on-repeater-modified element. Added
support
       for these events in JavaScript listener.
     </action>
+    <action dev="SG" type="fix" fixes-bug="COCOON-1844">
+      Passing the default locale while parsing initial-value on a form if no locale attribute
was specified.
+    </action>
   </release>
   <release version="2.1.9" date="April 7 2006">
     <action dev="JBQ" type="fix">

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/AbstractDatatypeWidgetDefinitionBuilder.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/AbstractDatatypeWidgetDefinitionBuilder.java?rev=400045&r1=400044&r2=400045&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/AbstractDatatypeWidgetDefinitionBuilder.java
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/formmodel/AbstractDatatypeWidgetDefinitionBuilder.java
Fri May  5 04:10:51 2006
@@ -66,7 +66,7 @@
             Element initialValueElement = DomHelper.getChildElement(widgetElement, FormsConstants.DEFINITION_NS,
"initial-value", false);
             if (initialValueElement != null) {
                 String localeValue = DomHelper.getAttribute(initialValueElement, "locale",
null);
-                Locale locale = localeValue == null ? null : I18nUtils.parseLocale(localeValue);
+                Locale locale = localeValue == null ? Locale.getDefault() : I18nUtils.parseLocale(localeValue);
                 String value = DomHelper.getElementText(initialValueElement);
                 ConversionResult result = datatype.convertFromString(value, locale);
                 if (!result.isSuccessful()) {



Mime
View raw message