Edit C:\Windows\install\galaxie_p02_26-09\sales\enterprise\link.jsp
<% /****************************************************************************** * 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.EnterpriseBean" %><%@ 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 entID = flRequest.getParameter("entID"); LinkBean Link; if (id != null) { Link = new LinkBean(id, session); } else { Link = new LinkBean(session); } String firstEnt = null; try { firstEnt = Link.getLinFirst(); } catch (FieldNotInitializedException e) { if (entID != null && !"".equals(entID)) { firstEnt = entID; Link.setLinFirst(entID); } } String secondEnt = null; try { secondEnt = Link.getLinSecond(); } catch (FieldNotInitializedException e) { } // Récupération entreprise String[] fields = { "EntID", "EntCorpName" }; String[][] query1 = {{ "EntID = " + Utils.formatToSQL(context, firstEnt) }}; Vector list1 = EnterpriseBean.listSummary(session,fields,query1); Vector list2 = new Vector(); if (secondEnt != null) { String[][] query2 = {{ "EntID = " + Utils.formatToSQL(context, secondEnt) }}; list2 = EnterpriseBean.listSummary(session,fields,query2); } String lin2Name = null; try { Hashtable row = (Hashtable)list2.elementAt(0); lin2Name = (String)row.get("EntCorpName"); } catch (Exception e) { } %> <html> <head> <title><fl:getMessage code="L6180" alt="Lien"/></title> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/master_css.jsp"> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/master_js.jsp"></script> <script language="javascript"> function doChangeEntreprise() { window.open('<fl:webapp/>/select.fl?type=Enterprise&field=OppEntID&query=<%= WebUtils.urlEncode(context, "EntID <> " + Utils.formatToSQL(context, entID)) %>', 'ChoixEntreprise' , 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=<%= SelectAction.SELECT_WINDOW_WIDTH %>,height=380'); } function doLink() { var f = document.forms[0]; if ( f.LinTypeA.value == '') { window.alert("<fl:getMessage code="M301A" alt="Veuillez spécifier un role" js="true"/>"); f.LinTypeA.focus() return; } f.LinSecond.value = f.OppEntID.value; if (f.LinSecond.value == '') { window.alert("<fl:getMessage code="M301C" alt="Veuillez spécifier une entreprise." js="true"/>"); return; } if (f.LinFirst.value == f.LinSecond.value) { window.alert("<fl:getMessage code="M6053" alt="Vous ne devez pas choisir deux fois la même entreprise" js="true"/>"); return; } f.$$returnedHtmlBody.value = 'Nothing here'; f.$$returnedHtmlHead.value = '<sc' + 'ript language=\"javascript\">window.top.opener.lnkDoReturn(); window.top.close();</scr' + 'ipt>'; f.submit(); } </script> </head> <body> <div id="object_css" style="top: 0px; left: 0px; bottom: 0px; height: 100%;"> <fl:bigTabs ignoreList="true" objectTitle="<%= Utils.getMessage(session, \"L6180\", false, true, \"Lien\") %>"> <form method="post" action="<fl:webapp/>/save_link.fl" bean="Enterprise"> <input type="hidden" name="LinFirst" value="<%= firstEnt %>"> <input type="hidden" name="id" value="<%= id != null ? id : "" %>" /> <input type="hidden" name="typ" value="Link" /> <input type="hidden" name="$$returnedHtmlHead" value="" /> <input type="hidden" name="$$returnedHtmlBody" value="" /> <input type="hidden" name="$$presentFields" value="" /> <table style="width: 100%;" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel" style="text-align: left; width: 33%;"> <fl:getMessage code="L30CE" alt="Enterprise"/> </td> <td class="dataValue" style="width: 300px;"> <input name="lblEntCorpName" class="transRead" type="text" readonly value="<%= ((Hashtable)list1.elementAt(0)).get("EntCorpName") %>"> </td> </tr> <tr class="fieldline"> <td id="LinSecond_label" class="dataLabel"><div style="width: 100%;"> <label for="LinSecond" title="<fl:getMessage code="F002B" alt="Entreprise"/>"> <fl:getMessage code="F002B" alt="Entreprise"/></label></div></td> <td id="LinSecond_label" class="dataValue"> <div class="fieldTable" style="width: 100%;"> <table class="fieldTable" cellpadding="0"> <tr> <td class="principalText"> <div><div style="width:70%;" class="fobLeftDiv"> <input id="LinSecond" name="LinSecond" type="hidden" value="<%=Utils.formatToWeb(secondEnt, true) %>"> <input id="OppEntID" name="OppEntID" type="hidden" value="<%= Utils.formatToWeb(secondEnt, true) %>"> <input id="lblOppEntID" name="lblOppEntID" type="text" value="<%= Utils.formatToWeb(lin2Name, true) %>" autocomplete="off" onfocus="displayOnFocus(this);acResizeDisplayDiv(this);" class="input fob"> </div> <div style="width:25%;" class="fobRightDiv"> <a href="javascript:doChangeEntreprise()"> <img src="<fl:webapp/>/icons/ico/rechercher.gif" class="icon" alt="<fl:getMessage code="A2003" alt="Sélectionner"/>" title="<fl:getMessage code="A2003" alt="Sélectionner"/>"> </a> <a href="javascript:var f = window.document.forms[0]; f.LinSecond.value = f.OppEntID.value= f.lblOppEntID.value = ''; acLastCompleteValues['lblOppEntID'] = '';acLastCompleteValues['OppEntID'] = ''; void('')"> <img src="<fl:webapp/>/icons/ico/supprimer.gif" class="icon" alt="<fl:getMessage code="A3005" alt="Vider le champ"/>" title="<fl:getMessage code="A3005" alt="Vider le champ"/>"> </a></div> <script language="javascript">runOnTime("installFobAC(document.forms[0].lblOppEntID);", 1000);</script> </div> </td> </tr> </table> </div> </td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td id="LinTypeA_label" class="dataLabel"><div style="width: 100%;"><label for="LinTypeA" title="<fl:getMessage code="F611F" alt="Relation"/>"><fl:getMessage code="F611F" alt="Relation"/></label></div></td> <td id="LinTypeA_label" class="dataValue"> <div style="width: 100%;"> <select id="LinTypeA" name="LinTypeA" class="input select" style="vertical-align: middle; width: 190px;"> <% Vector refList = dico.getRefList(session, "RoE", "Te1"); String LinTypeA; try { LinTypeA = Link.getLinTypeA(); } catch (Exception e) { LinTypeA = ""; } int rSize = refList.size(); for (int cnt = 0; cnt < rSize; ++cnt) { Vector ref = (Vector)refList.elementAt(cnt); String refID = (String)ref.elementAt(0); String refValue = (String)ref.elementAt(1); %> <option value="<%= refID %>"<%= LinTypeA.equals(refID) ? " selected" : "" %>><%= refValue %></option> <% } %> </select> </div> </td> </tr> </table> </td> </tr> </table> </form> </fl:bigTabs> <br> <table class="container" width="100%"> <tr class="fieldline"> <td colspan="2" style="text-align: center;"> <a href="javascript:doLink()"><img src="<fl:webapp/>/icons/ico/valid_green_long.gif"></a> <a href="javascript:window.close()"><img src="<fl:webapp/>/icons/ico/fermer_red_long.gif"></a> </td> </tr> </table> </div> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de