Edit C:\galaxie\Back\galaxie\admin\dictionary\edit_field.jsp
<% /****************************************************************************** * Copyright (c) 2000-2006 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 contentType="text/html;charset=UTF-8"%><%@ 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="java.util.Date" %> <%@ page import="java.util.Vector" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.TablesBean" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.FieldBean" %> <%@ page import="com.edeal.frontline.ObjectsBean" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.FieldBean" id="Field" scope="request"/> <% 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 = Field.getID(); } catch (FieldNotInitializedException fnie) { } String objID = flRequest.getRequestParameterOrAttribute("objID"); boolean isCreate = id == null; String objRadical = null; try { objID = Field.getFldObjID(); ObjectsBean obj = dico.getTable("id", objID); objRadical = obj.getObjRadical(); } catch (FieldNotInitializedException fnie) { } %> <html> <head> <title></title> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/master_css.jsp"> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/master_js.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ajax/sarissa.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ajax/ajax.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/ac/fobAC_js.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/presentField.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/checkFields.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/utils.js"></script> <script type="text/javascript" language="javascript"> var type = "0"; function doSubmit() { var f = window.document.forms[0]; if (!f.FldSql.value || f.FldSql.value == '<%= Utils.formatToJavascript(objRadical) %>') { alert('<fl:getMessage code="M603C" alt="Veuillez saisir le nom SQL du champ." js="true"/>'); f.FldSql.focus(); return false; } else if (f.FldSql.value.substring(0, 3) != '<%= Utils.formatToJavascript(objRadical) %>' ) { alert('<fl:getMessage code="M603D" alt="Le nom SQL du champ doit commencer par le radical de la table." js="true"/> : <%= Utils.formatToJavascript(objRadical) %>'); f.FldSql.focus(); return false; } if (f.FldTabID.value && f.FldFobID.value) { alert('<fl:getMessage code="M603F" alt="Un champ ne peut pas être contraint par un objet et par un table de référence." js="true"/>'); return false; } if (f.FldFobID.value && f.FldDelPolicy.selectedIndex == 0) { alert('<fl:getMessage code="M607F" alt="Veuillez choisir une politique de suppression pour le lien objet." js="true"/>'); f.FldDelPolicy.focus(); return false; } if (f.FldTabID.value != '' && f.FldControl.value == '') { alert('<fl:getMessage code="M603E" alt="Vous devez sélectionner une colonne de contrôle si le champ est contraint par table de référence." js="true"/>'); f.FldControl.focus(); return false; } return true; } function doSelectLabel(field) { window.open('<fl:link url="/select_label.fl?1=1"/>&field=' + field, 'select_label', 'width=1000,height=500,menubar=no,status=no,resizable=yes'); } function doRemoveLabel(field){ var f = window.document.forms[0]; f.lblFldDisplayLabel.value=''; f.FldDisplayLabel.value = ''; } function create() { var f = document.forms[0]; f.$$returnedHtmlHead.value = '<scr' + 'ipt language="javascript" type="text/javascript">window.opener.refreshList();self.close();</scr'+ 'ipt>'; submit(); } function createAndContinue() { var head = document.getElementById("$$returnedHtmlHead"); var parent = head.parentNode; parent.removeChild(head); var body = document.getElementById("$$returnedHtmlBody"); parent = body.parentNode; parent.removeChild(body); document.forms[0].reset.value = "1"; submit(); } function closeWindow() { window.opener.doSubmit(); window.top.close(); } </script> </head> <body> <div id="object_css" style="top:0px; left: 0px; height:100%;"> <fl:form action="/save_field.fl" bean="Field"> <input id="$$returnedHtmlHead" name="$$returnedHtmlHead" type="hidden" value=""/> <input id="$$returnedHtmlBody" name="$$returnedHtmlBody" type="hidden" value="Closing..."/> <input type="hidden" name="reset" id="reset" value=""/> <input type="hidden" name="FldObjID" id="FldObjID" value="<fl:getProperty name="Field" property="FldObjID" alt=""/>"/> <fl:bigTabs showFooter="false" objectTitle="<%= isCreate ? Utils.getMessage(session, \"L643F\", \"Création d'un champ\") : Utils.getMessage(session, \"L6440\", \"Edition d\'un champ\") %>" ou="<%= \"/edit_field.fl\" + (id != null ? \"?id=\" + id : \"\") %>"> <table class="container" cellpadding="0"> <tr> <td class="column3"> <table class="data_column" cellpadding="0"> <fl:fieldEdit property="FldSql" mandatoryMsgCode="M603C" unicityMsgCode="M60DF"/> <fl:fieldEdit property="FldDisplay"/> <% String label = null; try { label = Field.getFldDisplayLabel(); } catch (FieldNotInitializedException fnie) { } %> <tr class="fieldline"> <td class="dataLabel"><label for="selectFldDisplayLabel"><fl:getMessage code="L6015" alt="Nom affiché"/></label></td> <td class="dataValue"> <div class="input fieldTable"> <table class="fieldTable" cellpadding="0"> <td class="principalText bigFieldPart"> <div class="fobLeftDiv"> <input name="lblFldDisplayLabel" id="lblFldDisplayLabel" type="text" value="<%= label == null ? "" : Utils.getMessage(session, label, Utils.getMessage(session, "L60E0", "<non spécifié>")) %>" class="input fob" onFocus="this.blur();"> <input name="FldDisplayLabel" id="FldDisplayLabel" type="hidden" value="<%= Utils.formatToWeb(label, true) %>"> </div> </td> <td class="smallFieldPart"> <a id="selectFldDisplayLabel" href="javascript:doSelectLabel('FldDisplayLabel')"><img src="<fl:webapp/>/icons/ico/rechercher.gif" alt="" border="0"></a> <a href="javascript:doRemoveLabel('FldDisplayLabel')"><img src="<fl:webapp/>/icons/ico/supprimer.gif" alt="" border="0"></a> </td> </table> </div> </td> </tr> <fl:fieldEdit property="FldNum"/> <fl:fieldEdit property="FldStd"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column3"> <table class="data_column" cellpadding="0"> <fl:fieldEdit property="FldFltID" alt="" mandatoryMsgCode="M60DE"/> <fl:fieldEdit property="FldSize"/> <fl:fieldEdit property="FldTabID" column3="true"/> <tr class="fieldline"> <td class="dataLabel"><fl:label code="F6012" field="FldControl"/></td> <td class="dataValue"> <% String control = null; try { control = Field.getFldControl(); } catch (FieldNotInitializedException fnie) { } %> <div class="input select"> <select id="FldControl" name="FldControl" class="input select"> <option value=""></option> <option value="Te1" <%= "Te1".equals(control) ? "selected" : "" %> >Te1</option> <option value="Te2" <%= "Te2".equals(control) ? "selected" : "" %> >Te2</option> <option value="Te3" <%= "Te3".equals(control) ? "selected" : "" %> >Te3</option> <option value="Nu1" <%= "Nu1".equals(control) ? "selected" : "" %> >Nu1</option> <option value="Nu2" <%= "Nu2".equals(control) ? "selected" : "" %> >Nu2</option> <option value="Nu3" <%= "Nu3".equals(control) ? "selected" : "" %> >Nu3</option> <option value="Da1" <%= "Da1".equals(control) ? "selected" : "" %> >Da1</option> <option value="Da2" <%= "Da2".equals(control) ? "selected" : "" %> >Da2</option> <option value="Da3" <%= "Da3".equals(control) ? "selected" : "" %> >Da3</option> </select> </div> </td> </tr> <fl:fieldEdit property="FldFobID" column3="true"/> <tr class="fieldline"> <td class="dataLabel"><label for="FldDelPolicy"><fl:getMessage code="F608E" alt="Politique de suppression"/></label></td> <td class="dataValue"> <div class="input"> <% int delPolicy = Integer.MIN_VALUE; try { delPolicy = Field.getFldDelPolicy(); } catch (FieldNotInitializedException e) { } %> <select id="FldDelPolicy" name="FldDelPolicy" class="input select"> <option value=""></option> <option value="<%= FieldBean.DEL_POLICY_NO_FK %>" <%= delPolicy == FieldBean.DEL_POLICY_NO_FK ? "selected" : "" %>><fl:getMessage code="L6235" alt="NO FK"/></option> <option value="<%= FieldBean.DEL_POLICY_NO_ACTION %>" <%= delPolicy == FieldBean.DEL_POLICY_NO_ACTION ? "selected" : "" %>><fl:getMessage code="L6232" alt="NO ACTION"/></option> <option value="<%= FieldBean.DEL_POLICY_CASCADE %>" <%= delPolicy == FieldBean.DEL_POLICY_CASCADE ? "selected" : "" %>><fl:getMessage code="L6234" alt="CASCADE"/></option> <option value="<%= FieldBean.DEL_POLICY_SET_NULL %>" <%= delPolicy == FieldBean.DEL_POLICY_SET_NULL ? "selected" : "" %>><fl:getMessage code="L6233" alt="SET NULL"/></option> </select> </div> </td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column3"> <table class="data_column" cellpadding="0"> <fl:fieldEdit property="FldMultival"/> <fl:fieldEdit property="FldCriteria"/> <fl:fieldEdit property="FldOwner"/> <fl:fieldEdit property="FldModificationLogged"/> <fl:fieldEdit property="FldDisplayPolicy" alt=""/> <fl:fieldEdit property="FldIndexPolicy" alt=""/> </table> </td> </tr> <tr><td colspan="5"></td></tr> <tr> <td colspan="5" class="dataValue"> <% if (isCreate) { %> <input type="checkbox" id="FldAlterTable" name="FldAlterTable" value="true" checked/><label for="$$alterTable" class="mandatory_alert"><fl:getMessage code="L6013" alt="Alter la table"/></label> <% } else { %> <span><fl:getMessage code="L602D" alt="Une mise à jour de la base de données sera necessaire"/></span> <input type="hidden" id="FldAlterTable" name="FldAlterTable" value="false"/> <% } %> </td> </tr> </table> </fl:bigTabs> </fl:form> <div style="width: 100%; text-align: center;"> <a href="javascript:create()" title="<fl:getMessage code="A2001" alt="Valider"/>"><img src="<fl:link url="/icons/ico/valid_green_long.gif"/>" ></a> <% if (isCreate) { %> <a href="javascript:createAndContinue()" title="<fl:getMessage code="A3069" alt="Valider et nouveau"/>"><img src="<fl:link url="/icons/ico/save_all_long.gif"/>" ></a> <% } %> <a href="javascript:closeWindow();" title="<fl:getMessage code="A2002" alt="Annuler"/>"><img src="<fl:link url="/icons/ico/fermer_red_long.gif"/>"></a> </div> </div> <fl:title name="Field"/> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de