<%@page session="true" import="com.edeal.frontline.*,java.util.*"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@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 perName = null; perName = Utils.getRequestParameter(context,request,"PerName"); String[] fields = new String[]{"PerID","PerFstName","PerName","PerPhone","PerMobile","PerMail","PerFctID","PerEntID","PerEntID:EntCorpName","PerEntID:EntAd1","PerEntID:EntAd2","PerEntID:EntAd3","PerEntID:EntZip","PerEntID:EntCity","PerEntID:EntCtrID:Val"}; Vector list = new Vector(); if(perName != null && !perName.trim().equals("")){ if(Utils.getMessage(session, "L2040", true, "").equals(perName.trim())){ try{ list = PersonBean.listSummary(session,fields,new String[]{"PerName","PerFstName"}); }catch(Exception e){ list = new Vector(); } }else{ String[][] query = {{"PerName like '"+perName.trim()+"%'"},{"PerFstName like '"+perName.trim()+"%'"}}; try{ list = PersonBean.listSummary(session,fields,query,new String[]{"PerName","PerFstName"}); }catch(Exception e){ list = new Vector(); } } } %> <fl:getMessage code="L63C2" alt="Liste des personnes"/>
   
">
<% if(list != null && !list.isEmpty()){ for(int i=0; i < list.size(); i++){ Hashtable row = (Hashtable)list.elementAt(i); String perEntID = (String)row.get("PerEntID"); String entCorpName = (String)row.get("PerEntID:EntCorpName"); String entAd1 = (String)row.get("PerEntID:EntAd1"); String entAd2 = (String)row.get("PerEntID:EntAd2"); String entAd3 = (String)row.get("PerEntID:EntAd3"); String EntZip = (String)row.get("PerEntID:EntZip"); String entCity = (String)row.get("PerEntID:EntCity"); String entCtrID = (String)row.get("PerEntID:EntCtrID:Val"); String perPhone = (String)row.get("PerPhone"); String perMobile = (String)row.get("PerMobile"); String perMail = (String)row.get("PerMail"); String fstName = (String)row.get("PerFstName"); String name = (String)row.get("PerName"); String perFctID = (String)row.get("PerFctID"); boolean hasAd = (entAd1 != null) || (entAd2 != null) || (entAd3 != null); String displayName=""; String function = null; if(perFctID != null){ String functionTe2 = (String)dico.getRefDisp(session, "Fct","Te2",perFctID); if(functionTe2 != null)function = functionTe2; else function = (String)dico.getRefDisp(session, "Fct","Te1",perFctID); } if(fstName != null)displayName +=fstName + " "; if(name != null)displayName += name + " "; //if(function != null && !function.equals(""))displayName += "(" + function + ")"; %> <% } } else if (perName != null && perName.trim().equals("")) { %> <% } else if (perName != null) { %> <% } %>