Edit C:\galaxie\Back\galaxie\admin\slastate\edit.jsp
<% /****************************************************************************** * 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" %> <jsp:useBean class="com.edeal.frontline.SLAStateBean" id="SLAState" scope="request"/><% 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<Hashtable<String, String>> listField = null; Hashtable<String, String> 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) { } %> <script language="javascript"> <% if (Utils.getRequestParameter(flContext, request, "selfEdit") != null) { %> window.open('<fl:webapp/>/load?op=edit&typ=Criteria&disp=/service/etatsla_/edit_criteria.jsp?SlaID=<%= slaID%><%= SlsID == null? "" : "&CriSlsID_="+SlsID %>', 'SelectCritere', 'menubar=no,status=no,toolbar=no,scrollbars=no,resizable=no,width=500,height=120'); <% } %> function doSubmit() { var f = document.forms[0]; if (f.SlsLabel.value == '') { alert("<fl:getMessage code="M60BF" alt="Veuillez saisir le libellé." js="true"/>"); f.SlsLabel.focus(); return false; } if (f.SlsCode.value == '') { alert("<fl:getMessage code="M60BE" alt="Veuillez saisir le code." js="true"/>"); f.SlsCode.focus(); return false; } presentFieldsValue(); return true; } function addCriteria(slaID) { <% if (SlsID == null) { %> document.forms[0].$$whatNext.value='/admin/slastate/edit.jsp?selfEdit=1'; if (doSubmit(document)) document.forms[0].submit(); <% } else { %> window.open('<fl:webapp/>/load?op=edit&typ=Criteria&disp=/admin/slastate/edit_criteria.jsp?SlaID='+slaID+'<%= SlsID == null? "" : "&CriSlsID_="+SlsID %>', 'SelectCritere', 'menubar=no,status=no,toolbar=no,scrollbars=no,resizable=no,width=500,height=120'); <% } %> } function doEdit(id) { window.open('<fl:webapp/>/load?op=edit&typ=Criteria&id='+ id + '&disp=admin/slastate/edit_criteria.jsp?SlaID=<%= slaID%><%= SlsID == null? "" : "&CriSlsID_="+SlsID %>', 'Criteria', 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=700,height=200'); } function doSelectField(field) { var f = document.forms[0]; window.open('<fl:webapp/>/select_multiple.fl?type=Field&field=' + field + '&query=' + encodeURIComponent("<%=queryField%>") , 'SelectField', 'menubar=no,status=no,toolbar=no,scrollbars=auto,resizable=yes,width=500,height=550'); } </script> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L6566\", false, true, \"Etat SLA\") %>" ou="<%= \"/create_sls.fl?id=\" + SlsID %>"> <fl:form action="/save_sls.fl" bean="SLAState"> <input type="hidden" name="id" value="<fl:getProperty name="SLAState" property="SlsID" alt=""/>"> <input type="hidden" name="SlsSLAID" value="<fl:getProperty name="SLAState" property="SlsSLAID" alt="<%= slaID%>"/>"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td colspan="3"> <table class="container"> <tr class="fieldline"> <td class="labelTitreFiche"><fl:getMessage code="F2001" alt="Libellé"/></td> <td style="padding-left: 10px;"><fl:input property="SlsLabel" mandatoryMsgCode="M60BF"/></td> </tr> </table> </td> </tr> <tr class="ligne_separation"><td colspan="3"></td></tr> <tr> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldRead property="SlsSLAID" href="true" disp="<%= \"/read_sla.fl?SfwID=\"+sfwID %>" bean="true"/> <fl:fieldEdit property="SlsCode" mandatoryMsgCode="M60BE"/> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="L604A" alt="Valeurs associées"/></td> <td class="dataValue" colspan="2"> <% 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<Vector<String>> values = dictionary.getRefList(session, tabID, "Te1"); %> <select name="SlsValue1" id="SlsValue1"> <option value=""></option> <% if (values != null) { for (Vector<String> row : values) { String refID = row.firstElement(); String refDisp = row.elementAt(1); %> <option value="<%= Utils.formatToWeb(refID, true) %>" <%= refID.equals(value1) ? "selected=\"selected\"" : "" %>><%= Utils.formatToWeb(refDisp, false) %></option> <% } } %> </select><br/> <% } 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<Vector<String>> values = dictionary.getRefList(session, tabID, "Te1"); %> <select name="SlsValue2" id="SlsValue2"> <option value=""></option> <% if (values != null) { for (Vector<String> row : values) { String refID = row.firstElement(); String refDisp = row.elementAt(1); %> <option value="<%= Utils.formatToWeb(refID, true) %>" <%= refID.equals(value1) ? "selected=\"selected\"" : "" %>><%= Utils.formatToWeb(refDisp, false) %></option> <% } } %> </select><br/> <% } 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<Vector<String>> values = dictionary.getRefList(session, tabID, "Te1"); %> <select name="SlsValue3" id="SlsValue3"> <option value=""></option> <% if (values != null) { for (Vector<String> row : values) { String refID = (String)row.firstElement(); String refDisp = (String)row.elementAt(1); %> <option value="<%= Utils.formatToWeb(refID, true) %>" <%= refID.equals(value1) ? "selected=\"selected\"" : "" %>><%= Utils.formatToWeb(refDisp, false) %></option> <% } } %> </select><br/> <% } catch (FieldNotInitializedException fnie) { logger.error("SlsValue3 not Initialized"); } } %> </td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="L6567" alt="Délai minimal avant l'état" /></td> <td class="dataValue" colspan="3" style="padding-right: 5px;"><fl:input property="SlsDelayMinDay" size="4" /></td><td><fl:label code="F6125"/></td> </tr> <tr class="fieldline"> <td> </td> <td class="dataValue" colspan="3" style="padding-right: 5px;"><fl:input property="SlsDelayMinHour" size="4"/></td><td><fl:label code="L656F"/></td> </tr> <tr class="fieldline"> <td> </td> <td class="dataValue" colspan="3" style="padding-right: 5px;"><fl:input property="SlsDelayMinMin" size="4"/></td><td><fl:label code="L656E"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="L6568" alt="% Alerte"/></td> <td class="dataValue" colspan="3" style="padding-right: 5px;"><fl:input property="SlsPrcMinAlarm"/></td><td><label title="%">%</label></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="L6569" alt="Temps maximum dans l'état"/></td> <td class="dataValue" colspan="3" style="padding-right: 5px;"><fl:input property="SlsDelayDay" size="4"/></td><td><fl:label code="F6125"/></td> </tr> <tr class="fieldline"> <td> </td> <td class="dataValue" colspan="3" style="padding-right: 5px;"><fl:input property="SlsDelayHour" size="4"/></td><td><fl:label code="L656F"/></td> </tr> <tr class="fieldline"> <td> </td> <td class="dataValue" colspan="3" style="padding-right: 5px;"><fl:input property="SlsDelayMin" size="4"/></td><td><fl:label code="L656E"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="L6568" alt="% Alerte"/></td> <td class="dataValue" colspan="3" style="padding-right: 5px;"><fl:input property="SlsPrcAlarm"/></td><td><label title="%">%</label></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="L707D" alt="Délai maximal avant sortie de l'état" /></td> <td class="dataValue" colspan="3" style="padding-right: 5px;"><fl:input property="SlsDelayMaxDay" size="4"/></td><td><fl:label code="F6125"/></td> </tr> <tr class="fieldline"> <td> </td> <td class="dataValue" colspan="3" style="padding-right: 5px;"><fl:input property="SlsDelayMaxHour" size="4"/></td><td><fl:label code="L656F"/></td> </tr> <tr class="fieldline"> <td> </td> <td class="dataValue" colspan="3" style="padding-right: 5px;"><fl:input property="SlsDelayMaxMin" size="4"/></td><td><fl:label code="L656E"/></td> </tr> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="L6568" alt="% Alerte"/></td> <td class="dataValue" colspan="3" style="padding-right: 5px;"><fl:input property="SlsPrcMaxAlarm"/></td><td><label title="%">%</label></td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldEdit property="SlsFieldActor" selectUrl="javascript:doSelectField('SlsFieldActor');" deleteUrl="javascript:unselectMultiple('SlsFieldActor');"/> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="L656B" alt="Rôles à notifier"/></td> <td class="dataValue"><fl:input property="SlsRoles" type="buttons" separator="<br>"/></td> </tr> </table> </td> </tr> </table> </fl:form> </fl:bigTabs>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de