<%@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(); //liste des personne String perID = null; try{ perID = Person.getPerID(); }catch(FieldNotInitializedException e){} String perPhone = null; try{ perPhone = Person.getPerPhone(); }catch(FieldNotInitializedException e){} String perMobile = null; try{ perMobile = Person.getPerMobile(); }catch(FieldNotInitializedException e){} String perMail = null; try{ perMail = Person.getPerMail(); }catch(FieldNotInitializedException e){} String perPoeID = null; try{ perPoeID = Person.getPerPoeID(); }catch(FieldNotInitializedException e){} String perCounselor = null; try{ perCounselor = Person.getPerCounselor(); }catch(FieldNotInitializedException e){} String perRleID = null; try{ perRleID = Person.getPerRleID(); }catch(FieldNotInitializedException e){} //champ elastic String beforeElastic = ""; String elastic =""; String afterElastic = ")"; String perName = null; try{ perName = Person.getPerName(); }catch(FieldNotInitializedException e){} String perFstName = null; try{ perFstName = Person.getPerFstName(); }catch(FieldNotInitializedException e){} String perFctID = null; String function =""; try{ perFctID = Person.getPerFctID(); function = (String)dico.getRefDisp(session, "Fct","Te2",perFctID) != null ? (String)dico.getRefDisp(session, "Fct","Te2",perFctID):(String)dico.getRefDisp(session, "Fct","Te1",perFctID); }catch(FieldNotInitializedException e){} String displayName=""; if(perFstName != null)displayName +=perFstName + " "; if(perName != null)displayName += perName; Vector listLocations = new Vector(); Vector listEnterprisesAddresses = new Vector(); Vector listPersonAddresses = new Vector(); String perLocID = null; String perEntID = null; // Try to print Location, if there are no Location, look for Enterprise addresses, // if there are no Enterprise addresses, look for addresses of the Person // locations String[] fields = new String[] {"LocID", "LocAd1", "LocAd2", "LocAd3", "LocZip", "LocCity", "LocCtrID:Val"}; String[][] query = null; try { perLocID = Person.getPerLocID(); query = new String[][] {{"LocID = " + Utils.formatToSQL(perLocID.trim())}}; listLocations = LocationBean.listSummary(session, fields, query); } catch (Exception e) { listLocations = new Vector(); } // enterprises fields = new String[]{"EntID", "EntCorpName", "EntAd1", "EntAd2", "EntAd3", "EntZip", "EntCity", "EntCtrID:Val"}; try { perEntID = Person.getPerEntID(); query = new String[][] {{"EntID = " + Utils.formatToSQL(perEntID.trim())}}; listEnterprisesAddresses = EnterpriseBean.listSummary(session, fields, query); } catch (Exception e) { listEnterprisesAddresses = new Vector(); } // persons fields = new String[] {"PerID", "PerAd1", "PerAd2", "PerAd3", "PerZip", "PerCity", "PerCtrID:Val"}; try { query = new String[][] {{"PerID = " + Utils.formatToSQL(perID.trim())}}; listPersonAddresses = PersonBean.listSummary(session, fields, query); } catch (Exception e) { listPersonAddresses = new Vector(); } %> <fl:getMessage code="L63AE" alt="Fiche personne"/>

<%= Utils.formatToWeb(displayName,false) %>

