cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject svn commit: r109492 - /cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java
Date Thu, 02 Dec 2004 10:37:59 GMT
Author: sylvain
Date: Thu Dec  2 02:37:58 2004
New Revision: 109492

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

Modified: cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java?view=diff&rev=109492&p1=cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java&r1=109491&p2=cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java&r2=109492
==============================================================================
--- cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java	(original)
+++ cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Field.java	Thu Dec
 2 02:37:58 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