cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject svn commit: r109491 - /cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java
Date Thu, 02 Dec 2004 10:37:47 GMT
Author: sylvain
Date: Thu Dec  2 02:37:45 2004
New Revision: 109491

URL: http://svn.apache.org/viewcvs?view=rev&rev=109491
Log:
Fix bug #32425 (NPE when Locale is null)
Modified:
   cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java?view=diff&rev=109491&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java&r1=109490&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java&r2=109491
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java
Thu Dec  2 02:37:45 2004
@@ -372,6 +372,10 @@
     }
 
     public void generateItemSaxFragment(ContentHandler contentHandler, Locale locale) throws
SAXException {
+        if (locale == null) {
+            locale = getForm().getLocale();
+        }
+
         if (enteredValue != null || value != null) {
             contentHandler.startElement(Constants.INSTANCE_NS, VALUE_EL, Constants.INSTANCE_PREFIX_COLON
+ VALUE_EL, XMLUtils.EMPTY_ATTRIBUTES);
             String stringValue;

Mime
View raw message