Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\marketing\criteria\view.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.*, com.edeal.frontline.navigation.FlRequest"%> <%@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 paramID = flRequest.getRequestParameterOrAttribute("id"); String paramNode = flRequest.getRequestParameterOrAttribute("Node"); String paramEdit = flRequest.getRequestParameterOrAttribute("Edit"); boolean isEdit = false; if(paramEdit == null) { paramEdit = "0"; isEdit = false; } else { isEdit = "1".equals(paramEdit); } CriteriaBean obj = new CriteriaBean(paramID, session); boolean isValueNeeded = true; try { String strOpeID = obj.getCriOpe(); isValueNeeded = !"exist".equals(dico.getRefCode("CriOpe", strOpeID)); } catch (FieldNotInitializedException ex) { } %> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <table class="container" width="100%"> <tr class="fieldline"> <% Vector children = obj.getChildren(); if(children != null && children.size() > 0) { %> <td width="1%"><% if(isEdit) { %><input name="id" type="checkbox" value="<%= obj.getID() %>"><% } else { %> <% } %></td> <td class="dataValue"> <% for(int i = 0; i < children.size(); i++) { String childID = (String)children.elementAt(i); request.setAttribute("Criteria", new CriteriaBean(childID, session)); %> <%= i == 0 ? "" : (obj.isCriAnd() ? Utils.getMessage(session, "L604B", "et") : Utils.getMessage(session, "L604C", "ou")) %><br> <% String nodeVal1 = paramNode + "." + i; %> <jsp:include page="view.jsp" flush="true"> <jsp:param name="id" value="<%= childID %>"/> <jsp:param name="GrpID" value="<%= obj.getID() %>"/> <jsp:param name="Node" value="<%= nodeVal1 %>"/> <jsp:param name="Edit" value="<%= paramEdit %>"/> </jsp:include> <% } if(isEdit) { %> <a href="javascript:doAdd('<%= obj.getID() %>')">(+)</a><% } %> </td> <% } else { request.setAttribute("Criteria", obj); %> <td style="width: 1px" ><% if(isEdit) { %><input name="id" type="checkbox" value="<%= obj.getID() %>"><% } else { %> <% } %></td> <td style="width: 40%" class="dataValue"><% if(isEdit) { %><a href="javascript:doEdit('<%= obj.getID() %>')"><% } %><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"> <% 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))); } /* //old way, using the objects' toString() String fobRadical = fob.getObjRadical(); String[][] query = new String[vectChx.size()][1]; for(int i = 0; i < vectChx.size(); i++) { query[i][0] = fobRadical + "ID = '" + (String)vectChx.elementAt(i) + "'"; } Class[] paramType = {Class.forName("javax.servlet.http.HttpSession"), Class.forName("[[Ljava.lang.String;")}; Object[] args = {session, query}; String pkgName = null; try { if (fob.isObjStandard()) { pkgName = "com.edeal.frontline."; } else { try { pkgName = context.getContextParameter("CustomPackage") + "."; } catch (FrontlineException e) { pkgName = "com.edeal.frontline.custom."; } } } catch (FieldNotInitializedException e) { try { pkgName = context.getContextParameter("CustomPackage") + "."; } catch (FrontlineException ex) { pkgName = "com.edeal.frontline.custom."; } } vectDisplay = (Vector)Class.forName(pkgName + fob.getObjSql() + "Bean").getMethod("list", paramType).invoke(null, args); */ } 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>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de