Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\admin\trashreport\edit_object.jsp
<%@page import="com.edeal.frontline.navigation.EdealBigTabsNavigation.BigTabsParams"%> <% /****************************************************************************** * 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 language="java" session="true"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.*" %> <%@ page import="com.edeal.frontline.custom.*" %> <%@ page import="java.util.*" %> <%@ page import="java.io.*" %> <%@ page import="com.edeal.frontline.dataimport.*" %> <%@ page import="java.io.InputStream" %> <%@ page import="java.io.ByteArrayOutputStream" %> <%@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(); Vector codeError = (Vector) flRequest.getAttribute("codeError"); Vector fldError = (Vector) flRequest.getAttribute("fldError"); Vector fld = (Vector) flRequest.getAttribute("fld"); Vector fldValue = (Vector) flRequest.getAttribute("fldValue"); FrontlineLoadable objBean = (FrontlineLoadable) flRequest.getAttribute("objCurrentBean"); String objSQL = (String) flRequest.getAttribute("objSQL"); if (objBean == null) { try { objBean = (FrontlineLoadable)Class.forName("com.edeal.frontline." + objSQL + "Bean").newInstance(); } catch (ClassNotFoundException ex) { String customPackage = context.getContextParameter("CustomPackage"); if(!customPackage.endsWith(".")) customPackage += "."; objBean = (FrontlineLoadable)Class.forName(customPackage + objSQL + "Bean").newInstance(); } objBean.setContext(context); } String updateType = (String) flRequest.getAttribute("updateType"); BasicBean obj = (BasicBean) objBean; pageContext.setAttribute(objSQL+"Bean",obj); String objRadical = null; String objDisp = null; String objDisplay = null; ObjectsBean objB = null; try { objB = dico.getTable("sql",objSQL); objRadical = objB.getObjRadical(); }catch (FrontlineException e){} try { objDisp = objB.getObjDisplayLabel(); }catch (FieldNotInitializedException e){} try { objDisplay = objB.getObjDisplay(); }catch (FieldNotInitializedException e){} String id = null; try { id = obj.getID(); }catch (FieldNotInitializedException e){} String trlID = (String) flRequest.getAttribute("trlID"); String saveUrl = "/save_object_trash.fl?type=" + objSQL + (id != null ? "&id="+ id : "") + "&trlID=" + trlID; //+ "&successPage=/delete_trash.fl?id="+trlID; String deleteUrl = "/delete_trash.fl?trlID=" + trlID; request.setAttribute(objSQL,obj); String listCode = (String) flRequest.getParameter(BigTabsParams.CodeLC); String cu = ""; if (listCode.equals("TRSHREPLI")) { String sc = (String) flRequest.getParameter(BigTabsParams.SearchCriteria); cu = "process_trash_list_criteria.fl?lc=TRSHREPLI&init" + sc.split("&")[0]; } %> <style type="text/css"> .dataValueX { width: 30%; overflow: hidden; margin: 0px; padding: 0px; padding-left: 10px; font-size: small; font-size: expression("x-small"); color: rgb(0, 0, 0); font-family: Arial, Verdana, sans-serif; vertical-align: top; padding: 4px; } .borderLineOne { border-right: 1px dashed #9EC6D0; border-bottom: 1px dashed #9EC6D0; } .borderLineTwo { border-right: 1px dashed #9EC6D0; } </style> <script type="text/javascript"> function doSubmit() { var f = document.forms[0]; presentFieldsValue(); f.submit(); } function doDelete() { if (window.confirm('<%= Utils.getMessage(session, "M2004", true, "Etes-vous sûr de vouloir supprimer ?") %>') == true) { window.location = '<%= flRequest.computeURL(deleteUrl,true,false,true) %>'; } } </script> <fl:form action="<%= flRequest.computeURL(saveUrl,true,false,false) %>" bean="<%= objSQL %>"> <fl:bigTabs cu="<%=cu%>" objectTitle="<%= Utils.getMessage(session,objDisp,objDisplay) %>" ou="<%= \"/process_trash.fl\" + (id != null ? \"?id=\" + id : \"\") %>"> <table class="container" cellpadding="0" cellspacing="0"> <tr> <td class="headerDataGrid"> </td> <td class="headerDataGrid"> <fl:getMessage code="L6530" alt="Valeur traitée"/> </td> <td class="headerDataGrid"> <fl:getMessage code="L6531" alt="Valeur initiale"/> </td> <td class="headerDataGrid"> <fl:getMessage code="L6508" alt="Libellé erreur"/> </td> </tr> <% if (updateType != null && !updateType.equalsIgnoreCase("no")) { %> <tr class="tabSimpleFdBleu"> <td> <fl:getMessage code="F6160" alt="id"/> </td> <td> <input id="id" name="id" type="hidden" value="<%= (id!= null)? id : "" %>"> <input id="lblid" name="lblid" type="text" value="<%= (id!= null)? objB.toString(session,id) : "" %>" class="input fob"> <a href="javascript:var win = window.open('<fl:webapp/>/select.fl?type=<%= objSQL%>&field=id&formIndex=0', 'Select<%= objSQL%>', 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=600,height=400')"><img src="<fl:webapp/>/icons/ico/rechercher.gif" class="icon" alt="Sélectionner" title="Sélectionner"></a> <a href="javascript:var f = window.document.forms[0]; f.id.value = f.lblid.value = '';void('')"><img src="<fl:webapp/>/icons/ico/supprimer.gif" class="icon" alt="Vider le champ" title="Vider le champ"></a> </td> <td> <%= (id!= null)? objB.toString(session,id) : "" %> </td> <td> </td> </tr> <% } %> <% for (int i = 0; i < fld.size(); i ++) { String fldName = (String) fld.elementAt(i); if (fldName != null && !fldName.equals(objRadical+"ID")) { FieldBean fldbean = dico.getFieldByName((String) fld.elementAt(i)); boolean isREF = false; try { String refType = fldbean.getFldTabID(); isREF = refType != null; }catch (FieldNotInitializedException e){} String codeLabel = null; try { codeLabel = fldbean.getFldDisplayLabel(); }catch (FieldNotInitializedException e){} String altLabel = null; try { altLabel = fldbean.getFldDisplay(); }catch (FieldNotInitializedException e){} GetInputTag inputTag = new GetInputTag(); inputTag.setName(objSQL + "Bean"); inputTag.setPageContext(pageContext); inputTag.setProperty((String) fld.elementAt(i)); inputTag.setNodiv(true); //si ref je dois donner la possibilité d'une ligne vide if (isREF) { inputTag.setAlt(" "); } String backColor = "#FFFFFF"; if (fldError.contains(fld.elementAt(i))) { //je mets ce champ à null avant de backColor = "#FDCBCC"; //pour les champs ou il y a des erreurs de mets à null boolean isStd = false; try { isStd = fldbean.isFldStd(); }catch (FieldNotInitializedException e){} boolean isMva = false; try { isMva = fldbean.isFldMultival(); }catch (FieldNotInitializedException e){} String strType = BeanOutSource.getJavaType(dico.getRefCode("FldFltID", fldbean.getFldFltID())); Class clType = null; Object cValue = null; // if (isMva) clType="java.lang.Vector"; if(isMva) { clType = Class.forName("java.util.Vector"); cValue = new Vector(); } else if("java.lang.Boolean".equalsIgnoreCase(strType)) { clType = boolean.class; cValue = new Boolean(false); } else if("java.lang.Float".equalsIgnoreCase(strType)) { clType = float.class; cValue = new Float(0); } else if("java.lang.Double".equalsIgnoreCase(strType)) { clType = double.class; cValue = new Double(0); } else if("java.lang.Integer".equalsIgnoreCase(strType)) { clType = int.class; cValue = new Integer(0); } else if("java.lang.Long".equalsIgnoreCase(strType)) { clType = long.class; cValue = new Integer(0); } else if("java.lang.Short".equalsIgnoreCase(strType)) { clType = short.class; cValue = new Integer(0); } else { clType = Class.forName(strType); } try { if(isStd) { Class[] type = {clType}; Object[] params = {cValue}; objBean.getClass().getMethod("set" + (String) fld.elementAt(i),new Class[]{clType}).invoke(objBean, params); } else { objBean.getClass().getMethod("setCustomProperty", new Class[]{Class.forName("java.lang.String"), Class.forName("java.lang.Object")}).invoke(objBean, new Object[]{(String) fld.elementAt(i), null}); } } catch (Exception ex) { logger.error("STACK TRACE",ex); } } %> <tr class="<%= i%2 == 0 ? "tabSimpleFdBlanc" : "tabSimpleFdBleu" %>"> <td> <fl:getMessage code="<%= codeLabel%>" alt="<%= altLabel %>"/> </td> <td> <% int val = inputTag.doEndTag(); %> </td> <td> <%= fldValue.elementAt(i) %> </td> <td> <% if (fldError.contains(fld.elementAt(i))) { int j = fldError.indexOf(fld.elementAt(i)); String codeErrVal = ""; if (j > -1) codeErrVal = (String) codeError.elementAt(j); String msgMessage= ""; try { String errID = dico.getRefIdByCode("TrlErrorCodeID",codeErrVal); msgMessage = (String) dico.getRefDisp("TrlErrorCodeID",errID); }catch (FrontlineException e){} %> <%= codeErrVal + "-" + msgMessage %> <% } %> </td> </tr> <% } } %> </table> </fl:bigTabs> </fl:form>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de