Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\admin\fltask\edit.jsp
<%@page import="java.util.List"%> <%@page import="java.util.ArrayList"%> <% /****************************************************************************** * 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"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.EnterpriseBean" %> <%@ page import="java.util.Date" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="com.edeal.frontline.ActorBean" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.LicenceManager" %> <%@ page import="com.edeal.frontline.SiteBean" %> <%@ page import="com.edeal.frontline.MenuByRoleBean" %> <%@ page import="com.edeal.frontline.MenuBean" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.FlTaskBean" id="FlTask" scope="request"/> <%@ page isELIgnored="false"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <% List task = new ArrayList(); 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 params = ""; try { params = FlTask.getTskParameters(); } catch (FieldNotInitializedException e) {} String id = null; try { id = FlTask.getID(); } catch (FieldNotInitializedException e) {} String valCode = "HOURLY"; String valID = dico.getRefIdByCode("TskRepetition" , valCode); try { valID = (String) FlTask.getTskRepetition(); valCode = dico.getRefCode("TskRepetition" , valID); } catch (FieldNotInitializedException fex) {} String nbRowSpan = ""; if ("HOURLY".equals(valCode) || "MONTHLY_B".equals(valCode) || "YEARLY_B".equals(valCode)) nbRowSpan = "6"; else if ("DAILY_A".equals(valCode) || "DAILY_B".equals(valCode) || "MONTHLY_A".equals(valCode)) nbRowSpan = "4"; else if ("WEEKLY".equals(valCode) || "YEARLY_A".equals(valCode)) nbRowSpan = "5"; // Je prépare mes radios boutons pour le type de répétition // Je ne peux pas utiliser <fl:getProperty type="radio" car j'ai besoin de rajouter un atribut onClick sur chacun des radio String radios = ""; Vector lst = dico.getRefList(session, "TskRepetition"); for (int i = 0 ; i < lst.size() ; i++) { String curID = (String) ((Vector) lst.elementAt(i)).elementAt(0); String curDisp = (String) ((Vector) lst.elementAt(i)).elementAt(1); String curChecked = (valID.equals(curID) ? " checked" : ""); radios += "<input type=\"radio\" name=\"TskRepetition\" value=\"" + curID + "\" onClick=\"doRefresh()\"" + curChecked + ">" + curDisp + "<br>"; } %> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <script type="text/javascript" language="javascript"> function doSubmit() { f = document.forms[0]; if ($('#Sequence').attr('checked') == 'checked') { $('#TskJavaObject').attr('value', "com.edeal.frontline.tasks.FlTaskSequence"); } else { $('#TskActions').attr('value', ""); var paramOK = getStringParameter(); if (paramOK == null){ if(!acceptClass) { if (!errormsg) errormsg = '<fl:getMessage code="M9042" alt="Veuillez spécifier le nom complet de la classe Java implémentant la tâche planifiée." js="true"/>'; alert(errormsg); return false; } return false; } $('#TskParameters').attr('value', paramOK); } if (f.TskPriority.value == "") { f.TskPriority.value = 5; } if (f.TskPriority.value < <%= Thread.MIN_PRIORITY %> || f.TskPriority.value > <%= Thread.MAX_PRIORITY %>) { alert("<fl:getMessage code="M60C1" alt="Le priorité specifié est hors de la limité" js="true"/>"); f.TskPriority.focus(); return; } <% if ( "HOURLY".equals(valCode) ) { %> //alert("horaire"); if (f.TskInterval.value == "") { alert("<fl:getMessage code="M600D" alt="Planification horaire" js="true"/> : <fl:getMessage code="M600E" alt="Le champ Intervalle est obligatoire." js="true"/>"); f.TskInterval.focus(); return; } if (f.TskStartTime.value == "") { alert("<fl:getMessage code="M600D" alt="Planification horaire" js="true"/> : <fl:getMessage code="M6010" alt="Le champ Heure de début est obligatoire." js="true"/>"); f.TskStartTime.focus(); return; } prepNumsForSubmit(separateurDecimal , separateurMilliers, f.TskInterval, f.TskPriority); <% } else if ( "DAILY_A".equals(valCode) ) { %> //alert("quotidienne 1"); if (f.TskInterval.value == "") { alert("<fl:getMessage code="F602B" alt="Planification quotidienne 1" js="true"/> : <fl:getMessage code="M600E" alt="Le champ Intervalle est obligatoire." js="true"/>"); f.TskInterval.focus(); return; } if (f.TskStartTime.value == "") { alert("<fl:getMessage code="F602B" alt="Planification quotidienne 1" js="true"/> : <fl:getMessage code="M6010" alt="Le champ Heure de début est obligatoire." js="true"/>"); f.TskStartTime.focus(); return; } if (f.TskStartDate.value == "") { alert("<fl:getMessage code="F602B" alt="Planification quotidienne 1" js="true"/> : <fl:getMessage code="M600F" alt="Le champ Date d\'activation est obligatoire." js="true"/>"); f.TskStartDate.focus(); return; } prepNumsForSubmit(separateurDecimal , separateurMilliers, f.TskInterval); <% } else if ( "DAILY_B".equals(valCode) ) { %> //alert("quotidienne 2"); if (f.TskStartTime.value == "") { alert("<fl:getMessage code="M6012" alt="Planification quotidienne 2" js="true"/> : <fl:getMessage code="M6010" alt="Le champ Heure de début est obligatoire." js="true"/>"); f.TskStartTime.focus(); return; } var r; var isDaySelected = false; for (r=0 ; r < f.TskDaysOfWeek.length ; r++) { if (f.TskDaysOfWeek[r].checked) { isDaySelected = true; } } if (!isDaySelected) { alert("<fl:getMessage code="M6012" alt="Planification quotidienne 2" js="true"/> : <fl:getMessage code="M6016" alt="Le champ Jour est obligatoire." js="true"/>"); return; } <% } else if ( "WEEKLY".equals(valCode) ) { %> //alert("hebdo"); if (f.TskInterval.value == "") { alert("<fl:getMessage code="M6013" alt="Planification hebdomadaire" js="true"/> : <fl:getMessage code="M600E" alt="Le champ Intervalle est obligatoire." js="true"/>"); f.TskInterval.focus(); return; } if (f.TskStartTime.value == "") { alert("<fl:getMessage code="M6013" alt="Planification hebdomadaire" js="true"/> : <fl:getMessage code="M6010" alt="Le champ Heure de début est obligatoire." js="true"/>"); f.TskStartTime.focus(); return; } if (f.TskStartDate.value == "") { alert("<fl:getMessage code="M6013" alt="Planification hebdomadaire" js="true"/> : <fl:getMessage code="M600F" alt="Le champ Date d\'activation est obligatoire." js="true"/>"); f.TskStartDate.focus(); return; } <% } else if ( "MONTHLY_A".equals(valCode) ) { %> //alert("mensuelle 1"); tskDayOfMonthVal = f.TskStartDate.value.substring(0 , f.TskStartDate.value.indexOf("/")); f.TskDayOfMonth.value = removeLeadingZeros(tskDayOfMonthVal); if (f.TskInterval.value == "") { alert("<fl:getMessage code="M6014" alt="Planification mensuelle 1" js="true"/> : <fl:getMessage code="M600E" alt="Le champ Intervalle est obligatoire." js="true"/>"); f.TskInterval.focus(); return; } if (f.TskStartTime.value == "") { alert("<fl:getMessage code="M6014" alt="Planification mensuelle 1" js="true"/> : <fl:getMessage code="M6010" alt="Le champ Heure de début est obligatoire." js="true"/>"); f.TskStartTime.focus(); return; } if (f.TskStartDate.value == "") { alert("<fl:getMessage code="M6014" alt="Planification mensuelle 1" js="true"/> : <fl:getMessage code="M600F" alt="Le champ Date d\'activation est obligatoire." js="true"/>"); f.TskStartDate.focus(); return; } prepNumsForSubmit(separateurDecimal , separateurMilliers, f.TskInterval); <% } else if ( "MONTHLY_B".equals(valCode) ) { %> //alert("mensuelle 2"); if (f.TskInterval.value == "") { alert("<fl:getMessage code="M6015" alt="Planification mensuelle 2" js="true"/> : <fl:getMessage code="M600E" alt="Le champ Intervalle est obligatoire." js="true"/>"); f.TskInterval.focus(); return; } if (f.TskStartTime.value == "") { alert("<fl:getMessage code="M6015" alt="Planification mensuelle 2" js="true"/> : <fl:getMessage code="M6010" alt="Le champ Heure de début est obligatoire." js="true"/>"); f.TskStartTime.focus(); return; } if (f.TskStartDate.value == "") { alert("<fl:getMessage code="M6015" alt="Planification mensuelle 2" js="true"/> : <fl:getMessage code="M600F" alt="Le champ Date d\'activation est obligatoire." js="true"/>"); f.TskStartDate.focus(); return; } var r; var isDaySelected = false; for (r=0 ; r < f.TskDaysOfWeek.length ; r++) { if (f.TskDaysOfWeek[r].checked) { isDaySelected = true; } } if (!isDaySelected) { alert("<fl:getMessage code="M6015" alt="Planification mensuelle 2" js="true"/> : <fl:getMessage code="M6016" alt="Le champ Jour est obligatoire." js="true"/>"); return; } prepNumsForSubmit(separateurDecimal , separateurMilliers, f.TskInterval); <% } else if ( "YEARLY_A".equals(valCode) ) { %> //alert("annuelle 1"); if (f.TskStartTime.value == "") { alert("<fl:getMessage code="M6017" alt="Planification annuelle 1" js="true"/> : <fl:getMessage code="M6010" alt="Le champ Heure de début est obligatoire." js="true"/>"); f.TskStartTime.focus(); return; } <% } else if ( "YEARLY_B".equals(valCode) ) { %> //alert("annuelle 2"); if (f.TskStartTime.value == "") { alert("<fl:getMessage code="M6018" alt="Planification annuelle 2" js="true"/> : <fl:getMessage code="M6010" alt="Le champ Heure de début est obligatoire." js="true"/>"); f.TskStartTime.focus(); return; } var r; var isDaySelected = false; for (r=0 ; r < f.TskDaysOfWeek.length ; r++) { if (f.TskDaysOfWeek[r].checked) { isDaySelected = true; } } if (!isDaySelected) { alert("<fl:getMessage code="M6018" alt="Planification annuelle 2" js="true"/> : <fl:getMessage code="M6016" alt="Le champ Jour est obligatoire." js="true"/>"); return; } <% } %> return true; } function alwaysValid(){ return true; } function doRefresh() { var f = document.forms[0]; presentFieldsValue(); splitter="*$$*"; validateur = alwaysValid; $('#TskParameters').attr('value', getStringParameter()); f.action = "<fl:link url="<%= \"/refresh_fltask.fl\" %>"/>"+"&refresh=true"; doExitConf = false; f.submit(); } function isSequence(){ if($('#TskJavaObject').val()=='com.edeal.frontline.tasks.FlTaskSequence'){ $('#Sequence').attr('checked','checked'); } } var remember; function initRemember() { if ($('#Sequence').attr('checked') != 'checked') { remember = $('#TskJavaObject').val(); } if(remember === undefined || $('#Sequence').attr('checked') == 'checked' ){ remember = ''; $('#TskJavaObject').val(''); } } function changeSelectObject() { if ($('#Sequence').attr('checked') == 'checked') { remember = $('#TskJavaObject').val(); $('#TskJavaObject').val("com.edeal.frontline.tasks.FlTaskSequence"); $('#TskJavaObject').parents('tr.fieldline').hide(); $('#description').hide(); $('#TskActions').parents('tr.fieldline').show(); $('#parametre').hide(); } else { $('#TskJavaObject').val(remember); $('#TskJavaObject').parents('tr.fieldline').show(); $('#description').show(); $('#TskActions').parents('tr.fieldline').hide(); $('#parametre').show(); } } var visibleParameterClass = ''; var paramJSON; var parameter = "<%= params %>" var acceptClass = false; var classParam = true; var splitter =" "; validateur = isValid; var errormsg = ''; function addParametersTab() { if ($('#Sequence').attr('checked') != 'checked'&& $('#TskJavaObject').val() != "" && visibleParameterClass != $('#TskJavaObject').val() ){ $("#params tr").replaceWith( '' ); paramJSON = null; visibleParameterClass = $('#TskJavaObject').val(); var url = "ajax_taskmethod_infos.fl?class=" + $('#TskJavaObject').val(); var request = $.ajax({ type: "GET", url: url, timeout: 20000, dataType: "json", async: true, beforeSend :showWaiting, // success: onInfosReceived, error : hideWaiting, statusCode: { 404: Error404, 202: function(response) { acceptClass = false; hideWaiting(); var json = response; errormsg = json["error"]; alert(errormsg); }, 200 :onInfosReceived } }); } } function onInfosReceived(response) { acceptClass = true; hideWaiting(); var json = response; paramJSON = json; var tskDescription = json["description"]; var param = parameter.split(splitter); var parameterNb = json["parameters"].length; if(parameterNb == 0) parameterNb = 1; for(var i=0; i < parameterNb; i++) { var value = ''; var jsonName; var jsonDescription; //No parameter defined in FlTAsk if (json["parameters"].length == 0) { classParam = false; jsonName ='<<fl:getMessage code="F2025" alt="Name" js="true"/>>'; jsonDescription = '<<fl:getMessage code="L2007" alt="Description" js="true"/>>'; value = parameter; } else if(param.length == json["parameters"].length){//parameters are valid for parameter definition value = param[i]; jsonName = json["parameters"][i].name; jsonDescription = json["parameters"][i].description; } else if( parameter == ""){//creation value = ""; jsonName = json["parameters"][i].name; jsonDescription = json["parameters"][i].description; } else {//no corresponding parameter string with definition classParam = false; jsonName = '<<fl:getMessage code="F2025" alt="Name" js="true"/>>'; jsonDescription = '<<fl:getMessage code="L2007" alt="Description" js="true"/>>'; value = parameter; } createDynamicTable($("#params"),jsonName, jsonDescription, value); } $('#description td:nth-child(2)').text(json["description"]); splitter= " "; } function createDynamicTable(tbody, name, description, value) { if (tbody == null || tbody.length < 1) return; var trow = $("<tr>").addClass("fieldline"); $("<td>").addClass("dataLabel").text(name).appendTo(trow); $("<td>").addClass("dataLabel").text(description).appendTo(trow); var cellValue = $("<td>"); var input = $("<input type='text' name='params' onblur='isValid(this)'>"); if (value.trim() != "") { input.attr('value', value); } if (value.trim() == "_NULL__"){ input.attr('value', ""); } input.appendTo(cellValue); cellValue.appendTo(trow); trow.appendTo(tbody); } function isValid(name){ if(!classParam) return true; // if($(name).val().trim() == "" ){ // alert('<fl:getMessage code="L8181" alt="les paramètres ne peuvent être vide" js="true"/>'); // return false; // } if($(name).val().trim().indexOf(" ") != -1) { alert('<fl:getMessage code="L8182" alt="les paramètres ne doivent pas contenir d\\\'espaces" js="true"/>'); return false; } return true; } function refreshAction(){ splitter="*$$*"; } function getStringParameter() { var concat = ''; if ( paramJSON == null ){ return null; } for(var i=0; i < paramJSON["parameters"].length; i++) { if(i!=0) concat = concat + splitter; var input = $("#params tr td:nth-child(1):contains('"+paramJSON["parameters"][i].name+"')+td+td :input"); if (!validateur(input)) return null; if (input.val() != undefined ) { if(input.val().trim() != "") concat = concat + input.val().trim(); else concat = concat + "_NULL__"; } else concat = concat + "_NULL__"; } if ( paramJSON["parameters"].length == 0){ var input = $("#params tr td:nth-child(1)+td+td :input"); concat = input.val(); } return concat; } $(document).ready(isSequence); $(document).ready(initRemember); $(document).ready(changeSelectObject); <c:if test="${param.refresh}"> $(document).ready(refreshAction) ; </c:if> $(document).ready(addParametersTab); </script> <fl:form action="/save_fltask.fl" bean="FlTask"> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L0046\", false, true, \"Tâche plannifiée\") %>" ou="<%= \"/edit_fltask.fl\" + (id != null ? \"?id=\" + id : \"\") %>"> <table class="container" cellpadding="0"> <tr> <td colspan="3"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="labelTitreFiche"> <fl:label field="TskName" labelClassName="titreFiche"/> </td> <td class="fieldTitreFiche"> <fl:input property="TskName" mandatoryMsgCode="M60A2" alt="" /> </td> </tr> </table> </td> </tr> <tr><td colspan="3" class="ligne_separation"/></tr> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldline" > <td id="Sequence_label" class="dataLabel"> <div> <label title="Sequence"><fl:label code="F80A2" label="Enchainement"/></label> </div> </td> <td id="Sequence_value" class="dataValue"> <div class="input"> <input id="Sequence" name="isSequence" type="checkbox" value="true" class="checkbox" onclick="changeSelectObject()" > </div> </td> </tr> <!-- <fl:fieldEdit property="TskBase"/> --> <fl:fieldEdit property="TskJavaObject" onblur="addParametersTab()"/> <fl:fieldEdit property="TskBase" /> <tr class="fieldline" id="description"> <td class="dataLabel" > <div> <label title="description"><fl:label code="L2007" label="Description"/></label> </div> </td> <td class="dataValue" /> </tr> <fl:fieldEdit property="TskActions"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table> <fl:fieldEdit property="TskPriority"/> </table> <input type="hidden" id="TskParameters" name="TskParameters" value=""> <fieldset name="paramètres" id="parametre"> <legend align=top class="dataLabel" style="width:55px" ><fl:getMessage code="L6070" alt="Parameters"/></legend> <table class="data_column" cellpadding="0" id="params"> </table> </fieldset> </td> </tr> </table> <table class="container" cellpadding="0"> <tr><td class="titrePartie"><fl:getMessage code="F2024" alt="Notes"/></td></tr> <tr><td class="dataValue noPaddingLeft"><fl:input property="TskNotes" rows="5" nodiv="false"/></td></tr> <tr class="ligne_separation"><td></td></tr> <tr class="ligne_separation_couleur"><td></td></tr> <tr class="ligne_separation"><td></td></tr> </table> <fl:smallTabs name="TskEditTabs"> <fl:sTab id="FLTASK" title="<%= Utils.getMessage(session, \"L6071\", false, true, \"Planification\")%>"> <table class="data_column" cellpadding="0" border="0"> <tr class="fieldline"> <td class="column2"> <table class="data_column" cellpadding="0" border="0"> <tr> <td rowspan="8" valign="top" class="dataLabel"><fl:getMessage code="F2017" alt="Fréquence"/></td> <td class="dataLabel"> <%= radios %> </td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <% if("HOURLY".equals(valCode)) { %> <td class="column2"> <table class="data_column" cellpadding="0" border="0"> <tr class="fieldline"> <td class="dataLabel"> <fl:label code="F6019"/> </td> <td class="dataValue"> <input name="TskInterval" type="text" value="<fl:getProperty name="FlTask" property="TskInterval" alt="" format="###0" edit="true"/>" class="input chpsTextObligatoire" onBlur="ctrlNumField(this , 'integer','<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>')"> <fl:getMessage code="L609E" alt="minute(s)"/> </td> </tr> <tr class="fieldline"> <td class="dataLabel"> <fl:getMessage code="F601A" alt="Heure de début"/> </td> <td class="dataValue"> <input name="TskStartTime" type="text" value="<fl:getProperty name="FlTask" property="TskStartTime" alt="" edit="true" format="time"/>" class="chpsTextObligatoire" size="10" onblur="ctrlHourField(this, '<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>');"> </td> </tr> <tr class="fieldline"> <td class="dataLabel"> <fl:getMessage code="F601B" alt="Date d\'activation"/> </td> <td class="dataValue"> <fl:input property="TskStartDate" mandatoryMsgCode="M600F"/> </td> </tr> <tr class="fieldline"> <td class="dataLabel"> <fl:getMessage code="F601C" alt="Date de désactivation"/> </td> <td class="dataValue"> <fl:input property="TskEndDate"/> </td> </tr> <tr class="fieldline"> <td class="dataLabel"> <fl:getMessage code="F601D" alt="Heure d\'arrêt"/> </td> <td class="dataValue"> <input name="TskEndTime" type="text" value="<fl:getProperty name="FlTask" property="TskEndTime" alt="" edit="true" format="time"/>" size="10" onblur="ctrlHourField(this, '<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>');"> </td> </tr> <tr class="fieldline"> <td class="dataLabel"> <fl:getMessage code="F601E" alt="Jours"/> </td> <td class="dataValue"> <fl:getProperty name="FlTask" type="checkbox" separator="</br>" property="TskDaysOfWeek" alt="" edit="true"/> </td> </tr> </table> </td> <% } else if ("DAILY_A".equals(valCode)) { %> <td class="column2"> <table class="data_column" cellpadding="0" border="0"> <tr class="fieldline"> <td class="dataLabel"> <fl:getMessage code="F6019" alt="Intervalle"/> </td> <td class="dataValue"> <input name="TskInterval" class="chpsTextObligatoire" type="text" value="<fl:getProperty name="FlTask" property="TskInterval" alt="" format="###0" edit="true"/>" size="10" onBlur="ctrlNumField(this , 'integer','<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>')"> <fl:getMessage code="L609F" alt="jour(s)"/> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601A" alt="Heure de début"/> </td> <td class="dataValue"> <input name="TskStartTime" class="chpsTextObligatoire" type="text" value="<fl:getProperty name="FlTask" property="TskStartTime" alt="" edit="true" format="time"/>" size="10" onblur="ctrlHourField(this, '<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>');"> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601B" alt="Date d\'activation"/> </td> <td class="dataValue"> <fl:input property="TskStartDate" mandatoryMsgCode="M600F"/> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601C" alt="Date de désactivation"/> </td> <td class="dataValue"> <fl:input property="TskEndDate"/> </td> </tr> </table> </td> <% } else if ("DAILY_B".equals(valCode)) { %> <td class="column2"> <table class="data_column" cellpadding="0" border="0"> <tr class="fieldline"> <td class="dataLabel"> <fl:getMessage code="F601A" alt="Heure de début"/> </td> <td class="dataValue"> <input name="TskStartTime" class="chpsTextObligatoire" type="text" value="<fl:getProperty name="FlTask" property="TskStartTime" alt="" edit="true" format="time"/>" size="10" onblur="ctrlHourField(this, '<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>');"> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601B" alt="Date d\'activation"/> </td> <td class="dataValue"> <fl:input property="TskStartDate" mandatoryMsgCode="M600F"/> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601C" alt="Date de désactivation"/> </td> <td class="dataValue"> <fl:input property="TskEndDate"/> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601E" alt="Jours"/> </td> <td class="dataValue"> <fl:getProperty name="FlTask" type="checkbox" separator="</br>" property="TskDaysOfWeek" alt="" edit="true"/> </td> </tr> </table> </td> <% } else if ("WEEKLY".equals(valCode)) { %> <td class="column2"> <table class="data_column" cellpadding="0" border="0"> <tr class="fieldline"> <td class="dataLabel"> <fl:getMessage code="F6019" alt="Intervalle"/> </td> <td class="dataValue"> <input name="TskInterval" class="chpsTextObligatoire" type="text" value="<fl:getProperty name="FlTask" property="TskInterval" alt="" format="###0" edit="true"/>" size="10" onBlur="ctrlNumField(this , 'integer','<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>')"> <fl:getMessage code="L60A0" alt="semaine(s)"/> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601A" alt="Heure de début"/> </td> <td class="dataValue"> <input name="TskStartTime" class="chpsTextObligatoire" type="text" value="<fl:getProperty name="FlTask" property="TskStartTime" alt="" edit="true" format="time"/>" size="10" onblur="ctrlHourField(this, '<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>');"> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601B" alt="Date d\'activation"/> </td> <td class="dataValue"> <fl:input property="TskStartDate" mandatoryMsgCode="M600F"/> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601C" alt="Date de désactivation"/> </td> <td class="dataValue"> <fl:input property="TskEndDate"/> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601E" alt="Jours"/> </td> <td class="dataValue"> <fl:getProperty name="FlTask" type="checkbox" separator="</br>" property="TskDaysOfWeek" alt="" edit="true"/> </td> </tr> </table> </td> <% } else if ("MONTHLY_A".equals(valCode)) { %> <td class="column2"> <table class="data_column" cellpadding="0" border="0"> <tr class="fieldline"> <td class="dataLabel"> <fl:getMessage code="F6019" alt="Intervalle"/> </td> <td class="dataValue"> <input name="TskInterval" class="chpsTextObligatoire" type="text" value="<fl:getProperty name="FlTask" property="TskInterval" alt="" format="###0" edit="true"/>" size="10" onBlur="ctrlNumField(this , 'integer','<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>')"> <fl:getMessage code="L6046" alt="mois"/> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601A" alt="Heure de début"/> </td> <td class="dataValue"> <input name="TskStartTime" class="chpsTextObligatoire" type="text" value="<fl:getProperty name="FlTask" property="TskStartTime" alt="" edit="true" format="time"/>" size="10" onblur="ctrlHourField(this, '<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>');"> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601B" alt="Date d\'activation"/> </td> <td class="dataValue"> <% String txtDayOfMonth = ""; try { int intDayOfMonth = FlTask.getTskDayOfMonth(); txtDayOfMonth = Integer.toString(intDayOfMonth); } catch (FieldNotInitializedException fnie) { } %> <fl:input property="TskStartDate" mandatoryMsgCode="M600F"/> <input type="hidden" name="TskDayOfMonth" value="<%= txtDayOfMonth %>"> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601C" alt="Date de désactivation"/> </td> <td class="dataValue"> <fl:input property="TskEndDate"/> </td> </tr> </table> </td> <% } else if ("MONTHLY_B".equals(valCode)) { %> <td class="column2"> <table class="data_column" cellpadding="0" border="0"> <tr class="fieldline"> <td class="dataLabel"> <fl:getMessage code="F6019" alt="Intervalle"/> </td> <td class="dataValue"> <input name="TskInterval" class="chpsTextObligatoire" type="text" value="<fl:getProperty name="FlTask" property="TskInterval" alt="" format="###0" edit="true"/>" size="10" onBlur="ctrlNumField(this , 'integer','<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>')"> <fl:getMessage code="L6046" alt="mois"/> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601A" alt="Heure de début"/> </td> <td class="dataValue"> <input name="TskStartTime" class="chpsTextObligatoire" type="text" value="<fl:getProperty name="FlTask" property="TskStartTime" alt="" edit="true" format="time"/>" size="10" onblur="ctrlHourField(this, '<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>');"> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601B" alt="Date d\'activation"/> </td> <td class="dataValue"> <fl:input property="TskStartDate" mandatoryMsgCode="M600F"/> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601C" alt="Date de désactivation"/> </td> <td class="dataValue"> <fl:input property="TskEndDate"/> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F6020" alt="Position du jour dans le mois"/> </td> <td class="dataValue"> <select name="TskInstance"> <fl:getProperty name="FlTask" type="select" property="TskInstance" alt="" edit="true"/> </select> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F6021" alt="Jour"/> </td> <td class="dataValue"> <fl:getProperty name="FlTask" type="radio" separator="</br>" property="TskDaysOfWeek" alt="" edit="true"/> </td> </tr> </table> </td> <% } else if ("YEARLY_A".equals(valCode)) { %> <td class="column2"> <table class="data_column" cellpadding="0" border="0"> <tr class="fieldline"> <td class="dataLabel"> <fl:getMessage code="F601A" alt="Heure de début"/> </td> <td class="dataValue"> <input name="TskStartTime" class="chpsTextObligatoire" type="text" value="<fl:getProperty name="FlTask" property="TskStartTime" alt="" edit="true" format="time"/>" size="10" onblur="ctrlHourField(this, '<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>');"> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601B" alt="Date d\'activation"/> </td> <td class="dataValue"> <fl:input property="TskStartDate" mandatoryMsgCode="M600F"/> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601C" alt="Date de désactivation"/> </td> <td class="dataValue"> <fl:input property="TskEndDate"/> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601F" alt="Jour du mois"/> </td> <td class="dataValue"> <% String txtDayOfMonth2 = ""; try { int intDayOfMonth2 = FlTask.getTskDayOfMonth(); txtDayOfMonth2 = Integer.toString(intDayOfMonth2); } catch (FieldNotInitializedException fnie) { } %> <select name="TskDayOfMonth"> <option value="1" <%= "1".equals(txtDayOfMonth2) ? "selected" : "" %> >01 <option value="2" <%= "2".equals(txtDayOfMonth2) ? "selected" : "" %> >02 <option value="3" <%= "3".equals(txtDayOfMonth2) ? "selected" : "" %> >03 <option value="4" <%= "4".equals(txtDayOfMonth2) ? "selected" : "" %> >04 <option value="5" <%= "5".equals(txtDayOfMonth2) ? "selected" : "" %> >05 <option value="6" <%= "6".equals(txtDayOfMonth2) ? "selected" : "" %> >06 <option value="7" <%= "7".equals(txtDayOfMonth2) ? "selected" : "" %> >07 <option value="8" <%= "8".equals(txtDayOfMonth2) ? "selected" : "" %> >08 <option value="9" <%= "9".equals(txtDayOfMonth2) ? "selected" : "" %> >09 <option value="10" <%= "10".equals(txtDayOfMonth2) ? "selected" : "" %> >10 <option value="11" <%= "11".equals(txtDayOfMonth2) ? "selected" : "" %> >11 <option value="12" <%= "12".equals(txtDayOfMonth2) ? "selected" : "" %> >12 <option value="13" <%= "13".equals(txtDayOfMonth2) ? "selected" : "" %> >13 <option value="14" <%= "14".equals(txtDayOfMonth2) ? "selected" : "" %> >14 <option value="15" <%= "15".equals(txtDayOfMonth2) ? "selected" : "" %> >15 <option value="16" <%= "16".equals(txtDayOfMonth2) ? "selected" : "" %> >16 <option value="17" <%= "17".equals(txtDayOfMonth2) ? "selected" : "" %> >17 <option value="18" <%= "18".equals(txtDayOfMonth2) ? "selected" : "" %> >18 <option value="19" <%= "19".equals(txtDayOfMonth2) ? "selected" : "" %> >19 <option value="20" <%= "20".equals(txtDayOfMonth2) ? "selected" : "" %> >20 <option value="21" <%= "21".equals(txtDayOfMonth2) ? "selected" : "" %> >21 <option value="22" <%= "22".equals(txtDayOfMonth2) ? "selected" : "" %> >22 <option value="23" <%= "23".equals(txtDayOfMonth2) ? "selected" : "" %> >23 <option value="24" <%= "24".equals(txtDayOfMonth2) ? "selected" : "" %> >24 <option value="25" <%= "25".equals(txtDayOfMonth2) ? "selected" : "" %> >25 <option value="26" <%= "26".equals(txtDayOfMonth2) ? "selected" : "" %> >26 <option value="27" <%= "27".equals(txtDayOfMonth2) ? "selected" : "" %> >27 <option value="28" <%= "28".equals(txtDayOfMonth2) ? "selected" : "" %> >28 <option value="29" <%= "29".equals(txtDayOfMonth2) ? "selected" : "" %> >29 <option value="30" <%= "30".equals(txtDayOfMonth2) ? "selected" : "" %> >30 <option value="31" <%= "31".equals(txtDayOfMonth2) ? "selected" : "" %> >31 </select> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="L200B" alt="Mois"/> </td> <td class="dataValue"> <% String txtMonthOfYear = ""; try { int intMonthOfYear = FlTask.getTskMonthOfYear(); txtMonthOfYear = Integer.toString(intMonthOfYear); } catch (FieldNotInitializedException fnie) { } %> <select name="TskMonthOfYear"> <option value="1" <%= "1".equals(txtMonthOfYear) ? "selected" : "" %> >01 <option value="2" <%= "2".equals(txtMonthOfYear) ? "selected" : "" %> >02 <option value="3" <%= "3".equals(txtMonthOfYear) ? "selected" : "" %> >03 <option value="4" <%= "4".equals(txtMonthOfYear) ? "selected" : "" %> >04 <option value="5" <%= "5".equals(txtMonthOfYear) ? "selected" : "" %> >05 <option value="6" <%= "6".equals(txtMonthOfYear) ? "selected" : "" %> >06 <option value="7" <%= "7".equals(txtMonthOfYear) ? "selected" : "" %> >07 <option value="8" <%= "8".equals(txtMonthOfYear) ? "selected" : "" %> >08 <option value="9" <%= "9".equals(txtMonthOfYear) ? "selected" : "" %> >09 <option value="10" <%= "10".equals(txtMonthOfYear) ? "selected" : "" %> >10 <option value="11" <%= "11".equals(txtMonthOfYear) ? "selected" : "" %> >11 <option value="12" <%= "12".equals(txtMonthOfYear) ? "selected" : "" %> >12 </select> </td> </tr> </table> </td> <% } else if("YEARLY_B".equals(valCode)) { %> <td class="column2"> <table class="data_column" cellpadding="0" border="0"> <tr class="fieldline"> <td class="dataLabel"> <fl:getMessage code="F601A" alt="Heure de début"/> </td> <td class="dataValue"> <input name="TskStartTime" class="chpsTextObligatoire" type="text" value="<fl:getProperty name="FlTask" property="TskStartTime" alt="" edit="true" format="time"/>" size="10" onblur="ctrlHourField(this, '<fl:getMessage code="M302E" alt="Format incorrect. Veuillez corriger" js="true"/>');"> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601B" alt="Date d\'activation"/> </td> <td class="dataValue"> <fl:input property="TskStartDate" mandatoryMsgCode="M600F"/> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F601C" alt="Date de désactivation"/> </td> <td class="dataValue"> <fl:input property="TskEndDate"/> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F6022" alt="Mois de l\'année"/> </td> <td class="dataValue"> <% String txtMonthOfYear2 = ""; try { int intMonthOfYear2 = FlTask.getTskMonthOfYear(); txtMonthOfYear2 = Integer.toString(intMonthOfYear2); } catch (FieldNotInitializedException fnie) { } %> <select name="TskMonthOfYear"> <option value="1" <%= "1".equals(txtMonthOfYear2) ? "selected" : "" %> >01 <option value="2" <%= "2".equals(txtMonthOfYear2) ? "selected" : "" %> >02 <option value="3" <%= "3".equals(txtMonthOfYear2) ? "selected" : "" %> >03 <option value="4" <%= "4".equals(txtMonthOfYear2) ? "selected" : "" %> >04 <option value="5" <%= "5".equals(txtMonthOfYear2) ? "selected" : "" %> >05 <option value="6" <%= "6".equals(txtMonthOfYear2) ? "selected" : "" %> >06 <option value="7" <%= "7".equals(txtMonthOfYear2) ? "selected" : "" %> >07 <option value="8" <%= "8".equals(txtMonthOfYear2) ? "selected" : "" %> >08 <option value="9" <%= "9".equals(txtMonthOfYear2) ? "selected" : "" %> >09 <option value="10" <%= "10".equals(txtMonthOfYear2) ? "selected" : "" %> >10 <option value="11" <%= "11".equals(txtMonthOfYear2) ? "selected" : "" %> >11 <option value="12" <%= "12".equals(txtMonthOfYear2) ? "selected" : "" %> >12 </select> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F6020" alt="Position du jour dans le mois"/> </td> <td class="dataValue"> <select name="TskInstance"> <fl:getProperty name="FlTask" type="select" property="TskInstance" alt="" edit="true"/> </select> </td> </tr> <tr> <td class="dataLabel"> <fl:getMessage code="F6021" alt="Jour"/> </td> <td class="dataValue"> <fl:getProperty name="FlTask" type="radio" separator="</br>" property="TskDaysOfWeek" alt="" edit="true"/> </td> </tr> </table> </td> <% } %> </table> </fl:sTab> </fl:smallTabs> </fl:bigTabs> </fl:form> <% /****************************************************************************** * * * m.ichahane@e-deal.ma : 2006/08/17 14:57:30 : Mustapha * * *****************************************************************************/ %>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de