Edit C:\galaxie\Back\galaxie\automation\processtask\edit.jsp
<%@page import="java.util.Vector"%> <% /****************************************************************************** * Copyright (c) 2000-2013 E-DEAL * * E-DEAL S.A. * 41, rue Périer * 92120 Montrouge * France * * T: +33 (0)1 73 03 29 80 * 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.DataDictionary" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="com.edeal.frontline.ProcessTaskBean" %> <%@ page import="com.edeal.frontline.ProcessBean" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.helper.BasicHelper" %> <%@ page import="com.edeal.frontline.helper.custom.ProcessTaskHelper" %> <%@ page import="java.util.Date" %> <%@ page import="com.edeal.frontline.process.business.api.ProcessActorRule" %> <%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.ProcessTaskBean" id="ProcessTask" scope="request"/> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <% 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 id = null; try { id = ProcessTask.getID(); } catch (FieldNotInitializedException fnie) { } String ptaProcessID = null; ProcessBean process = null; try { ptaProcessID = ProcessTask.getPtaProcessID(); process = new ProcessBean(ptaProcessID, session); pageContext.setAttribute("Process", process); } catch (FieldNotInitializedException fnie) { } String prsObject = null; try { String prsObjectID = process.getPrsObject(); prsObject = dico.getRefCode("PrsObject", prsObjectID); } catch (Exception e) { prsObject = "ENTERPRISE"; } String contextRule = null; String directRule = null; try { contextRule = dico.getRefIdByCode("PtaActorRule", ProcessActorRule.CONTEXT.name()); directRule = dico.getRefIdByCode("PtaActorRule", ProcessActorRule.DIRECT.name()); } catch (Exception e) { } String currentRule = null; try { currentRule = ProcessTask.getPtaActorRule(); } catch (FieldNotInitializedException fnie) { } ProcessTaskHelper processTaskHlper = null; try { processTaskHlper = (ProcessTaskHelper)BasicHelper.factory(ProcessTask); } catch (Exception e) { } %> <!--[if !IE]><!--> <style> .fieldset { -moz-border-radius: 5px; -webkit-border-radius: 5px; border: 2px solid rgb(160, 199, 209); border-radius: 5px; } </style> <!--<![endif]--> <style> .fieldset { } </style> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ajax/ajax.js"></script> <script type="text/javascript" language="javascript"> function doSubmit() { var f = document.forms[0]; ptaActorRule = $('input[type=radio][name=PtaActorRule]:checked').val(); if (ptaActorRule == '<%= contextRule %>') { if (f.PtaActorRuleField.value == "") { alert('<fl:getMessage code="L82ED" alt="Veuillez choisir un acteur de contexte" js="true"/>'); return; } } else if (ptaActorRule == '<%= directRule %>') { if (f.PtaActorRuleActID.value == "") { alert('<fl:getMessage code="L82EC" alt="Veuillez choisir un acteur fixe" js="true"/>'); return; } } if (!doCompareTime()) { return; } return true; } function loadTreeviewDiv() { var ajaxURL = "<fl:webapp/>/get_treeview_div_pta.fl?object=<%= prsObject %>&field=" + encodeURIComponent($('#PtaActorRuleField').val()); doAjax(ajaxURL, treeviewCallBack); } function treeviewCallBack(index) { if (eDealXmlhttpArr[index].readyState == 4) { $("#treeview_div").html(eDealXmlhttpArr[index].responseText); } hideWaiting(); } function selectField(fldSql, fldLabel, fldID) { $("#PtaActorRuleField").val(fldSql); } function doOnLoad() { loadTreeviewDiv(); doApplyActorRules('<%= currentRule %>'); } function emptyFobField(fobField) { $("#" + fobField).val(""); $("#lbl" + fobField).val(""); } function hideActorFobField() { $("#blocPtaActorRuleActID").hide(); } function showActorFobField() { $("#blocPtaActorRuleActID").show(); } function hideTreeviewDiv() { $("#blocTreeView").hide(); $("[name='PtaActorRuleField']").val(""); } function showTreeviewDiv() { $("#blocTreeView").show(); } function doApplyActorRules(type) { if (type == '<%= contextRule %>') { hideActorFobField(); emptyFobField("PtaActorRuleActID"); showTreeviewDiv(); } else if (type == '<%= directRule %>') { showActorFobField(); hideTreeviewDiv(); } else { hideActorFobField(); emptyFobField("PtaActorRuleActID"); hideTreeviewDiv(); } } function doRefresh() { var f = document.forms[0]; presentFieldsValue(); f.action = "<fl:link url="<%= \"/refresh_processtask.fl\" %>"/>"; f.submit(); } function doCompareTime() { f = document.forms[0]; var hourBeg = f.PtaIntTimeBeg.value; var hourEnd = f.PtaIntTimeEnd.value; /*if (dateBeg != "" && dateEnd == "") { alert('<fl:getMessage code="M9012" alt="Veuillez spécifier la date de fin" js="true"/>'); return; }*/ if (hourEnd != '' && hourBeg == '') { alert('<fl:getMessage code="L82F9" alt="Veuillez spécifier l\\\'heure de début" js="true"/>'); return; } if (hourBeg != '' && hourEnd != '') { if (compareDate('', hourBeg, '', hourEnd) > 0) { alert('<fl:getMessage code="L82FA" alt="L\\\'heure de début doit être inférieure à l\\\'heure de fin" js="true"/>'); f.PtaIntTimeBeg.focus(); return; } } return true; } </script> <fl:form action="/save_processtask_redirect_process.fl" bean="ProcessTask"> <input name="PtaProcessID" type="hidden" value="<fl:getProperty name="ProcessTask" property="PtaProcessID" alt="" />"> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L6196\", false, true, \"Modèle d\'action\") + \" +\" %>" ou="<%= \"/edit_processtask.fl\" + (id != null ? \"?id=\" + id : \"\") %>" > <table class="container" cellpadding="0"> <tr> <td colspan="5" width="100%"> <table> <tr> <td style="width: 100%" class="titreFiche"> <fl:getProperty name="Process" property="PrsName" alt=" "/><br> </td> </tr> </table> </td> </tr> <tr class="ligne_separation"><td></td></tr> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldLine"> <fl:fieldRead property="PtaProcessID" bean="true" href="true" disp="/read_process.fl"/> </tr> </table> </td> </tr> </table> <table> <tr class="ligne_separation"><td></td></tr> <tr class="fieldline"> <td class="column2"> <fieldset class="fieldset"> <legend class="legend"><fl:getMessage code="L7091" alt="Créer une interaction"/></legend><br> <table class="container" cellpadding="0"> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldLine"> <fl:fieldEdit property="PtaIntSubject" mandatoryMsgCode="F60BF"/> <fl:fieldEdit property="PtaIntAtvID" mandatoryMsgCode="M60C4" /> <fl:fieldEdit property="PtaIntStiID"/> <fl:fieldEdit property="PtaPeriod" mandatoryMsgCode="M9031" postText="<%= Utils.getMessage(session, \"L6048\", true, \"j\") %>" /> <fl:fieldEdit property="PtaIntTimeBeg" htmlClass="input"/> <fl:fieldEdit property="PtaIntTimeEnd" htmlClass="input" /> <fl:fieldEdit property="PtaIntDetails"/> </tr> <tr class="ligne_separation"><td></td></tr> <tr class="fieldLine"><td colspan="2"><fl:getMessage code="L82C9" alt="Modèles de document"/></td></tr> <tr class="fieldLine"> <fl:fieldEdit property="PtaRefDocID" query="[[DocObjID:ObjSql=\'Interaction\']]"/> <fl:fieldEdit property="PtaIntRefMsgID" query="[[MsgObjID:ObjSql=\'Interaction\',MsgObjID:ObjSql=\'Person\'],[MsgType:RefVal=\'MODELE\']]"/> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <tr class="fieldLine"> <fl:fieldEdit property="PtaActorRule" type="buttons" onchange="doApplyActorRules(this.value)" mandatoryMsgCode="L82EA"/> </tr> <tr class="ligne_separation"><td></td></tr> </table> <table class="data_column" cellpadding="0" id="blocTreeView"> <tr class="fieldLine"> <td class="dataLabel"></td> <td class="dataValue"><div id="treeview_div"></div></td> </tr> <tr class="fieldLine"> <td class="dataLabel"></td> <td class="dataValue"><fl:input property="PtaActorRuleField"/></div></td> </tr> </table> <table class="data_column" cellpadding="0" id="blocPtaActorRuleActID"> <tr class="fieldLine"> <td class="dataLabel"></td> <td class="dataValue"><fl:input property="PtaActorRuleActID"/></div></td> </tr> </table> <% Vector<String> extraFields = dico.getTableFields("SQL", "ProcessTask", false, true); if (extraFields!=null) { %> <table class="data_column"> <% for (String fieldName: extraFields) { %> <fl:fieldEdit property="<%= fieldName %>"></fl:fieldEdit> <% } %> </table> <% } %> </td> </tr> <tr class="ligne_separation"><td></td></tr> </table> </fieldset> </td> </tr> </table> </fl:bigTabs> </fl:form>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de