<%@ page language="java"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.PersonBean" %> <%@ page import="com.edeal.frontline.custom.Contrat_Bean" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="java.util.Vector" %> <%@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 contratId = flRequest.getParameter("initSg_Contrat"); String field = flRequest.getParameter("field"); String multivalSeparator = flRequest.getParameter("multivalSeparator"); if (multivalSeparator == null || "".equals(multivalSeparator)) { multivalSeparator = "|"; } String formIndex = flRequest.getParameter("formIndex"); try { Integer.parseInt(formIndex); } catch (NumberFormatException nfe) { formIndex = "0"; } formIndex = formIndex != null && !"".equals(formIndex) ? formIndex : "0"; String entID=""; Vector ids = (Vector)flRequest.getAttribute("ids"); if (ids == null) { ids = new Vector(); } else { // id format --> 000000000000a704:000000000000d15c --> PerID:EntID if(ids.size()==1){ String firstIDs = (String)ids.firstElement(); String[] splittedIDs = firstIDs.split(":"); // If only have PerID try to recover its PerEntID if(splittedIDs.length == 1 && !"".equals(splittedIDs[0])){ PersonBean currentPerson = new PersonBean(splittedIDs[0], context); try{ entID = currentPerson.getPerEntID(); } catch (FieldNotInitializedException e){ // nothing } } else if(splittedIDs.length == 2 && !"".equals(splittedIDs[1])){ // If have EntID entID = splittedIDs[1]; } } } Vector types = (Vector)flRequest.getAttribute("types"); if (types == null) { types = new Vector(); } Vector displays = (Vector)flRequest.getAttribute("displays"); if (displays == null) { displays = new Vector(); } String ct_statut = ""; try{ ct_statut = Contrat_Bean.lookup(context,"Ct_Statut",contratId).toString(); }catch(FrontlineException fe){ logger.error(fe.getMessage()); } String typeContrat = ""; try{ typeContrat = Contrat_Bean.lookup(context,"Ct_TypeContrat:RefTe2",contratId).toString(); }catch(FrontlineException fe){ logger.error(fe.getMessage()); } String contratVAL=""; try { contratVAL = dico.getRefIdByCode("Cs_", "Te1", "VAL"); } catch (Exception e) { contratVAL = ""; } boolean contratPrincipalValide = ct_statut.equals(contratVAL) && "P".equals(typeContrat); %> "> <fl:getMessage code="L82A6" alt="Rechercher des correspondants"/>
" class="search_button_new">
" class="search_button_new">
" width="9" height="18"> " width="9" height="18">
" class="valid_button_new" style="margin-right: 20px;">" class="cancel_button_new">