<%@page session="true" import="com.edeal.frontline.*,java.util.*"%> <%@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 perName = null; perName = Utils.getRequestParameter(context,request,"PerName"); boolean firstCall = perName == null; Vector list = new Vector(); String[] fields = new String[]{"PerID","PerFstName","PerName","PerPhone","PerMobile","PerMail","PerFctID","PerEntID:EntCorpName","PerEntID:EntAd1","PerEntID:EntAd2","PerEntID:EntAd3","PerEntID:EntZip","PerEntID:EntCity","PerEntID:EntCtrID:Val"}; if(perName != null && !perName.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 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 + " "; %>
" class="title"> <%= Utils.formatToWeb(displayName,false) %>
<%if(function != null){%> <%= Utils.formatToWeb(function,false) %>
<%} if(entCorpName != null){%> <%= Utils.formatToWeb(entCorpName,false) %>
<% } if(entAd1 != null || entAd2 != null || entAd3 != null || EntZip != null || entCtrID != null){%> <%= entAd1 != null ? Utils.formatToWeb(entAd1,false) : ""%> <%= entAd2 != null ? Utils.formatToWeb(entAd2,false) : ""%> <%= entAd3 != null ? Utils.formatToWeb(entAd3,false) : ""%> <%= hasAd ? "
" : ""%> <%= EntZip != null ? Utils.formatToWeb(EntZip,false) : ""%> <%= entCity != null ? Utils.formatToWeb(entCity,false) : ""%> <% } %>
<% } } else if (perName != null && perName.equals("")) { %> <% } else if (perName != null) { %> <% } %>