Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\admin\snapshot\edit.jsp
<% /****************************************************************************** * Copyright (c) 2000-2004 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.Utils"%> <%@ page import="com.edeal.frontline.FieldNotInitializedException"%> <%@ page import="com.edeal.frontline.DataDictionary"%> <%@ page import="java.util.Date"%> <%@ page import="java.util.Hashtable"%> <%@ page import="com.edeal.frontline.FrontlineException"%> <%@ page import="java.util.Vector"%> <%@ page import="com.edeal.frontline.SnapshotBean"%> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl"%> <jsp:directive.page contentType="text/html; charset=UTF-8" isELIgnored="false"/> <jsp:useBean class="com.edeal.frontline.SnapshotBean" id="Snapshot" scope="request" /> <% 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 = Snapshot.getID(); } catch (FieldNotInitializedException e) { } String axis1Code = null; try { axis1Code = Snapshot.getSnaAxis1Code(); } catch (FieldNotInitializedException e) { } String axis2Code = null; try { axis2Code = Snapshot.getSnaAxis2Code(); } catch (FieldNotInitializedException e) { } String axis3Code = null; try { axis3Code = Snapshot.getSnaAxis3Code(); } catch (FieldNotInitializedException e) { } %> <script type="text/javascript" language="javascript"> function doSubmit() { presentFieldsValue(); document.forms[0].submit(); } </script> <!-- method combo change handling --> <script type="text/javascript" language="javascript"> function methodChanged() { var m = document.getElementById("SnaCmeID").value; var infos = document.getElementById("infosMethod"); $(infos).html("--"); var url = "ajax_calcmethod_infos.fl?id=" + m + "&snap=<%=id%>"; doAjax(url, onInfosReceived); } function onInfosReceived(index) { hideWaiting(); if (eDealXmlhttpArr[index].readyState == 4) { var json = eDealXmlhttpArr[index].responseText; var infos = document.getElementById("infosMethod"); var mi = eval('(' + json + ')'); // desc méthode $(infos).html("" + mi["description"]); // paramètres méthode var tabInner = "<tr><td>Nom</td><td>Valeur</td><td>Description</td></tr>"; var sig = mi["signature"]; for ( var x in sig) { var param = sig[x]; // needed for chrome if (typeof (param) == 'function') { continue; } tabInner += "<tr>"; tabInner += "<td>" + param["name"] + ": </td>"; tabInner += "<td><input type=\"text\" name=\"param_"+param["name"]+"\" value=\""+param["default"]+"\"/></td>"; tabInner += "<td>" + param["desc"] + "</td>"; tabInner += "</tr>"; } var pTab = document.getElementById("paramsTab"); $(pTab).html(tabInner); // axes var ai = mi["axis"]; var options = "<option value=\"\"> -- </option>"; for ( var x in ai) { var axis = ai[x]; // needed for chrome if (typeof (axis) == 'function') { continue; } var c = axis["code"]; var selected = ""; options += "<option value=\"" + c + "\">"; options += axis["name"]; options += "</option>" } var select = document.getElementById("axis1Select"); $(select).html(options); select.enabled = true; (select, '<%=Utils.formatToJavascript(axis1Code)%>'); select = document.getElementById("axis2Select"); $(select).html(options); select.enabled = true; selectValue(select, '<%=Utils.formatToJavascript(axis2Code)%>'); select = document.getElementById("axis3Select"); $(select).html(options); select.enabled = true; selectValue(select, '<%=Utils.formatToJavascript(axis3Code)%>'); } <% try{Snapshot.getSnaAxis1Code();%> $('#axis1Select option[value="<%=Snapshot.getSnaAxis1Code().replace("'", "\\'").replace("\"","\\\"")%>"]').attr('selected', 'selected'); <%}catch(Exception e){} try{Snapshot.getSnaAxis2Code();%> $('#axis2Select option[value="<%=Snapshot.getSnaAxis2Code().replace("'", "\\'").replace("\"","\\\"")%>"]').attr('selected', 'selected'); <%}catch(Exception e){} try{Snapshot.getSnaAxis3Code();%> $('#axis3Select option[value="<%=Snapshot.getSnaAxis3Code().replace("'", "\\'").replace("\"","\\\"")%>"]').attr('selected', 'selected'); <%}catch(Exception e){} %> } // select the code in the combo box function selectValue(combo, value) { options = combo.options; for (i = 0; i < options.length; i++) { var opt = options.item(i); if (opt.value == value) { opt.selected = true; } } } </script> <script type="text/javascript" language="javascript"> function onTestClicked() { var m = document.getElementById("SnaCmeID").value; var url = "ajax_snapshot_test.fl?cmeId=" + m; var acode = document.getElementById("axis1Select").value; url+= "&a1="+encodeURIComponent(acode); acode = document.getElementById("axis2Select").value; url+= "&a2="+encodeURIComponent(acode); acode = document.getElementById("axis3Select").value; url+= "&a3="+encodeURIComponent(acode); var button = document.getElementById("testButton"); button.enabled = false; doAjax(url, onTestResultsReceived); } function onTestResultsReceived(index) { var button = document.getElementById("testButton"); button.enabled = true; hideWaiting(); if (eDealXmlhttpArr[index].readyState == 4) { var json = eDealXmlhttpArr[index].responseText; var tr = eval('(' + json + ')'); var divResults = document.getElementById("testResults"); if (typeof tr["error"] != 'undefined') { html="<p>Error occured:"+tr['error']+"</p>"; } else { html = "<p>"+"Temps d'exécution "+": "+tr["executionTime"]+" sec.</p>"; html += "<p>"+"Taille du jeu de données "+": "+tr["rowCount"]+"</p>"; } divResults.innerHTML = html; } } </script> <fl:form action="/save_snapshot.fl" bean="Snapshot"> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"T0001\", false, true, \"Indicateur\") %>" ou="<%= \"/edit_snapshot.fl\" + (id != null ? \"?id=\" + id : \"\") %>"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td colspan="3"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="labelTitreFiche"><fl:label field="SnaName" labelClassName="titreFiche" /></td> <td class="fieldTitreFiche"><fl:input property="SnaName" mandatoryMsgCode="T0013" alt="" /></td> </tr> </table> </td> </tr> </table> <table class="container" cellpadding="0"> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldEdit property="SnaCmeID" comboFobThreshold="0" onchange="methodChanged();" /> <tr class="fieldline"> <td class="dataLabel"><%= Utils.getMessage(session, "L2007", false, true, "Description") %></td> <td class="dataValue" id="infosMethod"></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:label field="SnaAxis1Code" /></td> <td class="dataValue"><select id="axis1Select" name="SnaAxis1Code" class="input select"> </select></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:label field="SnaAxis2Code" /></td> <td class="dataValue"><select id="axis2Select" name="SnaAxis2Code" class="input select"> </select></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:label field="SnaAxis3Code" /></td> <td class="dataValue"><select id="axis3Select" name="SnaAxis3Code" class="input select"> </select></td> </tr> </table> </td> <td class="separation"> <div class="separation"></div> </td> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldEdit property="SnaFreq" /> <fl:fieldEdit property="SnaShsID" /> <fl:fieldEdit property="SnaTzoID" /> <fl:fieldEdit property="SnaLngID" /> </table> </td> </tr> <tr class="ligne_separation"> <td></td> </tr> </table> <table class="container" cellpadding="0"> <tr class="ligne_separation"><td></td></tr> <tr> <td class="titrePartie"><fl:getMessage code="F2024" alt="Notes"/></td> </tr> <tr> <td class="dataValue noPaddingLeft"> <fl:input property="SnaNotes" style="width:100%" nodiv="false"/></td> </tr> <tr class="ligne_separation"><td></td></tr> <tr class="ligne_separation_couleur"><td></td></tr> <tr class="ligne_separation"><td></td></tr> </table> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="mesSmallTabs"> <fl:sTab id="pmeth" title="<%= Utils.getMessage(session, \"T000F\", false, true, \"Paramètres de la méthode\") %>" visible="true"> <table id="paramsTab"></table> </fl:sTab> <fl:sTab id="testind" title="<%= Utils.getMessage(session, \"T000E\", false, true, \"Test de l'indicateur\") %>" visible="true"> <p><%=Utils.getMessage(session, "L825F", false, true, "Propose des tests pour exécuter l\'indicateur sans sauvegarder les valeurs") %></p> <input id="testButton" type="button" onclick="onTestClicked()" value="<%=Utils.getMessage(session, "T0011", false, true, "Lancer le test")%>" /> <div id="testResults"></div> </fl:sTab> </fl:smallTabs> </fl:bigTabs> </fl:form> <script type="text/javascript" language="javascript"> var m = document.getElementById("SnaCmeID").value; if (m) { methodChanged(); } else { var select = document.getElementById("axis1Select"); select.enabled = false; select = document.getElementById("axis2Select"); select.enabled = false; select = document.getElementById("axis3Select"); select.enabled = false; } </script>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de