Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\admin\dataextraction\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="com.edeal.frontline.EnterpriseBean" %> <%@ page import="java.util.Date" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="com.edeal.frontline.ActorBean" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.LicenceManager" %> <%@ page import="com.edeal.frontline.SiteBean" %> <%@ page import="com.edeal.frontline.MenuByRoleBean" %> <%@ page import="com.edeal.frontline.MenuBean" %> <%@ page import="com.edeal.frontline.DataExtractionBean" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.DataExtractionBean" id="DataExtraction" 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 = DataExtraction.getID(); } catch (FieldNotInitializedException e) {} String extName = null; try { extName = DataExtraction.getDexTitle(); } catch (FieldNotInitializedException e) {} boolean isTab = false; boolean isSemi = false; boolean isOther = false; String otherSep = ""; String colSep = null; try { colSep = DataExtraction.getDexColumnSeparator(); } catch (FieldNotInitializedException fnie) {} if (colSep == null) { isTab = true; } else if (colSep.equals("$TAB$")) { isTab = true; } else if (colSep.equals(";")) { isSemi = true; } else { isOther = true; otherSep = colSep; } //lister tous les codes déja saisie à part celui qui est en modif String[] fieldC = {"DexCode"}; String[][] queryC = {{"DexCode <> null","DexID <> "+Utils.formatToSQL(context, id)}}; Vector listCode = DataExtractionBean.listSummary(session, fieldC, queryC); String arrayCode = ""; if (listCode != null && listCode.size() > 0) { for (int i = 0; i < listCode.size(); i++) { Hashtable row = (Hashtable) listCode.elementAt(i); String code = (String) row.get("DexCode"); if (i == 0) arrayCode += "\"" + code +"\""; else arrayCode += "," + "\"" + code +"\""; } } //logger.debug("arrayCode "+arrayCode); %> <script type="text/javascript" language="javascript"> lesCodes = new Array(<%= arrayCode%>); function doValidation(document) { var f = document.forms[0]; if (f.DexCode.value != '') { //dexCode n'est pas vide var posCode = 0; while ((posCode < lesCodes.length) && (lesCodes[posCode] != f.DexCode.value)) posCode++; if (posCode < lesCodes.length) { alert('<fl:getMessage code="M6045" alt="Ce Code existe déja, Veuillez le modifier." js="true"/>'); f.DexCode.focus(); return -1; } } if (f.sepChoice[2].checked && f.sepVal.value == '') { alert('<fl:getMessage code="M6042" alt="Veuillez spécifier un séparateur." js="true"/>'); f.sepVal.focus(); return -1; } return 1; } function doSubmit() { var i; if (doValidation(document) == 1) { sepChoice = "TAB"; for (i=0 ; i < document.forms[0].sepChoice.length ; i++) { if (document.forms[0].sepChoice[i].checked ) { sepChoice = document.forms[0].sepChoice[i].value; } } if (sepChoice == "TAB") { document.forms[0].DexColumnSeparator.value = "$TAB$"; } else if (sepChoice == "SEMICOL") { document.forms[0].DexColumnSeparator.value = ";"; } else { document.forms[0].DexColumnSeparator.value = document.forms[0].sepVal.value; } presentFieldsValue(); document.forms[0].submit(); } } </script> <fl:form action="/save_dataextraction.fl" bean="DataExtraction"> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L6097\", false, true, \"Extraction des données\") %>" ou="<%= \"/edit_dataextraction.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="DexTitle" labelClassName="titreFiche"/> </td> <td class="fieldTitreFiche"> <fl:input property="DexTitle" mandatoryMsgCode="L63DC" alt=""/> </td> </tr> </table> </td> </tr> <tr><td colspan="3" class="ligne_separation"/></tr> <tr class="fieldline"> <td class="column2"> <table> <fl:fieldEdit property="DexCode" mandatoryMsgCode="L6144" unicityMsgCode="M60CE"/> <fl:fieldEdit property="DexDestinationFile" mandatoryMsgCode="M6041"/> <tr class="fieldline"> <td id="DexHeaderLine_label" class="dataLabel"> <fl:getMessage code="F6057" alt="Ligne en tête"/> </td> <td id="DexHeaderLine_value" class="dataValue"> <% boolean hasHeader = false; try { hasHeader = DataExtraction.isDexHeaderLine(); } catch (FieldNotInitializedException fnie) { } %> <input type="radio" name="DexHeaderLine" value="false" <%= hasHeader ? "" : "checked" %> ><fl:getMessage code="L2006" alt="Non"/><br> <input type="radio" name="DexHeaderLine" value="true" <%= !hasHeader ? "" : "checked" %> ><fl:getMessage code="L2005" alt="Oui"/> </td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldline"> <td id="DexColumnSeparator_label" class="dataLabel"> <fl:getMessage code="L30D3" alt="Séparateur"/> </td> <td id="DexColumnSeparator_value" class="dataValue"> <input type="radio" name="sepChoice" value="TAB" <%= isTab ? "checked" : "" %> ><fl:getMessage code="L30D4" alt="Tabulation"/><br> <input type="radio" name="sepChoice" value="SEMICOL" <%= isSemi ? "checked" : "" %> ><fl:getMessage code="L30D5" alt="Point-virgule"/><br> <input type="radio" name="sepChoice" value="OTHER" <%= isOther ? "checked" : "" %> ><fl:getMessage code="L6098" alt="Autre"/> <input type="text" name="sepVal" value="<%= otherSep %>" size="22"> <input type="hidden" name="DexColumnSeparator" value="<fl:getProperty name="DataExtraction" property="DexColumnSeparator" alt="" edit="true"/>"> </td> </tr> <tr class="fieldline"> <td id="DexColumnDelimitor_label" class="dataLabel"> <fl:getMessage code="L30D0" alt="Délimiteur"/> </td> <td id="DexColumnDelimitor_value" class="dataValue"> <input name="DexColumnDelimitor" type="text" value="<fl:getProperty name="DataExtraction" property="DexColumnDelimitor" alt="" edit="true"/>" size="32" maxlength="100"> </td> </tr> </table> </td> </tr> </table> <table class="container" cellpadding="0"> <tr class="ligne_separation"> <td></td> </tr> <tr> <td class="titrePartie"><fl:getMessage code="F6028" alt="Requête SQL"/></td> </tr> <tr class="ligne_separation_couleur"> <td></td> </tr> <tr class="ligne_separation"> <td></td> </tr> <tr> <td><fl:input property="DexSQL" nodiv="false" mandatoryMsgCode="M6031"/></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 class="ligne_separation_couleur"> <td></td> </tr> <tr class="ligne_separation"> <td></td> </tr> <tr> <td><fl:input property="DexNote" nodiv="false"/></td> </tr> <tr class="ligne_separation"> <td></td> </tr> </table> </fl:bigTabs> </fl:form> <% /****************************************************************************** * * * m.ichahane@e-deal.ma : 2006/08/16 16:04:30 : Mustapha * * *****************************************************************************/ %>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de