%@ page language="java"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.grid.GridData" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.navigation.WebUtils" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.MessagesBean" %> <%@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); String sc = flRequest.getRequestParameterOrAttribute("sc"); FlContext context = flRequest.getContext(); %> " listTitle="<%= Utils.getMessage(session, \"L64A9\", false, true, \"Liste des newsletters\") %>" > " height="120"> <% String sender = context.getContextParameter("NewsLetter.Sender"); %> : <%= sender == null ? Utils.getMessage(session, "L004B", "(Non renseigné)") : Utils.formatToWeb(sender, false) %> <% String[] fields = {"MsgID", "MsgSubject", "MsgCtyID:RefVal", "MsgCode"}; String[][] query = {{"MsgCode like " + Utils.formatToSQL(context, "NLT%")}}; String[] orderBy = {"MsgCode"}; Vector vectMsg = MessagesBean.listSummary(context, fields, query, orderBy); Hashtable hashMsg = new Hashtable(); if(vectMsg != null && vectMsg.size() > 0) { for(int i = 0; i < vectMsg.size(); i++) { Hashtable row = (Hashtable)vectMsg.elementAt(i); String msgCode = (String)row.get("MsgCode"); String msgCtyVal = (String)row.get("MsgCtyID:RefVal"); if(msgCode != null && msgCtyVal != null) { if("TEXT/PLAIN".equalsIgnoreCase(msgCtyVal)) { hashMsg.put(msgCode + "TEXT/PLAIN", row); } else { hashMsg.put(msgCode + "TEXT/HTML", row); } } } } String[][] msgType = {{"NLT1", Utils.getMessage(session, "L004C", "un nouvel abonné")}, {"NLT2", Utils.getMessage(session, "L004D", "une modification d'abonnements")}, {"NLT3", Utils.getMessage(session, "L004E", "Un désabonnement complet")}}; %> <% for(int i = 0; i < msgType.length; i++) { %> <%= msgType[i][1] %> <% Hashtable row = (Hashtable)hashMsg.get(msgType[i][0] + "TEXT/PLAIN"); if(row == null) { %> " border="0" width="15" height="15"> <% } else { %> <%= Utils.formatToWeb(row.get("MsgSubject"), false) %> ');">" border="0" width="15" height="15"> ', '<%= Utils.formatToJavascript((String)row.get("MsgSubject")) %>')">" border="0" width="15" height="15"> <% } %> <% row = (Hashtable)hashMsg.get(msgType[i][0] + "TEXT/HTML"); if(row == null) { %> " border="0" width="15" height="15"> " border="0" width="15" height="15"> <% } else { %> <%= Utils.formatToWeb(row.get("MsgSubject"), false) %> <% if("MIME".equalsIgnoreCase((String)row.get("MsgCtyID:RefVal"))) { %><% } else { %>');">" border="0" width="15" height="15"><% } %> ', '<%= Utils.formatToJavascript((String)row.get("MsgSubject")) %>')">" border="0" width="15" height="15"> <% } %> <% } %>