% /****************************************************************************** * Copyright (c) 2000-2006 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.FlContext" %><%@ page import="com.edeal.frontline.Utils" %><%@ page import="com.edeal.frontline.navigation.FlRequest" %><%@ page import="com.edeal.frontline.PersonBean" %><%@ page import="com.edeal.frontline.FieldNotInitializedException" %><%@ page import="java.util.Vector" %><%@ page import="com.edeal.frontline.LinkBean" %><%@ page import="java.util.Hashtable" %><%@ page import="com.edeal.frontline.navigation.WebUtils" %><%@ page import="com.edeal.frontline.DataDictionary" %><%@ 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 = flRequest.getParameter("id"); String perID = flRequest.getParameter("perID"); LinkBean Link; if (id != null) { Link = new LinkBean(id, session); } else { Link = new LinkBean(session); } String firstPer = null; try { firstPer = Link.getLinFirst(); } catch (FieldNotInitializedException e) { if (perID != null && !"".equals(perID)) { firstPer = perID; Link.setLinFirst(perID); } } String secondPer = null; try { secondPer = Link.getLinSecond(); } catch (FieldNotInitializedException e) { } // Récupération personne String[] fields = { "PerID", "PerCivID", "PerName", "PerFstName" }; String[][] query1 = {{ "PerID = " + Utils.formatToSQL(context, firstPer) }}; Vector list1 = PersonBean.listSummary(session, fields, query1); Vector list2 = new Vector(); if (secondPer != null) { String[][] query2 = {{ "PerID = " + Utils.formatToSQL(context, secondPer) }}; list2 = PersonBean.listSummary(session, fields, query2); } StringBuffer firstCompleteName = new StringBuffer(); if (list1 != null && list1.size() > 0) { Hashtable row = (Hashtable)list1.elementAt(0); if (row.get("PerCivID") != null) { firstCompleteName.append(dico.getRefDisp(session, "PerCivID", (String)row.get("PerCivID"))); firstCompleteName.append(" "); } if (row.get("PerFstName") != null) { firstCompleteName.append(row.get("PerFstName")); firstCompleteName.append(" "); } if (row.get("PerName") != null) { firstCompleteName.append(row.get("PerName")); } } StringBuffer secondCompleteName = new StringBuffer(); if (list2 != null && list2.size() > 0) { Hashtable row = (Hashtable)list2.elementAt(0); if (row.get("PerCivID") != null) { secondCompleteName.append(dico.getRefDisp(session, "PerCivID", (String)row.get("PerCivID"))); secondCompleteName.append(" "); } if (row.get("PerFstName") != null) { secondCompleteName.append(row.get("PerFstName")); secondCompleteName.append(" "); } if (row.get("PerName") != null) { secondCompleteName.append(row.get("PerName")); } } %>