NamingException
{
String dataSource = Settings.getInstance().getSiteInfo(
CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
ActivityFacadeHome activityFacade = (ActivityFacadeHome)CVUtility.getHomeObject(
"com.centraview.activity.activityfacade.ActivityFacadeHome", "ActivityFacade");
try {
HttpSession session = request.getSession();
((ActivityForm)form).setLocale(request.getLocale());
// populate form bean for previous sub-activity
PopulateForm populateForm = new PopulateForm();
// set the form elements
populateForm.setForm(request, form);
// set form with respect to new opening page
form = populateForm.getForm(request, form, ConstantKeys.DETAIL);
request.setAttribute("actionName", "");
form = (ActionForm)request.getAttribute("activityform");
((ActivityForm)form).setLocale(request.getLocale());
// populate VOX
ActivityVOX activityVOX = new ActivityVOX(form);
// initialize VO
ActivityVO activityVO = activityVOX.getVO();
UserObject userObject = (UserObject)session.getAttribute("userobject");
int IndividualId = userObject.getIndividualID();
// this method will convert the date to GMT
// TODO timezone!
String currTimeZone = userObject.getUserPref().getTimeZone();
activityVO.changeTimeZoneOfAllDates(currTimeZone, "EST");
try {
ActivityFacade remote = activityFacade.create();
remote.setDataSource(dataSource);
int activityID = Integer.parseInt(request.getParameter(ConstantKeys.ACTIVITYID
.toLowerCase()));
activityVO.setActivityID(activityID); // to be removed