% /****************************************************************************** * 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 language="java"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="java.util.Map" %> <%@ page import="com.edeal.frontline.navigation.WebUtils" %> <%@ page import="com.edeal.frontline.ActorBean" %> <%@ page import="com.edeal.frontline.ObjectsBean" %> <%@ page import="com.edeal.frontline.AccessDeniedException" %> <%@ page import="com.edeal.frontline.FlLocale" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="com.edeal.frontline.*" %> <%@ page import="java.util.Iterator" %> <%@ 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(); // List code String lc = flRequest.getRequestParameterOrAttribute("lc"); if (lc == null) { lc = flRequest.getRequestParameterOrAttribute("code"); } if (lc == null) { lc = "DocList"; } request.setAttribute("lc", lc); // search criteria String sc = flRequest.getRequestParameterOrAttribute("sc"); // object uri String ou = flRequest.getRequestParameterOrAttribute("ou"); // id String objTitle = flRequest.getRequestParameterOrAttribute("obj.title"); String SfwID = flRequest.getRequestParameterOrAttribute("SfwID"); Map searchCriteria = new Hashtable(); if (sc != null) { searchCriteria = WebUtils.parseQueryString(sc); } request.setAttribute("selectedTab", "0"); Vector vectDocType = dico.getRefList(session, "DocType"); Vector vectFam = dico.getRefList(session, "DocCatID"); String[] fields= {"ObjID","ObjDisplay"}; String[] orderBy = {"ObjDisplay"}; String radicals = context.getContextParameter("Marketing.RefDocument.Objects"); if (radicals == null) { logger.error("Option \"Marketing.RefDocument.Objects\" has not been specified, ALL objects will be listed"); radicals = ""; } Vector rads = Utils.explodeList(radicals, ";"); String[] tmpArray = new String[rads.size()]; for (int i=0; i < rads.size(); i++) { tmpArray[i] = "ObjRadical="+Utils.formatToSQL(context, (String)rads.elementAt(i)); } Vector list = new Vector(); if (rads.size() > 0) { String[][] query = {tmpArray}; list =ObjectsBean.listSummary(context,fields,query,orderBy,true); } else { list =ObjectsBean.listSummary(context,fields,orderBy); } String idAdmin = dico.getRefIdByCode("DocRolesID","ADMIN"); /*Recherche des roles de l'acteur*/ String actorID = (String) session.getAttribute("actorID"); ActorBean actor = null; Vector roles = new Vector(); try { actor = new ActorBean(actorID,context); roles = actor.getRoles(); } catch(FrontlineException ex) { } /*****************************/ /* Est ce un administrateur */ boolean isAdmin = false; if (roles != null && roles.contains(idAdmin)) { isAdmin = true; } Vector vectNb = (Vector) searchCriteria.get("$$nb"); String nb = null; if (vectNb != null ) nb = (String) vectNb.firstElement(); Vector vectTitle = (Vector) searchCriteria.get("DocTitle"); String docTitle = null; if (vectTitle != null ) { docTitle = (String) vectTitle.firstElement(); } Vector vectActID = (Vector) searchCriteria.get("DocActID"); String actID = flRequest.getSearchCriteria("DocActID"); if (vectActID != null ) { actID = (String) vectActID.firstElement(); } String actName = null; if (actID != null) { ObjectsBean objBean = dico.getTable("sql","Actor"); actName = objBean.toString(session,actID); } Vector vectCatID = (Vector) searchCriteria.get("DocCatID"); String docCatID = null; if (vectCatID != null ) { docCatID = (String) vectCatID.firstElement(); } Vector vectType = (Vector) searchCriteria.get("DocType"); String docType = null; if (vectType != null ) { docType = (String) vectType.firstElement(); } Vector vectObjID = (Vector) searchCriteria.get("DocObjID"); String docObjID = null; if (vectObjID != null ) { docObjID = (String) vectObjID.firstElement(); } Vector vectIsArchive = (Vector) searchCriteria.get("DocIsArchive"); String docIsArchive = "0"; if (vectIsArchive != null ) { docIsArchive = (String) vectIsArchive.firstElement(); } String refID = null; %>
" method="get"> "> <% if (SfwID != null) { %> <% } %>