Edit C:\galaxie\Back\galaxie\marketing\populationv2\edit_create.jsp
<%@page import="com.edeal.frontline.FieldNotInitializedException"%> <%@page import="com.edeal.frontline.FlContext"%> <%@page import="com.edeal.frontline.DataDictionary"%> <%@page import="com.edeal.frontline.FrontlineException"%> <%@page import="java.util.Vector"%> <%@page import="java.util.Iterator"%> <%@page import="java.util.Hashtable"%><% /****************************************************************************** * Copyright (c) 2000-2008 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 session="true"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.Utils" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.PopulationBean" id="Population" scope="request"/> <% FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); Vector<Hashtable> objChoices = (Vector<Hashtable>)flRequest.getAttribute("objChoices"); String manualPopTypeId = null; String emailingPopTypeId = null; String populationGenTypeId = null; try{ manualPopTypeId = dico.getRefIdByCode("PopGenType", "MANUAL"); } catch (FrontlineException e){ } try{ emailingPopTypeId = dico.getRefIdByCode("PopGenType", "MAILTEST"); } catch (FrontlineException e){ } try{ populationGenTypeId = Population.getPopGenType(); } catch (FieldNotInitializedException e){ } %> <script language="javascript"> function doSubmit() { var f = document.forms[0]; var objValue = f.PopTarget[f.PopTarget.selectedIndex].value; if (objValue == "EntPer") { f.PopIsEnt.value = 'true'; f.PopIsPer.value = 'true'; } else { var rad = objValue.substring(0, 3); if (rad == 'Ent') { f.PopIsEnt.value = 'true'; } else if (rad == 'Per') { f.PopIsPer.value = 'true'; } else if (rad == 'Sup') { f.PopIsSup.value = 'true'; } else if (rad == 'Sil') { f.PopIsSil.value = 'true'; } else if (rad == 'Jou') { f.PopIsJou.value = 'true'; } else { f.PopObj1.value = objValue.substring(3); } } return true; } function refreshTestPop() { var f = document.forms[0]; var checkboxValue = f.EmailingTestPopChekbox.checked; if (checkboxValue == true) { f.PopGenType.value = '<%= emailingPopTypeId %>'; } else { f.PopGenType.value = '<%= manualPopTypeId %>'; } } </script> <fl:form action="/save_populationv2.fl" bean="Population"> <input type="hidden" name="PopDisplay" value=""> <input type="hidden" name="PopIsEnt" value="false"> <input type="hidden" name="PopIsPer" value="false"> <input type="hidden" name="PopIsJou" value="false"> <input type="hidden" name="PopIsSup" value="false"> <input type="hidden" name="PopIsSil" value="false"> <input type="hidden" name="PopObj1" value=""> <input type="hidden" name="PopGenType" value="<%= populationGenTypeId %>" > <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"F000C\", false, true, \"Population\") %>" ou="<%= \"/create_populationv2.fl\" %>"> <table class="container" cellpadding="0"> <tr> <td colspan="3"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="labelTitreFiche"> <fl:label field="PopName" labelClassName="titreFiche"/> </td> <td class="fieldTitreFiche"> <fl:input property="PopName" mandatoryMsgCode="M60A2"/> </td> </tr> </table> </td> </tr> <tr><td colspan="5" class="ligne_separation"/></tr> <tr> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td id="PopTarget_label" class="dataLabel"> <fl:label code="L61CA" forInput="PopTarget" label="Choisir un objet"/> </td> <td id="PopTarget_label" class="dataValue"><div class="input select"> <select id="PopTarget" name="PopTarget" class="input select"> <% Iterator<Hashtable> iter = objChoices.iterator(); while (iter.hasNext()) { String value; Hashtable<String, String> row = iter.next(); String objRad = row.get("objRad"); if ("EntPer".equals(objRad)) { value = "EntPer"; } else { value = objRad + row.get("objID"); } %> <option value="<%= value %>"><%= row.get("objDisplay") %></option> <% } %> </select> </div></td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <fl:fieldEdit property="PopAutoDel"/> </tr> <tr> <td id="EmailingTestPopChekbox_label" class="dataLabel"> <fl:label code="L8272" forInput="EmailingTestPopChekbox" label="Population de tests pour e-mailing"/> </td> <td> <% if(populationGenTypeId != null && emailingPopTypeId != null && populationGenTypeId.equals(emailingPopTypeId)){ %> <input type="checkbox" name="EmailingTestPopChekbox" onchange="refreshTestPop()" checked="checked"/> <%} else { %> <input type="checkbox" name="EmailingTestPopChekbox" onchange="refreshTestPop()"/> <%} %> </td> </tr> </table> </td> </tr> </table> </fl:bigTabs> </fl:form>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de