<% if (function != null && !function.trim().equals("")) { %> <%= Utils.formatToWeb(function, false) %>
<% } %> <% // print location if present, if not print enterprise address, if not present print person address. if (listLocations != null && !listLocations.isEmpty()) { // location data Hashtable rowLocation = (Hashtable)listLocations.elementAt(0); String locID = (String)rowLocation.get("LocID"); String locAd1 = (String)rowLocation.get("LocAd1"); String locAd2 = (String)rowLocation.get("LocAd2"); String locAd3 = (String)rowLocation.get("LocAd3"); String locCity = (String)rowLocation.get("LocCity"); String locZip = (String)rowLocation.get("LocZip"); String locCtrID = (String)rowLocation.get("LocCtrID:Val"); boolean hasLocationAddress = (locAd1 != null) || (locAd2 != null) || (locAd3 != null); if (locID != null) { %> <%= locAd1 != null ? Utils.formatToWeb(locAd1, false) : ""%> <%= locAd2 != null ? Utils.formatToWeb(locAd2, false) : ""%> <%= locAd3 != null ? Utils.formatToWeb(locAd3, false) : ""%> <%= hasLocationAddress ? "
" : ""%> <%= locZip != null ? Utils.formatToWeb(locZip,false) : ""%> <%= locCity != null ? Utils.formatToWeb(locCity,false) : ""%> <%= (locZip == null && locCity== null ? "" : "
")%> <%= locCtrID != null ? Utils.formatToWeb(locCtrID,false) : ""%>
<% } } else if (listEnterprisesAddresses != null && !listEnterprisesAddresses.isEmpty()) { // enterprise data Hashtable rowEnterprise = (Hashtable)listEnterprisesAddresses.elementAt(0); String entID = (String)rowEnterprise.get("EntID"); String entCorpName = (String)rowEnterprise.get("EntCorpName"); String entAd1 = (String)rowEnterprise.get("EntAd1"); String entAd2 = (String)rowEnterprise.get("EntAd2"); String entAd3 = (String)rowEnterprise.get("EntAd3"); String entCity = (String)rowEnterprise.get("EntCity"); String EntZip = (String)rowEnterprise.get("EntZip"); String entCtrID = (String)rowEnterprise.get("EntCtrID:Val"); boolean hasEntrepriseAddress = (entAd1 != null) || (entAd2 != null) || (entAd3 != null); if (entCorpName != null) { %> <%= Utils.formatToWeb(entCorpName,false) %>
<% } if (entAd1 != null || entAd2 != null || entAd3 != null || EntZip != null || entCtrID != null) { %> <%= ( entAd2 != null ? entAd2 + " " : "" )%><%= ( entAd3 != null ? entAd3 + " " : "" )%><%= ( EntZip != null ? EntZip + " " : "" )%><%= ( entCity != null ? entCity + " " : "" )%>"> <%= entAd1 != null ? Utils.formatToWeb(entAd1,false) : ""%> <%= entAd2 != null ? Utils.formatToWeb(entAd2,false) : ""%> <%= entAd3 != null ? Utils.formatToWeb(entAd3,false) : ""%> <%= hasEntrepriseAddress ? "
" : ""%> <%= EntZip != null ? Utils.formatToWeb(EntZip,false) : ""%> <%= entCity != null ? Utils.formatToWeb(entCity,false) : ""%> <%= (EntZip == null && entCity== null ? "" : "
")%> <%= entCtrID != null ? Utils.formatToWeb(entCtrID,false) : ""%>

<% } } else if (listPersonAddresses != null && !listPersonAddresses.isEmpty()) { // person address data Hashtable rowPerson = (Hashtable)listPersonAddresses.elementAt(0); String perAd1 = (String)rowPerson.get("PerAd1"); String perAd2 = (String)rowPerson.get("PerAd2"); String perAd3 = (String)rowPerson.get("PerAd3"); String perCity = (String)rowPerson.get("PerCity"); String perZip = (String)rowPerson.get("PerZip"); String perCtrID = (String)rowPerson.get("PerCtrID:Val"); boolean hasPersonAddress = (perAd1 != null) || (perAd2 != null) || (perAd3 != null); if (perID != null) { %> <%= perAd1 != null ? Utils.formatToWeb(perAd1, false) : ""%> <%= perAd2 != null ? Utils.formatToWeb(perAd2, false) : ""%> <%= perAd3 != null ? Utils.formatToWeb(perAd3, false) : ""%> <%= hasPersonAddress ? "
" : ""%> <%= perZip != null ? Utils.formatToWeb(perZip,false) : ""%> <%= perCity != null ? Utils.formatToWeb(perCity,false) : ""%> <%= (perZip == null && perCity== null ? "" : "
")%> <%= perCtrID != null ? Utils.formatToWeb(perCtrID,false) : ""%>
<% } } %> <% if(perPhone != null){%> <%= Utils.formatPhoneToMobile(perPhone,session)%>
<% } if(perMobile != null){%> <%= Utils.formatPhoneToMobile(perMobile,session)%>
<% } if(perMail != null){%> <%= Utils.formatToWeb(perMail,false)%> <% } %>
<% if(perCounselor != null){%> <% }if(perPoeID != null){%> <% }if(perRleID != null){%> <% } %>
 :