%@page import="com.edeal.frontline.navigation.WebUtils"%><% /****************************************************************************** * Copyright (c) 2000-2005 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"%> <%@ page import="java.net.URLEncoder"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="java.util.Date" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="com.edeal.frontline.SilhouetteBean" %> <%@ page import="com.edeal.frontline.PersonBean" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.controller.actions.SelectAction" %> <%@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; String strActID = (String)session.getAttribute("actorID"); try { id = EMailing.getID(); } catch (FieldNotInitializedException fnie) { } String[] ctlFields = {"CivID:Val", "FstName", "Name"}; int typePopulationIndex = 0; int typeNewsLetterIndex = 0; Vector vectRefPop = dico.getRefCodeList("EmaPopTypID"); for(int i = 0; i < vectRefPop.size(); i++) { Vector vectRow = (Vector)vectRefPop.elementAt(i); if("POPULATION".equals((String)vectRow.elementAt(1))) { typePopulationIndex = i; } else if("NEWSLETTER".equals((String)vectRow.elementAt(1))) { typeNewsLetterIndex = i; } } String htmlMsgRefID = dico.getRefIdByCode("MsgCtyID", "TEXT/HTML"); String textMsgRefID = dico.getRefIdByCode("MsgCtyID", "TEXT/PLAIN"); String htmlMsgQuery = "MsgCode = null" + (htmlMsgRefID == null ? "|MsgCtyID <> null" : "|MsgCtyID=" + Utils.formatToSQL(context, htmlMsgRefID)); String textMsgQuery = "MsgCode = null" + (textMsgRefID == null ? "|MsgCtyID <> null" : "|MsgCtyID=" + Utils.formatToSQL(context, textMsgRefID)); htmlMsgQuery = WebUtils.urlEncode(context, htmlMsgQuery); textMsgQuery = WebUtils.urlEncode(context, textMsgQuery); String emaStateID; try { emaStateID = EMailing.getEmaStateID(); } catch (FieldNotInitializedException e) { emaStateID = ""; } %> " ou="<%= \"/edit_silhouette.fl\" + (id != null ? \"?id=\" + id : \"\") %>"> "> "> <% } catch (FieldNotInitializedException ex) { %><% } %>" class="chpsTextObligatoire"> "> "> <% } catch (FieldNotInitializedException ex) { %><% } %>"> "> " border="0" width="17" height="17"> " border="0" width="17" height="17"> <% try { Vector vectID = EMailing.getEmaHtmlCtlGrpID(); for(int i = 0; i < vectID.size(); i++) { Vector usr = Utils.explodeList((String)vectID.elementAt(i), ":"); String usrID = (String)usr.elementAt(0); String usrType = (String)usr.elementAt(1); boolean isPerson = "Person".equals(usrType); String per =null; String sil =null; if(isPerson){ per = (new PersonBean(usrID,context)).toString(); }else{ sil = (new SilhouetteBean(usrID,context)).toString(); } String usrName = isPerson ? per : sil; %> "><%= Utils.formatToWeb(usrName, false) %><% } } catch (Exception ex) { } %> "> ">