<% /****************************************************************************** * 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. * * CVS Info for $RCSfile$ * * $Revision$ * $Author$ $Date$ ******************************************************************************/ %> <%@page session="true" import="com.edeal.frontline.*,java.util.*,com.edeal.frontline.navigation.*"%> <%@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(); String cat1 = flRequest.getRequestParameterOrAttribute("cat1"); FAQHeaderBean obj = (FAQHeaderBean)request.getAttribute("FAQHeader"); try { obj.getFahCreID(); } catch (FieldNotInitializedException ex) { obj.setFahCreID((String)session.getAttribute("actorID")); } try{ obj.getFahActID(); }catch(FieldNotInitializedException fnie){ obj.setFahActID((String)session.getAttribute("actorID")); } String fahID = null; try { fahID = obj.getID(); } catch (FieldNotInitializedException ex) { fahID = flRequest.getRequestParameterOrAttribute("id"); } Hashtable FAQList = new Hashtable(); // FAQ déjà rattaché au header try { String[][] query = {{"FaqFahID = " + Utils.formatToSQL(context, obj.getID())}}; Vector vectFAQList = FAQBean.list(context, query); for(int i = 0; i < vectFAQList.size(); i++) { FAQBean faq = (FAQBean)vectFAQList.elementAt(i); try { FAQList.put(faq.getFaqLngID(), faq); } catch (FieldNotInitializedException ex) { } } } catch (FieldNotInitializedException ex) { } // A mettre dans un initialiseur SolicitationBean solBean = null; String solID = Utils.getRequestParameter(context, request, "SolID"); String cat =null; if(solID != null) { try { solBean = new SolicitationBean(solID, session); String catSol = solBean.getSolCatID(); if (catSol!= null) cat = (String) dico.getRefDisp(session, "SolCatID",catSol); if (cat != null) obj.setFahCatLev1(cat); } catch (Exception ex) { } } %> <fl:getMessage code="L2025" alt="E-DEAL"/> " ou="<%=\"edit_faqheader.fl\"+(fahID!=null ? \"?id=\"+fahID :\"\")%>">
"> "> ">
  <fl:getMessage code=" align="middle">
 
  <fl:getMessage code=" align="middle">
  <fl:getMessage code=" align="middle">
"/>
<% Vector vectChecked = null; try { vectChecked = obj.getFahKeyID(); } catch (FieldNotInitializedException ex) { vectChecked = new Vector(); } Vector vectRefList = dico.getRefList(session, "FahKeyID"); for(int i = 0; i < vectRefList.size(); i++) { Vector vectRef = (Vector)vectRefList.elementAt(i); String refID = (String)vectRef.elementAt(0); String refDisp = (String)vectRef.elementAt(1); if((i % 2) == 0) { %> <% } %> <% if((i % 2) == 1) { %> <% } } if(vectRefList.size() > 0 && (vectRefList.size() % 2) != 0) { %> <% } %>
><%= Utils.formatToWeb(refDisp, false) %>
 
<% Vector vectLngList = dico.getRefList(session, "FaqLngID"); FAQBean curFaq = null; String curFaqID = null; String curFaqQuestion = null; String curFaqResponse = null; for(int i = 0; i < vectLngList.size(); i++) { Vector vectLng = (Vector)vectLngList.elementAt(i); String lngID = (String)vectLng.elementAt(0); String lngDisp = (String)vectLng.elementAt(1); if(FAQList.get(lngID) != null) { curFaq = (FAQBean) FAQList.get(lngID); try{ curFaqID = curFaq.getID(); }catch(Exception e){ curFaqID=""; } try{ curFaqQuestion = curFaq.getFaqQuestion(); }catch(Exception e){ curFaqQuestion=""; } try{ curFaqResponse = curFaq.getFaqResponse(); }catch(Exception e){ curFaqResponse = ""; } }else{ curFaqID = ""; curFaqQuestion = ""; curFaqResponse = ""; } %> " title="<%=lngDisp%>">
" value="<%=curFaqID%>">
<% } %>
<% /****************************************************************************** * * * m.ichahane@e-deal.ma : 2006/08/25 20:00:10 : Mustapha * * *****************************************************************************/ %>