package gov.nih.nci.cananolab.ui.particle;

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 gov.nih.nci.cananolab.ui.core.BaseAnnotationAction;

public class CompositionAction extends BaseAnnotationAction {
	public ActionForward summaryView(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("summaryView");
	}

	public ActionForward summaryEdit(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return mapping.findForward("summaryEdit");
	}
}

@@ -35,24 +35,603 @@
 article;%0D%0A%0D%0A
+import gov.nih.nci.cananolab.dto.common.UserBean;%0D%0Aimport gov.nih.nci.cananolab.dto.particle.composition.CompositionBean;%0D%0Aimport gov.nih.nci.cananolab.dto.particle.composition.NanoparticleEntityBean;%0D%0Aimport gov.nih.nci.cananolab.service.particle.NanoparticleCompositionService;%0D%0Aimport gov.nih.nci.cananolab.service.particle.impl.NanoparticleCompositionServiceLocalImpl;%0D%0Aimport gov.nih.nci.cananolab.service.particle.impl.NanoparticleCompositionServiceRemoteImpl;%0D%0Aimport gov.nih.nci.cananolab.ui.core.BaseAnnotationAction;%0D%0Aimport gov.nih.nci.cananolab.ui.core.InitSetup;%0D%0A%0D%0A
 import javax
@@ -665,16 +665,16 @@
 quest;%0D%0A
-
 import j
@@ -712,16 +712,56 @@
 sponse;%0D
+%0Aimport javax.servlet.http.HttpSession;%0D
 %0A%0D%0Aimpor
@@ -900,67 +900,60 @@
 g;%0D%0A
-%0D%0A
 import 
-gov.nih.nci.cananolab.ui.core.BaseAnnotationAction
+org.apache.struts.validator.DynaValidatorForm
 ;%0D%0A%0D
@@ -1145,32 +1145,32 @@
 onse response)%0D%0A
-
 %09%09%09throws Except
@@ -1168,32 +1168,844 @@
 ws Exception %7B%0D%0A
+%09%09DynaValidatorForm theForm = (DynaValidatorForm) form;%0D%0A%09%09String location = request.getParameter(%22location%22);%0D%0A%09%09//setupParticle(theForm, request, location);%0D%0A%09%09HttpSession session = request.getSession();%0D%0A%09%09UserBean user = (UserBean) session.getAttribute(%22user%22);%0D%0A%09%09String particleId = request.getParameter(%22particleId%22);%0D%0A%09%09NanoparticleCompositionService compService = null;%0D%0A%09%09if (location.equals(%22local%22)) %7B%0D%0A%09%09%09compService = new NanoparticleCompositionServiceLocalImpl();%0D%0A%09%09%7D else %7B%0D%0A%09%09%09String serviceUrl = InitSetup.getInstance().getGridServiceUrl(%0D%0A%09%09%09%09%09request, location);%0D%0A%09%09%09compService = new NanoparticleCompositionServiceRemoteImpl(%0D%0A%09%09%09%09%09serviceUrl);%0D%0A%09%09%7D%0D%0A%09%09CompositionBean compositionBean = compService.findCompositionByParticleSampleId(particleId);%0D%0A%09%09theForm.set(%22comp%22, compositionBean);%09%09%0D%0A
 %09%09return mapping

update summaryView