package gov.nih.nci.eagle.web.struts;

import java.io.IOException;

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

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;

/**
 * all instance variables (objects) in this action are injected
 * by the Spring container (application-context-services.xml). The
 * struts action itself is managed by spring by use of the
 * org.springframework.web.struts.DelegatingActionProxy class. The
 * action path can then be referenced by Spring in application-context-struts.xml)
 * All struts and spring config files can be found in the WEB-INF directory.
 * @author landyr
 *
 */

public class ClassComparisonAction extends DispatchAction{
    public ActionForward submit(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response) throws IOException	{
               
            return (mapping.findForward("success"));
    }
    
    public ActionForward setup(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)throws Exception {
        
        return mapping.findForward("success");
    } 
    
}

@@ -43,27 +43,294 @@
 ort 
-java.io.IOException
+gov.nih.nci.caintegrator.application.lists.ListType;%0Aimport gov.nih.nci.caintegrator.application.lists.UserList;%0Aimport gov.nih.nci.caintegrator.application.lists.UserListBeanHelper;%0A%0Aimport java.io.IOException;%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.List
 ;%0A%0Ai
@@ -648,16 +648,62 @@
 hAction;
+%0Aimport org.apache.struts.util.LabelValueBean;
 %0A%0A/**%0A *
@@ -1508,32 +1508,32 @@
 ctionForm form,%0A
-
             Http
@@ -1605,32 +1605,544 @@
 tion %7B%0A        %0A
+    %09UserListBeanHelper helper = new UserListBeanHelper(request.getSession());%0A        List%3CUserList%3E patientLists = helper.getLists(ListType.PatientDID);%0A        List%3CLabelValueBean%3E sampleGroups = new ArrayList%3CLabelValueBean%3E();%0A        for(UserList patientList: patientLists)%7B%0A        %09sampleGroups.add(new LabelValueBean(patientList.getName(),patientList.getClass().getCanonicalName() + %22#%22 + patientList.getName()));%0A        %7D%0A        ((ClassComparisonForm) form).setExistingGroups(sampleGroups);%0A        %0A
         return m

load the lists in setup method