From 65e42e18b043e00f6476e3003a55af52c1e02a32 Mon Sep 17 00:00:00 2001 From: Pranay Pandey Date: Sat, 21 May 2016 07:12:29 +0000 Subject: [PATCH] [OFBIZ-7095] Fixed console error on Calendar Widget pagination. An exception is being thrown when pagination buttons are clicked on the Calendar widget. While clicking on the Prev or Next button from the Calendar widget in any view (Day, Week or Month), an exception is thrown due to unparseable date format. The main reason behind this was due to the 'start' parameter in the parameters map. At the time of creating a valid context for "getWorkEffortEventsByPeriod", the start parameter was expected to be in Timestamp format but was actually in String. Thanks Chandan Khandelwal for reporting the issue and providing patch. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1744856 13f79535-47bb-0310-9956-ffa450edef68 --- .../workeffort/WEB-INF/actions/calendar/Days.groovy | 2 +- .../workeffort/WEB-INF/actions/calendar/Month.groovy | 2 +- .../workeffort/WEB-INF/actions/calendar/Week.groovy | 2 +- applications/workeffort/widget/WorkEffortMenus.xml | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy b/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy index 7770ac5145..9783d970f6 100644 --- a/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy +++ b/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Days.groovy @@ -21,7 +21,7 @@ import java.util.*; import java.sql.Timestamp; import org.ofbiz.base.util.*; -String startParam = parameters.get("start"); +String startParam = parameters.startTime; Timestamp start = null; if (UtilValidate.isNotEmpty(startParam)) { start = new Timestamp(Long.parseLong(startParam)); diff --git a/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy b/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy index 98b631021f..4813430b64 100644 --- a/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy +++ b/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Month.groovy @@ -21,7 +21,7 @@ import java.sql.*; import java.util.*; import org.ofbiz.base.util.*; -startParam = parameters.start; +String startParam = parameters.startTime; Timestamp start = null; if (UtilValidate.isNotEmpty(startParam)) { start = new Timestamp(Long.parseLong(startParam)); diff --git a/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Week.groovy b/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Week.groovy index b0cbf2c31b..6fad7ccb9e 100644 --- a/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Week.groovy +++ b/applications/workeffort/webapp/workeffort/WEB-INF/actions/calendar/Week.groovy @@ -21,7 +21,7 @@ import java.util.*; import java.sql.Timestamp; import org.ofbiz.base.util.*; -String startParam = parameters.start; +String startParam = parameters.startTime; Timestamp start = null; if (UtilValidate.isNotEmpty(startParam)) { start = new Timestamp(Long.parseLong(startParam)); diff --git a/applications/workeffort/widget/WorkEffortMenus.xml b/applications/workeffort/widget/WorkEffortMenus.xml index a78e1faa7a..2f8949c88a 100644 --- a/applications/workeffort/widget/WorkEffortMenus.xml +++ b/applications/workeffort/widget/WorkEffortMenus.xml @@ -144,7 +144,7 @@ under the License. - + @@ -167,7 +167,7 @@ under the License. - + @@ -181,7 +181,7 @@ under the License. - + @@ -204,7 +204,7 @@ under the License. - + @@ -218,7 +218,7 @@ under the License. - + @@ -241,7 +241,7 @@ under the License. - +