Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\admin\requester\generate.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" import="com.edeal.frontline.*,java.util.*"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="java.util.Date" %> <%@ page import="java.util.Locale" %> <%@ page import="java.text.DateFormat" %> <%@ page import="com.edeal.frontline.helper.*"%> <%@page import="org.apache.commons.lang.StringUtils"%> <%@page import="com.edeal.frontline.helper.custom.*"%> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean id="Requester" class="com.edeal.frontline.RequesterBean" 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(); String id = flRequest.getRequestParameterOrAttribute("id"); String popName = flRequest.getRequestParameterOrAttribute("reqName"); String type = flRequest.getRequestParameterOrAttribute("type"); String actCode; try { actCode = ActorHelper.getSessionActor(session).getActCode(); } catch (FieldNotInitializedException fnie) { actCode = null; } Vector vectParams = null; try { vectParams = Requester.getQueryParameters(); } catch (Throwable ex) { logger.error(ex.getMessage()); } String[] argsReq = null; try { if(vectParams != null && !vectParams.isEmpty()) { argsReq = new String[vectParams.size()]; for(int i = 0; i < vectParams.size(); i++) { Hashtable row = (Hashtable)vectParams.elementAt(i); String[] values = Utils.translateParameterValues(context, request.getParameterValues( "Param" + (String)row.get("num"))); if(values == null) { argsReq[i] = ""; } else if(values.length == 1) { argsReq[i] = values[0]; } else { argsReq[i] = Utils.implodeList(values, ";"); } } } } catch (Throwable ex) { logger.warn("[view_validate.jsp] " + ex.getClass().getName() + " : " + ex.getMessage()); } String argParam = null; if (argsReq != null && argsReq.length > 0) { argParam = ""; for (int j = 0; j<argsReq.length; j++){ argParam += "&ArgsReq="+argsReq[j]; } } boolean canGenerate = false; PopulationBackgroundGenerationManager.GenerationStatus genStatus=PopulationBackgroundGenerationManager.GenerationStatus.UNK_ERROR; try { PopulationBackgroundGenerationManager popBgGenerationMgr=PopulationBackgroundGenerationManager.getPopulationGenerationCounterManager(context); genStatus=popBgGenerationMgr.isActorAllowedToGeneratePopulation(session); canGenerate=(PopulationBackgroundGenerationManager.GenerationStatus.OK==genStatus); } catch (FrontlineException ex) { logger.error("Cannot get the Population Generation Status for actor",ex); } logger.debug("Population Generation from Requester \ncanGenerate is : " + canGenerate + " because generationState is " + genStatus.toString() + "\n"); %> <html> <head> <title>E-DEAL</title> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <link rel="stylesheet" href="<fl:webapp/>/css/master_css.jsp" type="text/css"> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/presentField.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/libraries/jquery/jquery.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ajax/ajax.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/master_js.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ac/fobAC_js.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/libraries/json.org/json2/json2.js"></script> <script language="JavaScript"> var alreadyAsked = false; function generate() { var f = document.forms[0]; if (!f.PopName.value) { return; } var url = '<fl:webapp/>/check_popname2.fl?field=PopName&type=Population&value='+encodeURIComponent(f.PopName.value); doAjax(url,analyseAjaxResponseCheckPopName); } function analyseAjaxResponseCheckPopName(arrIndex) { if (eDealXmlhttpArr[arrIndex].readyState == 4) { hideWaiting(); var resp=eDealXmlhttpArr[arrIndex].responseText; var respObj=JSON.parse(resp); if (respObj["value_exists"]) { if (window.confirm("<%= Utils.getMessage(session, "M609A", true, "Une population portant le même nom existe déjà.\n Voulez-vous l'écraser par la nouvelle?") %>")) { var f = window.document.forms[0]; f.oldPopID.value = respObj.existing_id; submit(); } else { focusToPopNameIfExists(); } } else { submit(); } } } function focusToPopNameIfExists() { if (document.forms[0].PopName) { document.forms[0].PopName.focus(); } } function doCancel(){ window.close(); } </script> </head> <body class="popup_body" onLoad="focusToPopNameIfExists();"> <!-- <body class="popup_body"> --> <div id="object_css" style="top: 0px; left: 0px; height: 100%; width: 100%;"> <% if (canGenerate) { %> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L64B3\", false, true, \"Requête\") %>" showFooter="false" ignoreCriteria="true"> <fl:form method="post" action="/generate_population2.fl" bean="Requester"> <input type="hidden" name="$$returnedHtmlHead" id="$$returnedHtmlHead" value=""/> <input type="hidden" name="$$returnedHtmlBody" id="$$returnedHtmlBody" value="Closing..."/> <input name="typ" type="hidden" value="Population"> <input name="CtrID" type="hidden" value="<%= id %>"> <input name="CtrType" type="hidden" value="backgroundRequester"> <input name="oldPopID" type="hidden" value=""> <input name="$$presentFields" type="hidden" value=""> <% if (argsReq != null && argsReq.length > 0) { for (int j = 0; j<argsReq.length; j++){ %> <input name="ArgsReq" type="hidden" value="<%= argsReq[j] %>"> <% } } %> <table class="container" cellpadding="0"> <tr class="fieldline"> <td colspan="3"> <table class="container" cellpadding="0"> <tr class="titreFiche"> <td class="labelTitreFiche"> <fl:getMessage code="F2025" alt="Nom"/> </td> <td class="fieldTitreFiche"> <% Date toDay = new Date(); DateFormat dfs = DateFormat.getDateInstance(DateFormat.SHORT,FlLocale.getInstance(session).getLocale()); String reqName = null; try{ reqName = Requester.getReqTitle(); }catch(FieldNotInitializedException fnie){ reqName="untitled"; } String valToDisplay = reqName; if (StringUtils.isNotEmpty(actCode)) { valToDisplay += " - " + actCode; } valToDisplay += " - " + dfs.format(new Date()); %> <div><input type="hidden" name="mandatory" value="PopName"><input type="hidden" id="mandatory.PopName" name="mandatory.PopName" value="Veuillez spécifier le nom du ciblage."><input id="PopName" name="PopName" type="text" value="<%= valToDisplay%>" maxlength="100" style="width:100%;" class="input text chpsTextObligatoire" onchange="alreadyAsked = false;"><span id="PopName_msg" class="mandatory_alert" style="display: none">!</span></div> </td> </tr> </table> </td> </tr> <tr class="ligne_separation"><td colspan="3"></td></tr> <tr> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F6148" alt="Auto suppression"/></td> <td class="dataValue"> <input type="checkbox" name="PopAutoDel"> </td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <!-- ajouté --> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F61ED" alt="Une alarme vous préviendra lorsque la génération sera terminée"/></td> <td class="dataValue"> <input type="checkbox" name="PopAutoAlert"> </td> </tr> </table> <!-- fin ajouté --> </td> </tr> <tr class="ligne_separation"><td colspan="3"></td></tr> </table> </fl:form> </fl:bigTabs> <br/> <div style="text-align: center; width: 100%;"> <table class="container" width="100%"> <tr class="fieldline"> <td colspan="2" style="text-align: center;"> <a href="javascript:generate();"><img src="<fl:webapp/>/icons/ico/valid_green_long.gif"></a> <a href="javascript:doCancel()"><img src="<fl:webapp/>/icons/ico/fermer_red_long.gif"></a> </td> </tr> </table> </div> <% } else { %> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L64B3\", false, true, \"Requête\") %>"> <fl:form method="post" action="javascript:doSubmit();" bean="Requester"> <input type="hidden" name="$$returnedHtmlHead" id="$$returnedHtmlHead" value=""/> <input type="hidden" name="$$returnedHtmlBody" id="$$returnedHtmlBody" value="Closing..."/> <input name="typ" type="hidden" value="Population"> <input name="CtrID" type="hidden" value="<%= id %>"> <input name="CtrType" type="hidden" value="backgroundRequester"> <input name="oldPopID" type="hidden" value=""> <input name="$$presentFields" type="hidden" value=""> <table class="container" cellpadding="0"> <tr> <td><%= genStatus.getErrorMessage(session) %></td> </tr> </table> </fl:form> </fl:bigTabs> <br/> <div style="text-align: center; width: 100%;"> <table class="container" width="100%"> <tr class="fieldline"> <td colspan="2" style="text-align: center;"> <a href="javascript:doCancel()"><img src="<fl:webapp/>/icons/ico/fermer_red_long.gif"></a> </td> </tr> </table> </div> <% } %> <div id="waiting" style="display:none"><fl:getMessage code="L639B" alt="Chargement ..."/></div> </div> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de