Edit C:\galaxie\Back\galaxie\marketing\objectionargument\select_link.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. ******************************************************************************/ /**** * Cette page sert a selectionner un eventment pour un questionnaire ***/ %><%@ page language="java" contentType="text/html; charset=UTF-8"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="java.util.Hashtable" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.navigation.WebUtils" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %><% 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 type = flRequest.getParameter("type"); String field = flRequest.getParameter("field"); String query = flRequest.getParameter("query"); String formIndex = flRequest.getParameter("formIndex"); Vector vectFld = (Vector)flRequest.getAttribute("vectFld"); vectFld = vectFld == null ? new Vector() : vectFld; Vector vectRefs = (Vector)flRequest.getAttribute("vectRefs"); vectRefs = vectRefs == null ? new Vector() : vectRefs; try { Integer.parseInt(formIndex); } catch (NumberFormatException nfe) { formIndex = "0"; } formIndex = formIndex != null && !"".equals(formIndex) ? formIndex : "0"; %><html> <head> <link rel="stylesheet" type="text/css" href="<fl:link url="/css/grid/edeal_grid_css.jsp"/>"> <link rel="stylesheet" type="text/css" href="<fl:link url="/common/select/select_css.jsp"/>"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp" type="text/css"> <script type="text/javascript" src="<fl:link url="/js/edeal/libraries/jquery/jquery.js"/>"></script> <script type="text/javascript" src="<fl:link url="/js/ajax/sarissa.js"/>"></script> <script type="text/javascript" src="<fl:link url="/js/ajax/ajax.js"/>"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ac/fobAC_js.jsp"></script> <script type="text/javascript" language="javascript"> function myReplace(maChaine , ca , parCa) { return maChaine.split(ca).join(parCa); } function addObjArg(objID, objLabel){ mf = window.opener.document.forms[0]; mySelect = mf.elements["Links"]; toEval = "window.document.forms[0].Links.options[window.document.forms[0].Links.options.length] = new Option(\"" + myReplace(objLabel , '"' , '\\"') + "\" , \"" + objID + "\");" mf.elements["toEvalSelectLinks"].value = toEval; if (mf.elements["LinksValues"].value=='') { mf.elements["LinksValues"].value = objID; }else{ mf.elements["LinksValues"].value = mf.elements["LinksValues"].value + "|"+objID; } if (mf.elements["LinksTexts"].value =='') { mf.elements["LinksTexts"].value = objLabel; }else{ mf.elements["LinksTexts"].value = mf.elements["LinksTexts"].value + "|"+objLabel; } mySelect.focus(); window.top.focus(); } function doSubmit() { var e = document.forms[0].elements; var strURL = '<fl:webapp/>/select_list_objarg.fl?type=<%= WebUtils.urlEncode(context, type) %><%= query == null ? "" : "&query=" + WebUtils.urlEncode(context, query) %><%="&FormID="%>'; <% for(int i = 0; i < vectFld.size(); i++) { Hashtable row = (Hashtable)vectFld.elementAt(i); Vector vect = (Vector)row.get("fld"); for(int j = 0; j < vect.size(); j++) { String currField = (String)vect.elementAt(j); if (!vectRefs.contains(currField)) { %> strURL += '&<%= WebUtils.urlEncode(context, currField) %>=' + encodeURIComponent(e['query<%= (i + 1) %>'].value).split('+').join('%2b'); <% } else { %> strURL += '&<%= WebUtils.urlEncode(context, currField) %>=' + encodeURIComponent(e['query<%= (i + 1) %>'].options[e['query<%= (i + 1) %>'].selectedIndex].value).split('+').join('%2b'); <% } } } %> _grid__select_js_.callAjaxForHtml(strURL); } </script> </head> <body onload="document.forms[0].query1.focus()"> <form action="javascript:doSubmit()"> <%-- <input type="hidden" name="EvtID" value="<%=evtID%>"/> --%> <table class="global" cellpadding="0"> <tr> <td class="header_top_left"></td> <td class="header_top_middle"></td> <td class="header_top_right"></td> </tr> <tr> <td class="header_center_left"></td> <td class="header_center_middle title"> <div style="display: inline"><% for(int i = 0; i < vectFld.size(); i++) { Hashtable row = (Hashtable)vectFld.elementAt(i); String strDisplay = (String)row.get("disp"); Vector vectField = (Vector)row.get("fld"); String currField = null; if (vectField != null && vectField.size() > 0) { currField = (String)vectField.elementAt(0); } %> <div class="criteria"> <span class="criteria_label"> <%= Utils.formatToWeb(strDisplay, false) %></span><% if (currField != null && vectRefs.contains(currField)) { %> <span class="criteria_field"> <select id="query<%= (i + 1) %>" name="query<%= (i + 1) %>"> <option value=""></option><% String fldSql = currField; int idx = currField.lastIndexOf(":"); if (idx != -1) { fldSql = currField.substring(idx + 1); } Vector dispRef = dico.getRefList(session, fldSql); if (dispRef != null && dispRef.size() > 0) { for (int j = 0; j < dispRef.size(); j++) { Vector line = (Vector)dispRef.elementAt(j); String refID = (String)line.elementAt(0); Object refDisp = line.elementAt(1); %> <option value="<%= Utils.formatToWeb(refID, true) %>"><%= Utils.formatToWeb(refDisp, true) %></option><% } } %> </select> </span><% } else { %> <span class="criteria_field"><input id="query<%= (i + 1) %>" name="query<%= (i + 1) %>" type="text" size="20" value=""></span><% } %> </div><% } %> </div> <input type="image" src="<fl:link url="/icons/ico/valid_green2_long.gif"/>" class="search_button_new"> </td> <td class="header_center_right"></td> </tr> <tr> <td class="header_bottom_left"></td> <td class="header_bottom_middle"></td> <td class="header_bottom_right"></td> </tr> <tr> <td class="body_left"></td> <td class="body_middle"><fl:grid name="select" width="400px" height="250px"> <fl:gridColumn pos="0" width="30px"/> <fl:gridColumn pos="1" width="80px"/> <fl:gridColumn pos="2" width="550px"/> <fl:gridColumn pos="3" width="70px"/> </fl:grid> </td> <td class="body_right"></td> </tr> <tr> <td class="body_bottom_left"></td> <td class="body_bottom_middle"><img src="<fl:link url="/icons/popup/pop14.gif"/>" width="9" height="18"></td> <td class="body_bottom_right"></td> </tr> </table> <div id="waiting" style="display:none"><fl:getMessage code="L639B" alt="Chargement ..."/></div> </form> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de