Edit C:\Windows\install\galaxie_p01_01-10\marketing\criteria\read.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" contentType="text/html; charset=UTF-8"%><%@ page import="com.edeal.frontline.navigation.FlRequest" %><%@ page import="com.edeal.frontline.FlContext" %><%@ page import="com.edeal.frontline.DataDictionary" %><%@ page import="javax.swing.tree.DefaultMutableTreeNode" %><%@ page import="com.edeal.frontline.CriteriaBean" %><%@ page import="com.edeal.frontline.FieldNotInitializedException" %><%@ page import="com.edeal.frontline.FieldBean" %><%@ page import="com.edeal.frontline.ObjectsBean" %><%@ page import="java.util.Vector" %><%@ page import="com.edeal.frontline.Utils" %><%@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 paramEdit = flRequest.getRequestParameterOrAttribute("Edit"); String field = flRequest.getRequestParameterOrAttribute("RootFld"); String objID = flRequest.getRequestParameterOrAttribute("ObjID"); DefaultMutableTreeNode tree = (DefaultMutableTreeNode)flRequest.getAttribute("criteria_tree"); boolean isEdit = false; if(paramEdit == null) { paramEdit = "0"; isEdit = false; } else { isEdit = "1".equals(paramEdit); } if (tree != null) { CriteriaBean obj = (CriteriaBean)tree.getUserObject(); boolean isValueNeeded = true; try { String strOpeID = obj.getCriOpe(); isValueNeeded = !"exist".equals(dico.getRefCode("CriOpe", strOpeID)); } catch (FieldNotInitializedException ex) { } %><table class="container" cellpadding="2"> <tr style="vertical-align: top"> <% if (tree.getChildCount() > 0) { %> <td width="1" style="background-color: #84A6AE;border: thin solid #84A6AE;"><% if(isEdit) { %><input name="CriID" type="checkbox" field="<%= field %>" value="<%= obj.getID() %>"><% } else { %> <% } %></td> <td style="border: thin solid #84A6AE;"> <% for(int i = 0; i < tree.getChildCount(); i++) { DefaultMutableTreeNode child = (DefaultMutableTreeNode)tree.getChildAt(i); request.setAttribute("criteria_tree", child); %> <span class="dataValue"><%= i == 0 ? "" : (obj.isCriAnd() ? Utils.getMessage(session, "L604B", "et") : Utils.getMessage(session, "L604C", "ou")) %></span><br> <jsp:include page="/marketing/criteria/read.jsp" flush="true"> <jsp:param name="GrpID" value="<%= obj.getID() %>"/> <jsp:param name="RootFld" value="<%= field %>"/> <jsp:param name="ObjID" value="<%= objID %>"/> <jsp:param name="Edit" value="<%= paramEdit %>"/> </jsp:include> <% } if (isEdit) { %> <a href="javascript:doAdd('<%= obj.getID() %>', '<%= objID %>', '<%= field %>')">(+)</a><% } %> </td> <% } else { request.setAttribute("Criteria", obj); %> <td style="background-color: #84A6AE;border: thin solid #84A6AE;" width="1"><% if(isEdit) { %><input name="CriID" field="<%= field %>" type="checkbox" value="<%= obj.getID() %>"><% } else { %> <% } %></td> <td class="dataValue" style="border: thin solid #84A6AE; width: <%= isValueNeeded ? "50%" : "100%" %>;"><% if(isEdit) { %><a href="javascript:doEdit('<%= obj.getID() %>', '<%= objID %>', '<%= field %>')"><% } %><fl:getProperty name="Criteria" property="CriFldID" alt=" " bean="true"/><% if(isEdit) { %></a><% } %> <%= obj.isCriNot() ? Utils.getMessage(session, "L2006", "Non") + " " : "" %><fl:getProperty name="Criteria" property="CriOpe" alt=" "/></td> <% if (isValueNeeded) { %> <td class="dataValue" style="border: thin solid #84A6AE; width: 50%"> <% FieldBean fld = dico.getFieldByID(obj.getCriFldID()); Vector vectChx = null; try { vectChx = obj.getCriChx(); } catch (FieldNotInitializedException exChx) { vectChx = new Vector(); } Vector vectDisplay = new Vector(); try { //if field is fob String fobID = fld.getFldFobID(); ObjectsBean fob = dico.getTable("id", fobID); for(int i = 0; i < vectChx.size(); i++) { vectDisplay.addElement(fob.toString(session, (String)vectChx.elementAt(i))); } } catch (FieldNotInitializedException exFob) { try { String refID = fld.getFldTabID(); String fldSql = fld.getFldSql(); for(int i = 0; i < vectChx.size(); i++) { vectDisplay.addElement(dico.getRefDisp(session, fldSql, (String)vectChx.elementAt(i))); } } catch (FieldNotInitializedException exRef) { String fldType = null; try { fldType = dico.getRefCode("FldFltID", fld.getFldFltID()); } catch (FieldNotInitializedException exTyp) {}; if("BIT".equals(fldType)) { for(int i = 0; i < vectChx.size(); i++) { vectDisplay.addElement("1".equals((String)vectChx.elementAt(i)) ? Utils.getMessage(session, "L2005", "Oui") : Utils.getMessage(session, "L2006", "Non")); } } else { vectDisplay = vectChx; } } } for (int i = 0; i < vectDisplay.size(); i++) { Object chxDisplay = vectDisplay.elementAt(i); %> <%= Utils.formatToWeb(chxDisplay, false) %><br> <% } %> </td> <% } } %> </tr> </table> <% } else {%> <% } %>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de