struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From musa...@apache.org
Subject svn commit: r512578 - /struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/components/DateTimePicker.java
Date Wed, 28 Feb 2007 02:44:59 GMT
Author: musachy
Date: Tue Feb 27 18:44:58 2007
New Revision: 512578

URL: http://svn.apache.org/viewvc?view=rev&rev=512578
Log:
WW-1777 DateTimePicker now supports expressions in the property "displayFormat"

Modified:
    struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/components/DateTimePicker.java

Modified: struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/components/DateTimePicker.java
URL: http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/components/DateTimePicker.java?view=diff&rev=512578&r1=512577&r2=512578
==============================================================================
--- struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/components/DateTimePicker.java
(original)
+++ struts/struts2/branches/STRUTS_2_0_X/core/src/main/java/org/apache/struts2/components/DateTimePicker.java
Tue Feb 27 18:44:58 2007
@@ -299,13 +299,13 @@
             // try to parse a date
             String dateStr = obj.toString();
             if(dateStr.equalsIgnoreCase("today"))
-                return  RFC3339_FORMAT.format(new Date());
+                return RFC3339_FORMAT.format(new Date());
 
             try {
                 Date date = null;
                 if(this.displayFormat != null) {
                     SimpleDateFormat format = new SimpleDateFormat(
-                            this.displayFormat);
+                            (String) getParameters().get("displayFormat"));
                     date = format.parse(dateStr);
                     return RFC3339_FORMAT.format(date);
                 } else {



Mime
View raw message