<% /****************************************************************************** * Copyright (c) 2000-2010 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.FieldBean" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="java.util.Iterator" %> <%@ page import="com.edeal.frontline.SLABean" %> <%@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 flContext = flRequest.getContext(); DataDictionary dictionary = flContext.getDataDictionary(); String sfwID = flRequest.getRequestParameterOrAttribute("SfwID"); String slaID = flRequest.getRequestParameterOrAttribute("SlsSlaID"); String slaObjID = null; if (slaID != null && !slaID.equals("")) SLAState.setSlsSLAID(slaID); else { try { slaID = SLAState.getSlsSLAID(); } catch (FieldNotInitializedException e){ } } SLABean slaBean = new SLABean(slaID, flContext); try { slaObjID = slaBean.getSlaObjID(); } catch (FieldNotInitializedException e){ } String field[] = new String[]{"FldID"}; String query[][] = new String[][] {{"FldObjID =" + Utils.formatToSQL(flContext, slaObjID), "FldFobID:ObjSql =" + Utils.formatToSQL(flContext, "Actor")}}; Vector> listField = null; Hashtable rowF = null; try{ listField = FieldBean.listSummary(flContext, field, query); Utils.showQuery(field,query); } catch(Exception e) { } String queryField = "FldID in ("; for (int i=0; i < listField.size() && !listField.isEmpty(); i ++) { rowF = listField.get(i); if (i!=0) queryField += ", "; queryField += Utils.formatToSQL(flContext, (String)rowF.get("FldID")); } queryField += ")"; String fld1 = null; try { fld1 = slaBean.getSlaField1(); } catch (FieldNotInitializedException fnie) { logger.error("SlaField1 not Initialized"); } String fld2 = null; try { fld2 = slaBean.getSlaField2(); } catch (FieldNotInitializedException fnie) { logger.error("SlaField2 not Initialized"); } String fld3 = null; try { fld3 = slaBean.getSlaField3(); } catch (FieldNotInitializedException fnie) { logger.error("SlaField3 not Initialized"); } String SlsID = null; try { SlsID = SLAState.getSlsID(); } catch (FieldNotInitializedException fnie) { } %> " ou="<%= \"/create_sls.fl?id=\" + SlsID %>"> "> ">
" bean="true"/>
<% if (fld1 != null) { String value1 = null; try { value1 = SLAState.getSlsValue1(); } catch (FieldNotInitializedException fnie) { } FieldBean fld = dictionary.getFieldByID(fld1); String display = null; String fldDisplayLabel = null; try { fldDisplayLabel = fld.getFldDisplayLabel(); } catch (FieldNotInitializedException fnie) { } String fldDisplay = null; try { fldDisplay = fld.getFldDisplay(); } catch (FieldNotInitializedException fnie) { } if (fldDisplayLabel != null) display = Utils.getMessage(session, fldDisplayLabel, false, true, fldDisplay); else display = fldDisplay; %> <%= Utils.formatToWeb(display, false) %> : <% try { String tabID = fld.getFldTabID(); Vector> values = dictionary.getRefList(session, tabID, "Te1"); %>
<% } catch (FieldNotInitializedException fnie) { logger.error("SlsValue1 not Initialized"); } } %><% if (fld2 != null) { String value1 = null; try { value1 = SLAState.getSlsValue2(); } catch (FieldNotInitializedException fnie) { } FieldBean fld = dictionary.getFieldByID(fld2); String display = null; String fldDisplayLabel = null; try { fldDisplayLabel = fld.getFldDisplayLabel(); } catch (FieldNotInitializedException fnie) { } String fldDisplay = null; try { fldDisplay = fld.getFldDisplay(); } catch (FieldNotInitializedException fnie) { } if (fldDisplayLabel != null) display = Utils.getMessage(session, fldDisplayLabel, false, true, fldDisplay); else display = fldDisplay; %> <%= Utils.formatToWeb(display, false) %> : <% try { String tabID = fld.getFldTabID(); Vector> values = dictionary.getRefList(session, tabID, "Te1"); %>
<% } catch (FieldNotInitializedException fnie) { logger.error("SlsValue2 not Initialized"); } } %><% if (fld3 != null) { String value1 = null; try { value1 = SLAState.getSlsValue3(); } catch (FieldNotInitializedException fnie) { } FieldBean fld = dictionary.getFieldByID(fld3); String display = null; String fldDisplayLabel = null; try { fldDisplayLabel = fld.getFldDisplayLabel(); } catch (FieldNotInitializedException fnie) { } String fldDisplay = null; try { fldDisplay = fld.getFldDisplay(); } catch (FieldNotInitializedException fnie) { } if (fldDisplayLabel != null) display = Utils.getMessage(session, fldDisplayLabel, false, true, fldDisplay); else display = fldDisplay; %> <%= Utils.formatToWeb(display, false) %> : <% try { String tabID = fld.getFldTabID(); Vector> values = dictionary.getRefList(session, tabID, "Te1"); %>
<% } catch (FieldNotInitializedException fnie) { logger.error("SlsValue3 not Initialized"); } } %>