<% /****************************************************************************** * Copyright (c) 2000-2004 e-Deal * * e-Deal S.A. * 55 rue Brillat Savarin * 75013 Paris * France * * T: +33 (0)1 53 80 80 30 * F: +33 (0)1 73 01 69 77 * http://www.e-deal.com * * La diffusion de ce code source sous quelque forme que ce soit sans * l'autorisation de E-DEAL est interdite. * * Vous êtes autorisés à modifier ce code source uniquement pour votre usage * propre et sous réserve que les mentions de copyright demeurent intactes. * * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour * responsable des dommages pouvant résulter de l'utilisation de ce code * source. * * ******************************************************************************/ %> <%@page session="true" import="com.edeal.frontline.*,java.util.*"%> <%@ page import="java.text.SimpleDateFormat" %> <%@ page import="com.edeal.frontline.FlLocale" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="java.util.TimeZone" %> <%@ page import="java.util.GregorianCalendar" %> <%@ page import="com.edeal.frontline.InteractionBean" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.ActorBean" %> <%@ page import="com.edeal.frontline.CorrespondentBean" %> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl"%> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); String id = null; try { id = Interaction.getIntID(); }catch (FieldNotInitializedException e){} if (id == null) { Interaction = (InteractionBean) session.getAttribute("Interaction"); pageContext.setAttribute("Interaction", Interaction); } String fromDate = Utils.getRequestParameter(request,"fromDate",false); Date baseDate = new Date(); if (fromDate != null) { baseDate = Utils.formatDateFromWeb(session,fromDate); Interaction.setIntDate(baseDate); }else { try { baseDate = Interaction.getIntDate(); }catch (FieldNotInitializedException e){} } try { id = Interaction.getIntID(); }catch (FieldNotInitializedException e){} String op = Utils.getRequestParameter(request,"op",false); if ( op != null && op.equals("removeActor") ){ String actID = Utils.getRequestParameter(request,"actID",false); try { Vector vectAct = Interaction.getIntActID(); if (vectAct.contains(actID)) vectAct.remove(actID); Interaction.setIntActID(vectAct); }catch (FieldNotInitializedException e){} }else if ( op != null && op.equals("addActor") ){ String actID = Utils.getRequestParameter(request,"actID",false); try { Vector vectAct = Interaction.getIntActID(); if (!vectAct.contains(actID)) vectAct.addElement(actID); Interaction.setIntActID(vectAct); }catch (FieldNotInitializedException e){} }else if ( op != null && op.equals("removeCor") ){ String corID = Utils.getRequestParameter(request,"corID",false); try { Vector vectCor = Interaction.getIntCorID(); if (vectCor.contains(corID)) vectCor.remove(corID); Interaction.setIntCorID(vectCor); }catch (FieldNotInitializedException e){} }else if ( op != null && op.equals("addPerson") ){ String perID = Utils.getRequestParameter(request,"perID",false); Vector vectCor = new Vector(); try { vectCor = Interaction.getIntCorID(); }catch (FieldNotInitializedException e){} String[] keys = {"CorPerID"}; String[] values = {perID}; String corID = CorrespondentBean.getCorrespondentIDBy(context, keys, values); if (!vectCor.contains(corID)) { vectCor.addElement(corID); Interaction.setIntCorID(vectCor); } } String actorID = (String)session.getAttribute("actorID"); try { Vector vectActor = Interaction.getIntActID(); }catch (FieldNotInitializedException e){ Vector vectActor = new Vector(); vectActor.addElement(actorID); Interaction.setIntActID(vectActor); } session.setAttribute("Interaction",Interaction); %> <fl:getMessage code="L309D" alt="Agenda"/>
<% if (id != null) { %> <% } %>
">

<%= Utils.formatToWebDate(session,baseDate,false) %> 
<% Vector vectActor = new Vector(); try { vectActor = Interaction.getIntActID(); }catch (FieldNotInitializedException e){} %> "> <% String[] fieldAct = {"ActID","ActName","ActFstName","ActMobile"}; String[][] queryAct = {{"ActID in ("+Utils.implodeList(vectActor,",","'")+")"}}; Vector vectAct = ActorBean.listSummary(session,fieldAct,queryAct); if (vectAct != null && vectAct.size() > 0) { %>
<% for (int k = 0; k < vectAct.size(); k++) { Hashtable row = (Hashtable) vectAct.elementAt(k); String actID = (String) row.get("ActID"); String fstName = (String) row.get("ActFstName"); String name = (String) row.get("ActName"); String mobile = (String) row.get("ActMobile"); %> <% } %>

 [+]

<% if ( k > 0) {%> [-] <% } %> <%= (fstName != null)? Utils.formatToWeb(fstName,false) +" " : "" %><%= Utils.formatToWeb(name,false) +" " %>
<% } %> <% Vector vectCorre = new Vector(); try { vectCorre = Interaction.getIntCorID(); %> "> <% }catch (FieldNotInitializedException e){} %> <% String[] fieldCor = {"CorID","CorPerID","CorPerID:PerName","CorPerID:PerFstName","CorPerID:PerMobile","CorPerID:PerMail","CorPerID:PerEntID:EntCorpName","CorPerID:PerEntID"}; String[][] queryCor = {{"CorID in ("+Utils.implodeList(vectCorre,",","'")+")"}}; Vector vectCor = CorrespondentBean.listSummary(session,fieldCor,queryCor); if (vectCor != null && vectCor.size() > 0) { %> <% for (int k = 0; k < vectCor.size(); k++) { Hashtable row = (Hashtable) vectCor.elementAt(k); String corID = (String) row.get("CorID"); String perID = (String) row.get("CorPerID"); String fstName = (String) row.get("CorPerID:PerFstName"); String name = (String) row.get("CorPerID:PerName"); String mobile = (String) row.get("CorPerID:PerMobile"); String mail = (String) row.get("CorPerID:PerMail"); String raison = (String) row.get("CorPerID:PerEntID:EntCorpName"); String entID = (String) row.get("CorPerID:PerEntID"); %> <% } %> <% } %>

 [+]

[-] <%= (fstName != null)? Utils.formatToWeb(fstName,false) +" " : "" %><%= Utils.formatToWeb(name,false)%> <% if (entID != null) { %>  <%= "("+Utils.formatToWeb(raison,false) +")"%> <% } %>