cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: rev 56374 - cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/taglib
Date Tue, 02 Nov 2004 14:22:27 GMT
Author: vgritsenko
Date: Tue Nov  2 06:22:26 2004
New Revision: 56374

Modified:
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/taglib/ConvertDateTimeTag.java
Log:
Default values for timeStyle and dateStyle


Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/taglib/ConvertDateTimeTag.java
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/taglib/ConvertDateTimeTag.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/taglib/ConvertDateTimeTag.java
Tue Nov  2 06:22:26 2004
@@ -72,9 +72,12 @@
         final UIComponentTag tag = FacesUtils.findParentUIComponentTag(this);
         DateTimeConverter converter = (DateTimeConverter) super.createConverter();
 
-        converter.setDateStyle((String) tag.evaluate(dateStyle));
         converter.setPattern((String) tag.evaluate(pattern));
-        converter.setTimeStyle((String) tag.evaluate(timeStyle));
+
+        String ds = dateStyle == null? "default": (String) tag.evaluate(dateStyle);
+        String ts = timeStyle == null? "default": (String) tag.evaluate(timeStyle);
+        converter.setDateStyle(ds);
+        converter.setTimeStyle(ts);
 
         String t = null;
         if (type != null) {

Mime
View raw message