/**
 * <p>Title: QuickEventsAction Class</p>
 * <p>Description:  This class initializes the atributes required for the QuickEvents webpage. </p>
 * Copyright:    Copyright (c) year
 * Company: Washington University, School of Medicine, St. Louis.
 * @author Mandar Deshmukh
 * @version 1.00
 * Created on July 3, 2006
 */
package edu.wustl.catissuecore.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import edu.wustl.catissuecore.bizlogic.BizLogicFactory;
import edu.wustl.catissuecore.util.global.Constants;
import edu.wustl.common.action.BaseAction;
import edu.wustl.common.bizlogic.IBizLogic;



/**
 * Created : 03-July-2006
 * @author mandar_deshmukh
 *
 * This class initializes the atributes required for the QuickEvents webpage.
 */
public class QuickEventsAction extends BaseAction {

    /**
     * Overrides the execute method of Action class.
     * Sets the various fields in QuickEvents webpage.
     * @param mapping object of ActionMapping
	 * @param form object of ActionForm
	 * @param request object of HttpServletRequest
	 * @param response object of HttpServletResponse
	 * @throws Exception generic exception
	 * @return value for ActionForward object
     */
	protected ActionForward executeAction(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception
    {
//		DefaultBizLogic bizLogic = BizLogicFactory.getDefaultBizLogic();
		IBizLogic bizLogic = BizLogicFactory.getInstance().getBizLogic(Constants.DEFAULT_BIZ_LOGIC);
   		String [] fields = {Constants.SYSTEM_IDENTIFIER};
     /*   List specimenList = bizLogic.getList(Specimen.class.getName(), fields, Constants.SYSTEM_IDENTIFIER, true); 	 	
  	 	request.setAttribute(Constants.SPECIMEN_ID_LIST, specimenList); */
  	 	
  	 	request.setAttribute(Constants.EVENT_PARAMETERS_LIST,Constants.EVENT_PARAMETERS);
  	 	
  	 	String pageOf = Constants.SUCCESS;
  	 	
        return mapping.findForward(pageOf);
    }
}

@@ -364,18 +364,16 @@
 ction;%0D%0A
-%0D%0A
 import j
@@ -458,16 +458,56 @@
 sponse;%0D
+%0Aimport javax.servlet.http.HttpSession;%0D
 %0A%0D%0Aimpor
@@ -594,16 +594,16 @@
 rward;%0D%0A
-
 import o
@@ -641,16 +641,65 @@
 apping;%0D
+%0Aimport org.apache.struts.action.ActionMessages;%0D
 %0A%0D%0Aimpor
@@ -2203,24 +2203,388 @@
 S);%0D%0A  %09 %09%0D%0A
+  %09 %09//add messages from session to request%0D%0A  %09 %09HttpSession session = request.getSession(true);%0D%0A  %09 %09if (session != null)%0D%0A  %09 %09%7B%0D%0A  %09 %09%09ActionMessages messages = (ActionMessages)session.getAttribute(%22messages%22);%0D%0A  %09 %09%09if (messages != null)%0D%0A  %09 %09%09%7B%0D%0A%09  %09 %09%09saveMessages(request,messages);%0D%0A%09  %09 %09%09session.removeAttribute(%22messages%22);%0D%0A  %09 %09%09%7D%0D%0A  %09 %09%7D%0D%0A  %09 %09%0D%0A
   %09 %09String 

add success message to QuickEvents page