Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\marketing\criteria2\agraggate.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.navigation.FlRequest,com.edeal.frontline.*,com.edeal.frontline.custom.*,java.util.*"%> <%@ page import="com.edeal.frontline.Criteria2Bean" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException"%> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl"%> <jsp:useBean class="com.edeal.frontline.Criteria2Bean" id="Criteria2" scope="request"/> <% 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 GrpID= null; // boolean To put int Cr2And boolean IsAnd =true ; String label = flRequest.getRequestParameterOrAttribute("label"); String _Label = Utils.getMessage(session, label, Utils.getMessage(session, "L60E0", "<non spécifié>")); String edit = flRequest.getRequestParameterOrAttribute("edit"); boolean isEdit = false; if (edit != null && !"null".equals(edit)) { isEdit = true; } String operation = null; String labelEdit = null; String subgroupEdit = null; if (isEdit){ try { labelEdit = Criteria2.getCr2CardLabel(); _Label=Utils.getMessage(session, labelEdit, Utils.getMessage(session, "L60E0", "<non spécifié>")); subgroupEdit = Criteria2.getCr2SubGroup(); } catch(FieldNotInitializedException ex) { } } try { operation = Criteria2.getCr2CardOpe(); } catch (FieldNotInitializedException ex){ } String subgroup = Utils.getRequestParameter(context, request, "sbgroup"); String Group = Utils.getRequestParameter(context, request, "Group"); String paramCheck = Utils.getRequestParameter(context, request, "check"); logger.debug("paramCheck is "+paramCheck); // I don't know why these parameters are coming in as "null" (The string, not NULL), // but this temporarily fixes it. if (Group == null || "null".equalsIgnoreCase(Group)) { Group = ""; } if (subgroup == null || "null".equalsIgnoreCase(subgroup)) { subgroup = ""; } if (paramCheck == null || "null".equalsIgnoreCase(paramCheck)) { paramCheck = ""; } String label1 = null; String CardLabel =null; try { CardLabel = Criteria2.getCr2TempName(); } catch (FieldNotInitializedException ex) { } if ((paramCheck != null && !"null".equals(paramCheck) && "true".equals(paramCheck))) { label1 = CardLabel; Criteria2.setCr2IsTemplate(true); } else if ((paramCheck != null && !"null".equals(paramCheck) && "false".equals(paramCheck))) { Criteria2.setCr2IsTemplate(false); } boolean trou = false; try { trou = Criteria2.isCr2IsTemplate(); } catch (FieldNotInitializedException ex) { } // id of selection to put into Cr2Se2ID String id = flRequest.getParameter("se2ID"); Selection2Bean sel2Bean = new Selection2Bean(id, context); int Crcond = 0; try { Crcond = sel2Bean.getSe2Condition(); } catch(FieldNotInitializedException ex) { } //si Cr2IsTemplate a été coché alors je dois vidé les choix. if (trou && Crcond == 1) { //je dois vider la valeur de cardinalité Criteria2.setCr2Card(Integer.MIN_VALUE); label1 = CardLabel; } else { Criteria2.setCr2TempName(null); } String[] ctlOpe = { "=", "<>", "<", ">", "<=", ">=", "in", "exist" }; String lngID = FlLocale.getInstance(session).getLanguageID(); if (lngID == null) { try { lngID = dico.getRefIdByCode("Lng", "Val", "fr_FR"); } catch (Exception ex) { } } String sfwID = flRequest.getRequestParameterOrAttribute("SfwID"); String existRefID; try { existRefID = dico.getRefIdByCode("Cr2CardOpe", "exist"); } catch (Exception e) { existRefID = "N/A"; } %> <html> <head> <title>e-DEAL CRM</title> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/master_css.jsp"> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/master_js.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/checkFields.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/presentField.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/utils.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/calendar.jsp"></script> <script language="javascript"> var submitFlags = false; function doSubmit() { if(!submitFlags) { submitFlags = true; var f = document.forms[0]; if(!f.Cr2CardOpe.value) { window.alert('<fl:getMessage code="M2007" alt="Veuillez saisir une valeur." js="true"/>'); submitFlags = false; return; } if(f.Cr2TempName && !f.Cr2TempName.value) { window.alert('<fl:getMessage code="M2007" alt="Veuillez saisir une valeur." js="true"/>'); f.Cr2TempName.focus(); submitFlags = false; return; } <% if(!trou) { %> if(!f.Cr2Card.value) { window.alert('<fl:getMessage code="M2007" alt="Veuillez saisir une valeur." js="true"/>'); f.Cr2Card.focus(); submitFlags = false; return; } prepNumsForSubmit(separateurDecimal, separateurMilliers, f.Cr2Card); <%}%> var url = '<fl:webapp/>/edit_selection2.fl?id=<%= id %>&GrpID=<%= GrpID %>&SfwID=<%= sfwID %>'; f.action = '<fl:webapp/>/save_criteria2.fl?se2ID=<%= id %>&GrpID=<%= GrpID %>&SfwID=<%= sfwID %>'; f.$$returnedHtmlHead.value = '<scr' + 'ipt type="text/javascript" language="javascript">window.opener.parent.location = "' + url + '";window.close();</scr' + 'ipt>'; presentFieldsValue(); f.submit(); } } function doCancel(){ window.close(); } function doSelect(field){ var f = document.forms[0]; window.open('<fl:link url="/select_label.fl?1=1"/>&field=' + field + '&lng=' + encodeURIComponent(f.lngID.value), 'select_label', 'width=1000,height=500,menubar=no,status=no,resizable=yes'); } function doRemove(pFld){ var f = document.forms[0]; f.elements[pFld].value = ''; f.elements['lbl' + pFld].value = ''; } function doRefreshTemp(){ var f = document.forms[0]; check = f.Cr2IsTemplate.checked; f.action='<fl:webapp/>/refresh_agraggate.fl?se2ID=<%=id%>&Group=<%=Group%>&edit=<%=edit%>&check='+check+'&sbgroup=<%=subgroup%>&label=<%=label%>&SfwID=<%=sfwID%>'; doExitConf = false; f.submit(); } </script> <body style="overflow: auto; height: 100%;"> <div id="object_css" style="top: 0px; left: 0px; bottom: 0px; height: 100%;"> <fl:bigTabs ignoreList="true" objectTitle="<%= Utils.getMessage(session, \"L6396\", false, true, \"Critère\") %>"> <form action="" method="POST"> <input name="Cr2Se2ID" type="hidden" value="<%=id%>"> <input name="Cr2And" type="hidden" value="<%=IsAnd%>"> <%if(isEdit){%> <input type="hidden" name="Cr2CardLabel" value="<%=labelEdit%>"> <input type="hidden" name="Cr2SubGroup" value="<%=subgroupEdit%>"> <%} else {%> <input type="hidden" name="Cr2CardLabel" value="<%=label%>"> <input type="hidden" name="Cr2SubGroup" value="<%=subgroup%>"> <%}%> <input type="hidden" name="lngID" value="<%= Utils.formatToWeb(lngID, true) %>"> <input type="hidden" name="Cr2ParentID" value="<%=Group%>"> <input name="$$multivalSeparator" type="hidden" value=";"> <input name="$$presentFields" type="hidden" value="Cr2CardOpe;Cr2Card;Cr2IsTemplate;Cr2TempName"> <input name="$$returnedHtmlHead" type="hidden" value=""> <input name="$$returnedHtmlBody" type="hidden" value="Closing..."> <input type="hidden" name="id" value="<fl:getProperty name="Criteria2" property="Cr2ID" alt=""/>"> <table class="container" cellpadding="0"> <tr class="fieldline"> <% if(Crcond == 1) { %> <td class="dataValue" style="white-space: nowrap;width:10%;"> <fl:getMessage code="F6039" alt="Paramètre"/> </td> <% } %> <td class="dataValue" style="white-space: nowrap;width:10%;"> <fl:getMessage code="L65AE" alt="Agrégat (Comptage)"/> </td> <td class="dataValue" style="white-space: nowrap;width:20%;"> <fl:getMessage code="" alt="Opération"/> </td> <% if (!trou) { %> <td class="dataValue" style="white-space: nowrap;width:60%;"> <fl:getMessage code="L604A" alt="Valeurs associées"/> </td> <%} else {%> <td class="dataValue" style="white-space: nowrap;width:60%;"> <fl:getMessage code="F2001" alt="Label"/> </td> <% } %> </tr> <TR style="vertical-align: top"> <% if(Crcond == 1) { %> <TD class="dataValue" style="white-space: nowrap;width:10%;"> <input name="Cr2IsTemplate" type="checkbox" value="<%= trou %>" <%= trou ? " checked" : "" %> onclick="doRefreshTemp();"> </TD> <% } %> <TD class="dataValue" style="white-space: nowrap;width:10%;"> <%=_Label%> </TD> <TD class="dataValue" style="white-space: nowrap;width:20%;"> <select name="Cr2CardOpe"> <option></option> <% for(int i = 0; i < ctlOpe.length; i++) { try { String opeID = dico.getRefIdByCode("Cr2Ope", ctlOpe[i]); String opeDisp = (String)dico.getRefDisp(session, "Cr2Ope", opeID); // We don't want "exist" for aggregate, it has no sense if (opeID.equals(existRefID)) { continue; } %> <option value="<%= opeID %>" <%= opeID.equals(operation) ? " selected" : "" %>><%= opeDisp %></option> <% } catch (Exception ex) { } } %> </select> </TD> <% if (!trou) { %> <TD class="dataValue" style="white-space: nowrap;width:60%;"> <fl:input property="Cr2Card" nodiv="true"/> </TD> <% } else { %> <TD class="dataValue" style="white-space: nowrap;width:60%;"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td nowrap style="width:80%"> <input name="lblCr2TempName" type="text" value="<%= label1 == null ? "" : Utils.getMessage(session, label1, Utils.getMessage(session, "L60E0", "<non spécifié>")) %>" size="50" onFocus="this.blur();" style="width: 100%"> <input name="Cr2TempName" type="hidden" value="<%= Utils.formatToWeb(label1, true) %>"> </td> <td nowrap style="width:20%"> <a href="javascript:doSelect('Cr2TempName')"><img src="<fl:webapp/>/icons/ico/rechercher.gif" alt="" class="icon"></a> <a href="javascript:doRemove('Cr2TempName')"><img src="<fl:webapp/>/icons/ico/supprimer.gif" alt="" class="icon"></a> </td> </tr> </table> </TD> <% } %> </TR> </table> </form> </fl:bigTabs> <br> <table class="container" width="100%"> <tr class="fieldline"> <td colspan="2" style="text-align: center;"> <a href="javascript:doSubmit();"><img src="<fl:webapp/>/icons/ico/valid_green_long.gif"></a> <a href="javascript:doCancel()"><img src="<fl:webapp/>/icons/ico/fermer_red_long.gif"></a> </td> </tr> </table> </div> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de