% /****************************************************************************** * 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.*"%> <%@ page import="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 pID = flRequest.getParameter("id"); String pGrpID = flRequest.getParameter("GrpID"); String pRootFld = flRequest.getParameter("RootFld"); String pCtrID = flRequest.getParameter("CtrID"); FieldBean fldBean = dico.getFieldByName(pRootFld); String ctlSql = ((ObjectsBean)dico.getTable("id", fldBean.getFldObjID())).getObjSql(); String pPvtEventID = flRequest.getParameter("PvtEventID"); int pPvtStatus = -1; try { pPvtStatus = Integer.parseInt(flRequest.getParameter("PvtStatus")); } catch (Exception ex) { } String pPvtFrpID = flRequest.getParameter("PvtFrpID"); String[] pFrpBasicResponse = new String[3]; for (int i = 0; i < 3; i++) { pFrpBasicResponse[i] = flRequest.getParameter("FrpBasicResponse" + i); } if (!"1".equals(flRequest.getParameter("refresh")) && pID != null) { try { Vector children = (new CriteriaBean(pID, session)).getChildren(); CriteriaBean[] hCriBean = new CriteriaBean[6]; for (int i = 0; i < children.size(); i++) { try { CriteriaBean criBean = new CriteriaBean((String)children.elementAt(i), session); String fldSql = dico.getFieldByID(criBean.getCriFldID()).getFldSql(); if ("PvtEventID".equalsIgnoreCase(fldSql)) { pPvtEventID = (String)criBean.getCriChx().firstElement(); } else if ("PvtStatus".equalsIgnoreCase(fldSql)) { pPvtStatus = Integer.parseInt((String)criBean.getCriChx().firstElement()); } else if ("PvtFrpID".equalsIgnoreCase(fldSql)) { pPvtFrpID = "<>".equalsIgnoreCase(dico.getRefCode("CriOpe", criBean.getCriOpe())) ? "true" : "false"; } else if ("FrpBasicResponse0".equalsIgnoreCase(fldSql)) { pFrpBasicResponse[0] = (String)criBean.getCriChx().firstElement(); } else if ("FrpBasicResponse1".equalsIgnoreCase(fldSql)) { pFrpBasicResponse[1] = (String)criBean.getCriChx().firstElement(); } else if ("FrpBasicResponse2".equalsIgnoreCase(fldSql)) { pFrpBasicResponse[2] = (String)criBean.getCriChx().firstElement(); } } catch (Exception ex) { } } } catch (Exception ex) { } } String[][] strValues = new String[][]{ {"", Utils.getMessage(session, "L618A", "indifférent")}, {"true", Utils.getMessage(session, "L2005", "Oui")}, {"false", Utils.getMessage(session, "L2006", "Non")}}; String[] fields = new String[]{"EvtID", "EvtLabel"}; String[] orderBy = new String[]{"EvtLabel"}; Vector vectEvt = EventBean.listSummary(session, fields, orderBy); EventBean evtBean = null; if(vectEvt != null && !vectEvt.isEmpty()) { Hashtable row = (Hashtable)vectEvt.firstElement(); String fstEvtID = (String)row.get("EvtID"); if(pPvtEventID == null || "".equalsIgnoreCase(pPvtEventID)) { pPvtEventID = fstEvtID; } try { evtBean = new EventBean(pPvtEventID, session); } catch (Exception ex) { pPvtEventID = fstEvtID; evtBean = new EventBean(pPvtEventID, session); } } FormBean frmBean = null; if(evtBean != null) { String[][] frmQuery = new String[][]{{"FrmEventID = " + Utils.formatToSQL(context, pPvtEventID)}}; Vector vectFrm = FormBean.list(session, frmQuery); if(vectFrm != null && !vectFrm.isEmpty()) { frmBean = (FormBean)vectFrm.firstElement(); } } String objID = null; String objName = null; ObjectsBean objBean = null; String pageName=null; if (pID==null&& fldBean!=null){ try{ objID = fldBean.getFldObjID(); }catch(FieldNotInitializedException fNe){} if (objID!=null){ try{ objBean = new ObjectsBean(objID, session); }catch(FrontlineException e){} if (objBean!=null){ try{ String radName = objBean.getObjRadical(); if (radName!=null && !"".equals(radName)){ if (radName.equals("Sel")){ pageName = "/edit_selection.fl"; } //Ajouter ici les autres radicaux pour la redirection } }catch(Exception e){} } } } %>