cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/datatype/convertor FormattingDateConvertor.java
Date Thu, 01 Jul 2004 07:30:40 GMT
bruno       2004/07/01 00:30:40

  Modified:    src/blocks/forms/java/org/apache/cocoon/forms/datatype/convertor
                        FormattingDateConvertor.java
  Log:
  Make sure generateSaxFragment always produces the active pattern, even if no
  pattern was explicitely defined in the form definition.
  
  Revision  Changes    Path
  1.4       +3 -4      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/datatype/convertor/FormattingDateConvertor.java
  
  Index: FormattingDateConvertor.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/datatype/convertor/FormattingDateConvertor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FormattingDateConvertor.java	6 May 2004 14:59:44 -0000	1.3
  +++ FormattingDateConvertor.java	1 Jul 2004 07:30:40 -0000	1.4
  @@ -25,6 +25,7 @@
   import java.util.Locale;
   import java.util.Date;
   import java.text.ParseException;
  +import java.text.SimpleDateFormat;
   
   /**
    * A Convertor for {@link java.util.Date Date} objects backed by the
  @@ -146,9 +147,7 @@
       private static final String CONVERTOR_EL = "convertor";
   
       public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws
SAXException {
  -        String pattern = (String)localizedPatterns.get(locale);
  -        if (pattern == null)
  -            pattern = nonLocalizedPattern;
  +        String pattern = getDateFormat(locale).toPattern();
   
           if (pattern != null) {
               AttributesImpl attrs = new AttributesImpl();
  
  
  

Mime
View raw message