Author: haint
Date: 2011-10-07 07:27:15 -0400 (Fri, 07 Oct 2011)
New Revision: 7686
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java
Log:
GTNPORTAL-2155 NPE when creating UIFormDateTimeInput with a non-NULL value passed for Date
argument
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java
===================================================================
---
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java 2011-10-06
18:52:54 UTC (rev 7685)
+++
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java 2011-10-07
11:27:15 UTC (rev 7686)
@@ -66,11 +66,11 @@
public UIFormDateTimeInput(String name, String bindField, Date date, boolean
isDisplayTime)
{
super(name, bindField, String.class);
+ WebuiRequestContext requestContext = WebuiRequestContext.getCurrentInstance();
+ formatPattern(requestContext.getLocale());
+
setDate(date);
setDisplayTime(isDisplayTime);
-
- WebuiRequestContext requestContext = WebuiRequestContext.getCurrentInstance();
- formatPattern(requestContext.getLocale());
}
public UIFormDateTimeInput(String name, String bindField, Date date)
Show replies by date