<%/****************************************************************************** * 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 pageEncoding="UTF-8" session="true" import="com.edeal.frontline.*,java.util.*,java.io.*"%> <%@ page import="com.edeal.frontline.HistoryBean" %> <%@ page import="com.edeal.frontline.ActorBean" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="java.util.Date" %> <%@ page import="java.text.SimpleDateFormat" %> <%@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()); String contextPath = (String) session.getAttribute("contextPath"); FlContext context = null; if (contextPath!=null) { context = Frontline.getContext(contextPath); } else { context = Frontline.getContext(request.getContextPath()); } DataDictionary dico = context.getDataDictionary(); String id = Utils.getRequestParameter(context, request, "id"); int nb = 0; String strNb = Utils.getRequestParameter(context, request, "nb"); if (strNb != null && !"".equals(strNb)) { try { nb = Integer.parseInt(strNb); } catch (NumberFormatException nfe) { } } //boolean isPopup = Utils.getRequestParameter(context, request, "popup") != null; String[] objFields = {"HisID", "HisDate", "HisActID", "HisPerID", "HisJouID", "HisSilID", "HisActID:ActFstName", "HisActID:ActName", "HisPerID:PerFstName", "HisPerID:PerName", "HisPerID:PerEntID", "HisPerID:PerEntID:EntCorpName", "HisJouID:JouFstName", "HisJouID:JouName", "HisSilID:SilFstName", "HisSilID:SilName", "HisCrDt"}; String[][] objQuery = {{"HisType = " + HistoryBean.OBJECT_UPDATE_LOG, "HisObjectID = " + Utils.formatToSQL(context, id)}}; String[] objOrderBy = {"HisDate DESC"}; Vector objList = HistoryBean.listSummary(context, objFields, objQuery, objOrderBy, 0, nb); //if (isPopup) { %> <fl:getMessage code="L6555" alt="Historique"/> <% //} //if (!isPopup) { %> <% if (objList != null && !objList.isEmpty()) { StringBuffer parents = new StringBuffer(); for (int i = 0; i < objList.size(); i++) { Hashtable row = (Hashtable)objList.elementAt(i); if (parents.length() > 0) { parents.append(", "); } parents.append(Utils.formatToSQL(context, (String)row.get("HisID"))); } String[] fldFields = {"HisName", "HisDataType", "HisParentID", "HisOldTextValue", "HisNewTextValue", "HisOldFobValue", "HisNewFobValue", "HisOldRefValue", "HisNewRefValue", "HisOldLongTextValue", "HisNewLongTextValue", "HisOldDateTimeValue", "HisNewDateTimeValue", "HisOldIntValue", "HisNewIntValue", "HisOldFloatValue", "HisNewFloatValue", "HisOldMvaTextValue", "HisNewMvaTextValue", "HisOldMvaDateTimeValue", "HisNewMvaDateTimeValue", "HisOldMvaIntValue", "HisNewMvaIntValue", "HisOldMvaFloatValue", "HisNewMvaFloatValue", "HisCrDt" }; String[][] fldQuery = {{"HisType = " + HistoryBean.FIELD_UPDATE_LOG, "HisParentID in (" + parents.toString() + ")", "HisObjectID = " + Utils.formatToSQL(context, id)}}; String[] fldOrderBy = {"HisName"}; Vector fldList = HistoryBean.listSummary(context, fldFields, fldQuery, fldOrderBy); Hashtable fieldModifications = new Hashtable(); if (fldList != null) { for (int i = 0; i < fldList.size(); i++) { Hashtable row = (Hashtable)fldList.elementAt(i); String parentID = (String)row.get("HisParentID"); if (parentID != null) { Vector v = (Vector)fieldModifications.get(parentID); if (v == null) { v = new Vector(); fieldModifications.put(parentID, v); } v.addElement(row); } } } %> <% } %> <% /****************************************************************************** * CVS Log File - This is no longer maintained! * * Revision 1.1 2004/07/23 18:20:21 brian * Initial Revision * *****************************************************************************/ %>