Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\common\select\select.jsp
<%@ 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 fieldid= flRequest.getParameter("fieldid"); 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"; // deal with return mode : if fieldid then just do a getElementById else usual, through the form String fieldName=(fieldid==null)?field:fieldid; boolean fReturnWithID=(fieldid!=null); // AMO little enhancement to permit to open the list via a parameter in the URL String doList = (String)flRequest.getRequestParameterOrAttribute("doList"); %><html> <head> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/master_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/ajax.js"/>"></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/jsOnload.jsp"></script> <script type="text/javascript" src="<fl:link url="/js/focusFirstElement.js"/>"></script> <script type="text/javascript" language="javascript"> function doSelect(id, display) { var win = window.top.opener; <% if (fReturnWithID) { %> var elem=win.document.getElementById('<%=fieldName%>'); if (elem!=null) { elem.value=id; win.$("#<%= fieldName.replace("$", "\\\\$") %>").trigger("change"); win.document.getElementById('lbl<%=fieldName%>').value=display; if (win.doTriggerChange) { win.doTriggerChange('<%=fieldName%>'); } } <% } else { %> var f = win.document.forms[<%= formIndex %>]; f.<%= fieldName %>.value = id; win.$("#<%= fieldName.replace("$", "\\\\$") %>").trigger("change"); f.lbl<%= fieldName %>.value = display; if(win.do<%= fieldName %>Change) { win.makeChanges = function() { window.top.opener.setTimeout("do<%= fieldName %>Change()", 100); }; win.makeChanges(); } <% } %> try { window.close(); } catch (ex) { } //win.focus(); } function doSubmit() { var e = document.forms[0].elements; var strURL = _grid__select_js_.getAjaxUrl(); <% 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'); <% } } } %> var params=new Object(); params["$$idx"]=0; _grid__select_js_.callAjaxForHtml(strURL,params,true,false,null,true); } </script> </head> <body onload="focusFirstElement();<%= "1".equals(doList) ? "doSubmit();" : "" %>"> <form action="javascript:doSubmit()"> <%-- The 'gridFocusRecipient' tag is used to receive the focus when the mouse leaves a grid area. It's part of the Firefox triple-click bug fix. --%> <input name="gridFocusRecipient" id="gridFocusRecipient" value="" style="display: none;"/> <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 { boolean isFob = currField.contains(":"); boolean isBoolean = false; if (!isFob) isBoolean = "BIT".equals(dico.getRefCode("FldFltID", dico.getFieldByName(currField).getFldFltID())); if (isBoolean) { %> <select id="query<%= (i + 1) %>" name="query<%= (i + 1) %>"> <option value=""></option> <option value="1"><fl:getMessage code="L2005" alt="Oui"/></option> <option value="0"><fl:getMessage code="L2006" alt="Non"/></option> </select> <% } 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"> <div style="overflow: auto; min-height:290px"> <fl:grid name="select" width="100%" height="290px" hidePage="true" ajaxUrl="<%= \"/select_list.fl?type=\"+WebUtils.urlEncode(context, type)+(query == null ? \"\" : \"&query=\" + WebUtils.urlEncode(context, query)) %>"></fl:grid> </div> </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> </form> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de