<%/****************************************************************************** * 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="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="java.util.Vector" %> <%@ page import="java.text.*" %> <%@ page import="com.edeal.frontline.grid.GridData" %> <%@ page import="com.edeal.frontline.*" %> <%@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 = Competitor.getID(); } catch (FieldNotInitializedException fnie) { } boolean hasAttachment = false; try{ if (Competitor.getCptAttID()!=null && Competitor.getCptAttID().size()>0) { hasAttachment = true; } }catch(Exception e){} Vector vectCfi = dico.getRefList(session, "NotCfiID"); %> " ou="<%= \"/read_competitor.fl\" + (id != null ? \"?id=\" + id : \"\")%>">
" target="_blank">
">
" onselect="doSearch()">
<% if(vectCfi != null && !vectCfi.isEmpty()) { %> <% } %> " onfocus="if(this.value == '') this.value = ''" maxlength="100" onBlur="if(this.value == '') this.value = ''">
"/>
" visible="<%= context.getAutoDisplayManager().hasEntry(\"Competitor\", \"Concurrent 1\") %>"> " onselect="_grid__PIGE_EMB2_js_.render();">
<% Vector measuringMedias = null; try { measuringMedias = Competitor.getMeasuringMedias(); } catch (FieldNotInitializedException e) {}; if (measuringMedias !=null && measuringMedias.size()>0) { %> <% DecimalFormat doubleFormat = FlLocale.getInstance(session).getDecimalFormat("#,##0.##"); SimpleDateFormat monthFormat = FlLocale.getInstance(session).getSimpleDateFormat("MM"); SimpleDateFormat yearFormat = FlLocale.getInstance(session).getSimpleDateFormat("yyyy"); %> <% boolean toDisplay = false; String displayMonth = ""; String displayYear = ""; String lastMonth = ""; String lastYear = ""; String month = ""; String year = ""; double publicity = 0; double exclusive = 0; double citation = 0; double publicityS = 0; double exclusiveS = 0; double citationS = 0; MeasuringMediaBean measuringMedia = null; for (int i = 0; i <= measuringMedias.size(); i++) { if (i < measuringMedias.size()) { measuringMedia = (MeasuringMediaBean) measuringMedias.elementAt(i); } if (i == 0) { lastMonth = monthFormat.format(measuringMedia.getMemDate()); lastYear = yearFormat.format(measuringMedia.getMemDate()); } if (i < measuringMedias.size()) { month = monthFormat.format(measuringMedia.getMemDate()); year = yearFormat.format(measuringMedia.getMemDate()); if (!lastMonth.equals(month) || !lastYear.equals(year)) { publicityS = publicity; exclusiveS = exclusive; citationS = citation; publicity = measuringMedia.getPublicityValue(); exclusive = measuringMedia.getExclusiveValue(); citation = measuringMedia.getCitationValue(); displayMonth = lastMonth; displayYear = lastYear; toDisplay = true; lastMonth = month; lastYear = year; } else { publicity += measuringMedia.getPublicityValue(); exclusive += measuringMedia.getExclusiveValue(); citation += measuringMedia.getCitationValue(); } } if (i == measuringMedias.size()) { publicityS = publicity; exclusiveS = exclusive; citationS = citation; displayMonth = lastMonth; displayYear = lastYear; toDisplay = true; } if (toDisplay) { %> <% toDisplay = false; } } %>
    
<%= Utils.formatDate(context, session, displayMonth, displayYear) %> <%= doubleFormat.format(publicityS) %> <%= doubleFormat.format(exclusiveS) %> <%= doubleFormat.format(citationS) %>  
 
<% } %>
"/>
<% Vector attID = new Vector(); Vector attFileName = new Vector(); try { attID = Competitor.getCptAttID(); attFileName = Competitor.getCptAttFileName(); }catch (FieldNotInitializedException ex) {} if(attID != null && attID.size() > 0) { %> "> <% } %>