You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ke...@apache.org on 2006/07/18 03:01:49 UTC
svn commit: r422934 - in /maven/continuum/trunk/continuum-webapp/src/main:
java/org/apache/maven/continuum/web/view/commons/DateCell.java
resources/extremecomponents.properties
Author: kenney
Date: Mon Jul 17 18:01:48 2006
New Revision: 422934
URL: http://svn.apache.org/viewvc?rev=422934&view=rev
Log:
Fixed extremecomponents.properties so the DateCell is actually
used, instead of the default DateCell from extremecomponents.
Fixed datecell so a default datetime format is used when none
is specified - so something human readable is produced instead
of milliseconds since the epoch.
Modified:
maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/commons/DateCell.java
maven/continuum/trunk/continuum-webapp/src/main/resources/extremecomponents.properties
Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/commons/DateCell.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/commons/DateCell.java?rev=422934&r1=422933&r2=422934&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/commons/DateCell.java (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/commons/DateCell.java Mon Jul 17 18:01:48 2006
@@ -16,6 +16,7 @@
* limitations under the License.
*/
+import org.apache.commons.lang.time.DateFormatUtils;
import org.codehaus.plexus.util.StringUtils;
import org.extremecomponents.table.bean.Column;
import org.extremecomponents.table.cell.DisplayCell;
@@ -51,7 +52,14 @@
value = cal.getTime();
}
- value = ExtremeUtils.formatDate( column.getParse(), column.getFormat(), value, locale );
+ String format = column.getFormat();
+
+ if ( StringUtils.isEmpty( format ) )
+ {
+ format = DateFormatUtils.SMTP_DATETIME_FORMAT.getPattern();
+ }
+
+ value = ExtremeUtils.formatDate( column.getParse(), format, value, locale );
column.setPropertyValue( value );
Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/extremecomponents.properties
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/extremecomponents.properties?rev=422934&r1=422933&r2=422934&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/extremecomponents.properties (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/extremecomponents.properties Mon Jul 17 18:01:48 2006
@@ -1,5 +1,5 @@
table.format_date=MMM dd, yyyy hh:mm:ss aaa z
-table.cell_date=org.apache.maven.continuum.web.view.commons.DateCell
+column.cell.date=org.apache.maven.continuum.web.view.commons.DateCell
table.border=1
table.cellspacing=2