|| typeOfActivity.equals(ConstantKeys.NEXTACTION)
|| typeOfActivity.equals(ConstantKeys.TODO) || typeOfActivity.equals(ConstantKeys.TASK))) {
ActivityHelperHome home = (ActivityHelperHome)CVUtility.getHomeObject(
"com.centraview.activity.helper.ActivityHelperHome", "ActivityHelper");
try {
ActivityHelper remote = home.create();
remote.setDataSource(dataSource);
String findActivityId = request.getParameter("rowId");
typeOfActivity = remote.getTypeOfActivity(Integer.parseInt(findActivityId))
.toUpperCase();
} catch (Exception e) {
logger.error("[execute]: Exception", e);
}
}
} else if (request.getParameter(ConstantKeys.TYPEOFACTIVITY) != null) {
typeOfActivity = request.getParameter(ConstantKeys.TYPEOFACTIVITY);
// call to activity helper to get typeOfActivity if
// here we get value from "TYPEOFACTIVITYLIST" hidden text box from jsp
// pages
if (!(typeOfActivity.equals(ConstantKeys.APPOINTMENT)
|| typeOfActivity.equals(ConstantKeys.CALL)
|| typeOfActivity.equals(ConstantKeys.FORECASTSALE)
|| typeOfActivity.equals(ConstantKeys.LITERATUREREQUEST)
|| typeOfActivity.equals(ConstantKeys.MEETING)
|| typeOfActivity.equals(ConstantKeys.NEXTACTION)
|| typeOfActivity.equals(ConstantKeys.TODO) || typeOfActivity.equals(ConstantKeys.TASK))) {
ActivityHelperHome home = (ActivityHelperHome)CVUtility.getHomeObject(
"com.centraview.activity.helper.ActivityHelperHome", "ActivityHelper");
try {
ActivityHelper remote = home.create();
remote.setDataSource(dataSource);
String findActivityId = request.getParameter("rowId");
typeOfActivity = remote.getTypeOfActivity(Integer.parseInt(findActivityId))
.toUpperCase();
} catch (Exception e) {
logger.error("[execute]: Exception", e);
}
} else {
typeOfActivity = request.getParameter(ConstantKeys.TYPEOFACTIVITY).toUpperCase();
}
} else {
// Something tells me, we'll NEVER reach this point!!!
typeOfActivity = ConstantKeys.APPOINTMENT;
}
if (typeOfActivity.equals("NEXT ACTION")) {
typeOfActivity = ConstantKeys.NEXTACTION;
} else if (typeOfActivity.equals("TO DO")) {
typeOfActivity = ConstantKeys.TODO;
}
// set request to pass to jsp
request.setAttribute(ConstantKeys.TYPEOFACTIVITY, typeOfActivity);
// set default opening window to detail sub-type activity
request.setAttribute(ConstantKeys.TYPEOFSUBACTIVITY, ConstantKeys.DETAIL);
request.setAttribute(ConstantKeys.TYPEOFOPERATION, ConstantKeys.EDIT);
request.setAttribute("actionName", "");
String currTimeZone = userObject.getUserPref().getTimeZone();
String findActivityId = request.getParameter("rowId");
ActivityVO activityVO = new ActivityVO();
ActivityFacadeHome aa = (ActivityFacadeHome)CVUtility.getHomeObject(
"com.centraview.activity.activityfacade.ActivityFacadeHome", "ActivityFacade");
ActivityFacade remote = aa.create();
remote.setDataSource(dataSource);
activityVO = remote.getActivity(Integer.parseInt(findActivityId), individualId);
activityVO.changeTimeZoneOfAllDates("EST", currTimeZone);
ActivityForm actFrm = (ActivityForm)form;
ActivityGenericFillVOX agf = new ActivityGenericFillVOX();
actFrm.setLocale(request.getLocale());