Edit C:\Windows\install\galaxie_p01_01-10\marketing\formquestion\edit.jsp
<% /****************************************************************************** * Copyright (c) 2000-2005 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.*,java.text.*"%> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <jsp:useBean class="com.edeal.frontline.FormQuestionBean" id="FormQuestion" 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(); FlLocale locale = FlLocale.getInstance(session); String id=null; try { id = FormQuestion.getID(); } catch (FieldNotInitializedException fnie) { } //Cette variable est utilisée pour le premier chargement de la page en création //Au 1er chargement nous trouvons: type = text libre et le champs taille zone String typeRefresh=null; if (id==null){ typeRefresh = flRequest.getRequestParameterOrAttribute("typeRefresh"); } String type=null; String idType=null; try{ idType = FormQuestion.getFqtType(); }catch(FieldNotInitializedException fnie){} if (idType != null && idType.length()>0){ if (idType.equals(dico.getRefIdByCode("FqtType", "REF"))){ type = "REF"; } else if (idType.equals(dico.getRefIdByCode("FqtType", "LST"))){ type = "LST"; } //Text Libre else if (idType.equals(dico.getRefIdByCode("FqtType", "FRE"))){ type = "FRE"; } } int seqNum = 0; try { seqNum = FormQuestion.getFqtSeqNum(); } catch (FieldNotInitializedException fnie) { seqNum = CounterFactory.getCounter(context , "FormQuestionNum"); } DecimalFormat df = FlLocale.getInstance(session).getDecimalFormat("0000"); //Type d'aafichage --> combo, checkbox String typeDisp=null; String idTypeDisp=null; try{ idTypeDisp = FormQuestion.getFqtDispType(); //dico.getRefIdByCode("FqtDispType", ) }catch(FieldNotInitializedException fnie){} if (idTypeDisp!=null && idTypeDisp.length()>0){ if (idTypeDisp.equals(dico.getRefIdByCode("FqtDispType", "RADIO"))){ typeDisp = "RADIO"; }else if (idTypeDisp.equals(dico.getRefIdByCode("FqtDispType", "CHECK"))){ typeDisp = "CHECK"; }else if (idTypeDisp.equals(dico.getRefIdByCode("FqtDispType", "COMBO"))){ typeDisp = "COMBO"; } } //Text Associé int associatedText = 0; try { associatedText = FormQuestion.getFqtAssociatedText(); } catch (FieldNotInitializedException fnie) {} int hasOther = 0; try { hasOther = FormQuestion.getFqtHasOther(); } catch (FieldNotInitializedException fnie) {} %> <script type="text/javascript" language="javascript"> function doSubmit(){ return true; } function doRefresh(){ var f = document.forms[0]; var url = '<fl:link url="/refresh_formquestion.fl" />'; doExitConf = false; f.typeRefresh.value = 'Refresh'; f.action = url; f.submit(); } function doFqtRefTableChange(){ doRefresh(); } </script> <fl:form action="/save_formquestion.fl" bean="FormQuestion"> <fl:bigTabs objectTitle="<%=Utils.getMessage(session, \"L63ED\", false, true, \"Question\")%>" ou="<%=\"/edit_formquestion.fl\"+ (id!=null ? \"?id=\"+id : \"\")%>"> <div> <table class="container" cellpadding="0"> <input type="hidden" name="typeRefresh" /> <tr> <td colspan="5"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="labelTitreFiche"> <fl:label field="FqtLabel" labelClassName="titreFiche"/> </td> <td class="fieldTitreFiche"> <fl:input property="FqtLabel" mandatoryMsgCode="M2002"/> </td> </tr> </table> </td> </tr> <tr><td colspan="5" class="ligne_separation"/></tr> <tr> <td class="column2"> <table class="container" cellpadding="0" > <fl:fieldEdit mandatoryMsgCode="L65B6" property="FqtType" onchange="doRefresh();" alt=" "/> <% if (("FRE".equals(type)||typeRefresh==null)&&!"LST".equals(type)&&!"REF".equals(type)){%> <fl:fieldEdit property="FqtInputSize"/> <%}else if ("REF".equals(type)){%> <fl:fieldEdit property="FqtRefTable" onchange="doRefresh();" /> <%}%> <fl:fieldEdit property="FqtHelpText" /> <% if ("REF".equals(type)||("LST".equals(type))){%> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F604F" alt="Texte associé"/></td> <td class="dataValue"> <select name="FqtAssociatedText" onChange="doRefresh();" class="input select"> <option value="0" <%= associatedText == 0 ? "selected" : "" %> ><fl:getMessage code="L2006" alt="Non"/> <option value="20" <%= associatedText == 0 ? "" : "selected" %> ><fl:getMessage code="L2005" alt="Oui"/> </select> </td> </tr> <%}%> </table> </td> <td class="separation" ><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td id="FqtSeqNum_label" class="dataLabel"> <div> <label for="FqtSeqNum" title="<fl:getMessage code="F202D" alt="Numéro"/>"><fl:getMessage code="F202D" alt="Numéro"/></label> </div> </td> <td id="FqtSeqNum_label" class="dataValue"> <div> <input id="FqtSeqNum" name="FqtSeqNum" type="hidden" value="<%= seqNum %>"><input id="lblFqtSeqNum" name="lblFqtSeqNum" type="text" value="<%= df.format((long)seqNum) %>" class="input number transRead" style="text-align: left" onfocus="this.blur();"> </div> </td> </tr> <fl:fieldEdit property="FqtCategory" alt=" "/> <fl:fieldEdit property="FqtRequired" alt=" "/> <fl:fieldEdit property="FqtToBeValidated" alt=" "/> <% if ("REF".equals(type)||("LST".equals(type))){%> <fl:fieldEdit property="FqtDispType" onchange="doRefresh();"/> <%}%> <%if ("RADIO".equals(typeDisp)||"CHECK".equals(typeDisp)){%> <fl:fieldEdit property="FqtColumnsNb"/> <%}%> </table> </td> </tr> <tr><td colspan="5" class="ligne_separation"/></tr> </table> <% if ("REF".equals(type)){ String fqtRefTable = null; try { fqtRefTable = FormQuestion.getFqtRefTable(); } catch (FieldNotInitializedException fnie) { } Vector listRef = null; String refName=null; try{ listRef = dico.getRefList(session, fqtRefTable, "Te1"); }catch(FrontlineException fe){} if (listRef!=null){ %> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="REFTabs"> <fl:sTab id="REF" title="<%= Utils.getMessage(session, \"L6019\", \"Valeurs de référence\") %>"> <table class="container" cellpadding="0"> <tr> <td class="column2"> <table class="container" cellpadding="0"> <% for(int i=0; i<listRef.size(); i++){ refName = (String) ((Vector) listRef.get(i)).get(1); %> <tr><td class="dataValue"><%= refName%></td></tr> <% } %> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> </td> </tr> </table> </fl:sTab> </fl:smallTabs> <% } } //End if type = REF %> <% if ("LST".equals(type)){ %> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="REFTabs"> <fl:sTab id="LST" title="<%= Utils.getMessage(session, \"L6137\", \"Liste Réponses Possibles\") %>"> <table class="container" cellpadding="0"> <tr> <% String fld ="FqtLstAnswer0"; for (int i=0; i<15; i++){ fld = "FqtLstAnswer"+i; %> <% if (i == 0 || i == 5 || i == 10) { %> <td class="column3"> <table class="container" cellpadding="0"> <% } %> <fl:fieldEdit property="<%= fld %>"/> <% if (i == 4 || i == 9 || i == 14) { %> </table> </td> <% if (i < 14) { %> <td class="separation"><div class="separation"></div></td><% } %> <% } %> <% } %> </tr> </table> </fl:sTab> </fl:smallTabs> <% } // End if type == LST %> </fl:bigTabs> </fl:form>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de