From 04210dc6aa18ecc2efebb5eaebf9d729b556c313 Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Tue, 4 May 2010 15:04:00 +0000 Subject: [PATCH] BF [ 2996608 ] GridPanel is not displaying time Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2996608 --- .../adempiere/webui/component/GridTabRowRenderer.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/component/GridTabRowRenderer.java b/zkwebui/WEB-INF/src/org/adempiere/webui/component/GridTabRowRenderer.java index ce8ac71a1f..2e4127e9e9 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/component/GridTabRowRenderer.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/component/GridTabRowRenderer.java @@ -58,7 +58,10 @@ import org.zkoss.zhtml.Text; /** * Row renderer for GridTab grid. * @author hengsin - * + * + * @author Teo Sarca, teo.sarca@gmail.com + *
  • BF [ 2996608 ] GridPanel is not displaying time + * https://sourceforge.net/tracker/?func=detail&aid=2996608&group_id=176962&atid=955896 */ public class GridTabRowRenderer implements RowRenderer, RowRendererExt, RendererCtrl { @@ -191,7 +194,10 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt, Renderer } else if (gridTab.getTableModel().getColumnClass(getColumnIndex(gridField)).equals(Timestamp.class)) { - SimpleDateFormat dateFormat = DisplayType.getDateFormat(DisplayType.Date, AEnv.getLanguage(Env.getCtx())); + int displayType = DisplayType.Date; + if (gridField != null && gridField.getDisplayType() == DisplayType.DateTime) + displayType = DisplayType.DateTime; + SimpleDateFormat dateFormat = DisplayType.getDateFormat(displayType, AEnv.getLanguage(Env.getCtx())); return dateFormat.format((Timestamp)value); } else if (DisplayType.isNumeric(gridField.getDisplayType()))