Edit C:\Windows\install\galaxie_p01_15-09\sales\localite_\edit.jsp
<%/****************************************************************************** * Copyright (c) 2000-2005 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.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.custom.Localite_Bean"%> <%@ page import="com.edeal.frontline.ObjectsBean" %> <%@ page import="com.edeal.frontline.ListBean" %> <%@ page import="java.util.Hashtable"%> <%@ page import="java.util.Vector" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.custom.Localite_Bean" id="Localite_" scope="request"/> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <% 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 = null; try { id = Localite_.getID(); } catch (FieldNotInitializedException fnie) {} String ctrFrID = null; ctrFrID = dico.getRefIdByCode("Lo_Pays", "FR"); String localPaysID; try { localPaysID = Localite_.getLo_Pays(); } catch (Exception e) { localPaysID = ""; } String localDepartementID; try { localDepartementID = Localite_.getLo_Dep(); } catch (Exception e) { localDepartementID = ""; } // Id de l'objet Localite String lo_ObjID = null; String lstObjID = null; try { String[] fieldslo_ = {"ObjID"}; String[][] querylo_ = {{"ObjSql = 'Localite_'"}}; Vector listlo_ = ObjectsBean.listSummary(context, fieldslo_, querylo_); // on prend le premier si la liste n'est pas vide if(listlo_ != null && !listlo_.isEmpty()) { Hashtable tab = (Hashtable)listlo_.firstElement(); lo_ObjID = (String)tab.get("ObjID"); } } catch (Exception e) { lo_ObjID =""; } if (lo_ObjID!= null && !lo_ObjID.equalsIgnoreCase("")){ ObjectsBean obj = new ObjectsBean(lo_ObjID, context); String codeListe = obj.getObjSelectListCode(); if (codeListe != null) { try { String[] fieldslst = {"LstID"}; String[][] querylst = {{"LstCode = '" + codeListe + "'"}}; Vector listlst = ListBean.listSummary(context, fieldslst, querylst); // on prend le premier si la liste n'est pas vide if(listlst != null && !listlst.isEmpty()) { Hashtable tab = (Hashtable)listlst.firstElement(); lstObjID = (String)tab.get("LstID"); } } catch (Exception e) { lstObjID =""; } } } %> <script type="text/javascript" language="javascript"> function doSubmit() { var f = document.forms[0]; return true; } function setChampInsee() { var oForm = document.forms[0]; var paysSelect = oForm.Lo_Pays; // pour le pays FR if(paysSelect.value == "<%=ctrFrID%>"){ document.getElementById("Lo_Ins").style.display = 'table'; } else { document.getElementById("Lo_Ins").style.display = 'none'; } } function doLo_RattIDChange() { var oForm = document.forms[0]; var locRatt = oForm.Lo_RattID; var locRattLbl = oForm.lblLo_RattID; if(locRatt.value == "" || locRattLbl.value == ""){ document.getElementById("Lo_Acc").style.display = 'none'; } else { document.getElementById("Lo_Acc").style.display = 'table'; } } function doOnLoad() { setChampAcces(); setChampInsee(); } function loadRegion(ctrID) { if (ctrID == undefined || ctrID == null || ctrID == '') { $("#Lo_Reg").html("<option value=''> </option>"); $("#Lo_Reg").width($("#div_Lo_Reg").width()); return; } $.getJSON("<fl:webapp/>/get_enterprise_regions.fl?ctrID=" + ctrID, function(data) { if (data != null) { var optContent = "<option value=''> </option>"; for (var i = 0; i < data.length; i++) { var optValue = data[i].value; var optText = data[i].text; optContent += "<option" if (optValue == '<%=localPaysID%>') { optContent += " selected"; } optContent += " value='" + optValue + "'>" + optText + "</option>" } $("#Lo_Reg").html(optContent); $("#Lo_Reg").width($("#div_Lo_Reg").width());//For IE7 } }); } function loadDepartment(rg_ID) { if (rg_ID == undefined || rg_ID == null || rg_ID == '') { $("#Lo_Dep").html("<option value=''> </option>"); $("#Lo_Dep").width($("#div_Lo_Dep").width()); return; } $.getJSON("<fl:webapp/>/get_enterprise_departments.fl?rg_ID=" + rg_ID, function(data) { if (data != null) { var optContent = "<option value=''> </option>"; for (var i = 0; i < data.length; i++) { var optValue = data[i].value; var optText = data[i].text; optContent += "<option" if (optValue == '<%=localDepartementID%>') { optContent += " selected"; } optContent += " value='" + optValue + "'>" + optText + "</option>" } $("#Lo_Dep").html(optContent); $("#Lo_Dep").width($("#div_Lo_Dep").width());//For IE7 } }); } </script> <fl:form action="save_localite_.fl" bean="Localite_"> <fl:bigTabs objectTitle="Localite" ou="<%= \"edit_localite_.fl\" + (id != null ? \"?id=\" + id : \"\")%>" > <table class="container" cellpadding="0"> <tr> <td colspan="5"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="labelTitreFiche"> <fl:label field="Lo_Nom" labelClassName="titreFiche"/> </td> <td class="fieldTitreFiche"> <fl:input property="Lo_Nom" mandatoryMsgCode="MF019"/> </td> </tr> </table> </td> </tr> <tr><td colspan="5" class="ligne_separation"/></tr> <tr class="ligne_separation"><td></td></tr> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldEdit property="Lo_NomTri" mandatoryMsgCode="MF01A"/> <tr> <td class="titreInterneSmalltabs" colspan="5"> <fl:getMessage code="L8293" alt="Localisation"/> </td> </tr> <tr><td colspan="5" class="ligne_separation"/></tr> <fl:fieldEdit property="Lo_Pays" alt="" onchange="loadRegion(this.value);setChampInsee();" mandatoryMsgCode="MF05A"/> <fl:fieldEdit property="Lo_Reg" alt="" onchange="loadDepartment(this.value);"/> <fl:fieldEdit property="Lo_Dep" alt=""/> <fl:fieldEdit property="Lo_Cdpost"/> <tr class="fieldline"> <td class="dataLabel"><fl:label field="Lo_RattID" /></td> <td id="Lo_RattID_value" class="dataValue"> <div class="input fieldTable"> <table class="fieldTable" cellpadding="0" cellspacing="0"> <tbody> <tr valign="top"> <td class="principalText bigFieldPart"> <div class="fobLeftDiv"> <input id="Lo_RattID" name="Lo_RattID" class="input" value="" type="hidden"> <input id="lblLo_RattID" name="lblLo_RattID" value="" onfocus="this.blur();" readonly="" class="input fob" onchange="doLo_RattIDChange();" type="text"> </div> </td> <td class="smallFieldPart"> <span id="Lo_RattID_icons"> <a href="javascript: var win = window.open('/edealCRM/xml_select_list.fl?id=<%=lstObjID%>&field=Lo_RattID&formIndex=0', 'SelectLo_RattID', 'resizeable=yes,scrollbars=yes,menubar=no,toolbar=no,height=670,width =800')"><img src="/edealCRM/icons/ico/rechercher.gif" class="icon" alt="<fl:getMessage code="A2003" alt="Sélectionner"/>" title="<fl:getMessage code="A2003" alt="Sélectionner"/>"></a> <a class="fob" href="javascript:var f = window.document.forms[0]; f.Lo_RattID.value = ''; if (f.lblLo_RattID) f.lblLo_RattID.value = ''; void(''); doLo_RattIDChange();"><img src="/edealCRM/icons/ico/supprimer.gif" class="icon" alt="<fl:getMessage code="S004B" alt="Vider le champ"/>" title="<fl:getMessage code="S004B" alt="Vider le champ"/>"></a> </span> </td> </tr> </tbody> </table> </div> </td> </tr> </table> <table id="Lo_Acc" class="data_column" cellpadding="0" style="display:none;"> <fl:fieldEdit property="Lo_Acces"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table id="Lo_Ins" class="data_column" cellpadding="0" style="display:none;"> <fl:fieldEdit property="Lo_Insee" /> </table> <table class="data_column" cellpadding="0"> <fl:fieldEdit property="Lo_Nbhab"/> <fl:fieldEdit property="Lo_Alt"/> <tr class="ligne_separation"><td></td></tr> <tr class="ligne_separation"><td></td></tr> <tr> <td class="titreInterneSmalltabs" colspan="5"> <fl:getMessage code="LF00E" alt="Coordonnées GPS"/> </td> <tr><td colspan="5" class="ligne_separation"/></tr> <fl:fieldEdit property="Lo_GpsX"/> <fl:fieldEdit property="Lo_GpsY"/> </table> </td> </tr> <tr class="ligne_separation"><td></td></tr> </table> </fl:bigTabs> </fl:form>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de