% /****************************************************************************** * 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"%> <% 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", "")); 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", "")); 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"; } %> e-DEAL CRM "> <%if(isEdit){%> <%} else {%> <%}%> "> <% if(Crcond == 1) { %> <% } %> <% if (!trou) { %> <%} else {%> <% } %> <% if(Crcond == 1) { %> onclick="doRefreshTemp();"> <% } %> <%=_Label%> <% 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; } %> ><%= opeDisp %> <% } catch (Exception ex) { } } %> <% if (!trou) { %> <% } else { %> ")) %>" size="50" onFocus="this.blur();" style="width: 100%"> <% } %>