<%@page import="com.edeal.frontline.helper.custom.EnterpriseHelper"%> <%@page import="com.edeal.frontline.helper.custom.EventHelper"%> <%@page import="org.apache.poi.hssf.record.formula.functions.Even"%> <%@page session="true" import="com.edeal.frontline.*,java.util.*,java.text.*,java.lang.reflect.*,com.edeal.frontline.navigation.*"%> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <%@ page import="com.edeal.frontline.helper.custom.FormHelper" %> <% 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=flRequest.getContext().getDataDictionary(); String EntID = flRequest.getParameter("EntID"); String lfqPos = flRequest.getParameter("lfqPos"); String millesime = flRequest.getParameter("millesime"); String lfqID = flRequest.getParameter("lfqID"); String tiersPrincipalTypeValue = flRequest.getParameter("tiersPrincipalTypeValue"); String hiddenlnkID = flRequest.getParameter("hiddenlnk"); String prefix = flRequest.getParameter("prefix"); LinkFormQuestionBean linkFqt = new LinkFormQuestionBean(lfqID,context); LinkFormQuestionBean hiddenlnk = new LinkFormQuestionBean(lfqID,context); String languageID = flRequest.getParameter("languageID");//dico.getRefIdByCode("Lna", "Te1", "fr_FR"); String lngCode = flRequest.getParameter("lngCode");/*dico.getRefCode("EntRefLngID_", languageID);*/ String countryID = flRequest.getParameter("countryID");/*dico.getRefIdByCode("Ctr", "Te1", "FR");*/ FlLocale locale = FlLocale.getInstance(context, languageID, countryID); Vector responses = (Vector)flRequest.getAttribute("responses"); //logger.info("response : "+responses); LinkedHashMap> initialresponses = (LinkedHashMap>)flRequest.getAttribute("initialresponses"); //logger.info("initialresponse : "+initialresponses); boolean isActorLogis = (Boolean) flRequest.getAttribute("isActorLogis"); //logger.info("isActorLogis : "+isActorLogis); Vector initialResponse = (initialresponses.get(lfqID)); QuestionResponseBean initCurQrs = null; if(initialResponse!=null){ initCurQrs = (new QuestionResponseBean(initialResponse.elementAt(0),context)); } int fqtSeqNum = -1; try{ fqtSeqNum = curQuestion.getFqtSeqNum(); }catch(FieldNotInitializedException fne){ } String qLabel=null; String qLabelCode = null; try { qLabel = curQuestion.getFqtLabel().replaceAll("::millesime::", millesime).replaceAll("::millesime\\+1::", (Integer.parseInt(millesime)+1)+"").replaceAll("::millesime-1::", (Integer.parseInt(millesime)-1)+""); qLabel = (qLabel == null? "" : qLabel); qLabelCode = (String)curQuestion.getCustomProperty("FqtLabelCode_"); qLabelCode = (qLabelCode == null? "" : qLabelCode); qLabelCode = Utils.getMessage(context, lngCode, qLabelCode, false,true,"").replaceAll("::millesime::", millesime).replaceAll("::millesime\\+1::", (Integer.parseInt(millesime)+1)+"").replaceAll("::millesime-1::", (Integer.parseInt(millesime)-1)+""); } catch (Exception e) {} boolean disabled = false; try{ disabled = (Boolean)hiddenlnk.getCustomProperty("LfqHtmlDisabled_"); //logger.info("disabled"+disabled); }catch(Exception e){ //logger.info("disabled"+disabled); } if(fqtSeqNum == 163 && prefix.equals("R")){ qLabel += " (1)"; } String code = ""; try{ code = (String)hiddenlnk.getCustomProperty("LfqCode_"); }catch(Exception e){} String name = ""; try{ name = (String)hiddenlnk.getCustomProperty("LfqName_"); }catch(Exception e){} String qType = null; try { qType = curQuestion.getFqtType(); } catch (FieldNotInitializedException fnie) { } String typeOfQuestion = ""; try{ typeOfQuestion = FormHelper.getIntervalTypeOfDateOrDouble(context,name,code); }catch(Exception e){ //logger.warn(e.getMessage()); } if("Fermetures_".equals(name) && Utils.explodeList(code, "|").size()>1) typeOfQuestion = "java.util.Date|java.util.Date"; if(typeOfQuestion.length()==0){ String lfqQuestionType_ = null; try{ lfqQuestionType_ = (String)hiddenlnk.getCustomProperty("LfqQuestionType_"); }catch(Exception e){} if(lfqQuestionType_ == null || lfqQuestionType_.length()==0 || lfqQuestionType_.equals(dico.getRefIdByCode("Tq_", "Te1", "TEXT")) ) typeOfQuestion = "java.lang.String"; else{ if(lfqQuestionType_.equals(dico.getRefIdByCode("Tq_", "Te1", "DOUBLE"))) typeOfQuestion = "java.lang.Double"; if(lfqQuestionType_.equals(dico.getRefIdByCode("Tq_", "Te1", "DATE"))) typeOfQuestion = "java.util.Date"; if(lfqQuestionType_.equals(dico.getRefIdByCode("Tq_", "Te1", "INTEGER"))) typeOfQuestion = "java.lang.Integer"; if(qType.equals(dico.getRefIdByCode("FqtType" , "INT"))) typeOfQuestion = typeOfQuestion +"|"+typeOfQuestion; } } String value = ""; try{ value = (String)hiddenlnk.getCustomProperty("LfqValue_"); }catch(Exception e){} String lblID = null; String lblLabel = ""; try { lblID = (String)curQuestion.getCustomProperty("FqtPreTextLabel_"); lblLabel = Utils.getMessage(context,lngCode,lblID,false,true,"").replaceAll("::millesime::", millesime).replaceAll("::millesime\\+1::", (Integer.parseInt(millesime)+1)+"").replaceAll("::millesime-1::", (Integer.parseInt(millesime)-1)+""); } catch (FieldNotInitializedException fnie) { } catch (FrontlineException e) { } String postlblID = null; String postlblLabel = ""; try { postlblID = (String)curQuestion.getCustomProperty("FqtPostTextLabel_"); postlblLabel = Utils.getMessage(context,lngCode,postlblID,false,true,"").replaceAll("::millesime::", millesime).replaceAll("::millesime\\+1::", (Integer.parseInt(millesime)+1)+"").replaceAll("::millesime-1::", (Integer.parseInt(millesime)-1)+""); } catch (FieldNotInitializedException fnie) { } catch (FrontlineException e) { } //TODO // if((prefix.equals("R") && lfqPos.equals("550")) || (prefix.equals("T") && lfqPos.equals("530")) ){ // postlblLabel = Utils.getMessage(context, session, lngCode, "LF242", false, true, ""); // } String helpText = ""; try { helpText = curQuestion.getFqtHelpText(); } catch (FieldNotInitializedException fnie) { } %> <% if(qType != null && qType.equals(dico.getRefIdByCode("FqtType" , "HIDE")) ){ String qrsText = ""; try { qrsText = curQrs.getQrsText(); } catch (Exception e) {} }else{ if(fqtSeqNum <= 175 || fqtSeqNum > 181){ %>
<%}if(fqtSeqNum < 175 || fqtSeqNum > 181){%> <%} if(qType == null || qType.equals(dico.getRefIdByCode("FqtType" , "ATTFILE"))){ String qrsText = ""; try { qrsText = initCurQrs.getQrsText(); } catch (Exception e) {} String qrsText2 = ""; try{ qrsText2 = (new QuestionResponseBean( (String)initialResponse.elementAt(1),context)) .getQrsText(); } catch (Exception e) {} %>

<% if (qrsText != null && !Utils.isEmpty(qrsText)) { %>

<% } %>
<% if (qrsText2 != null && !Utils.isEmpty(qrsText2)) { %> <% } %>
<%=Utils.getMessage(context, lngCode, "FF337", false, true, "Si vous souhaitez les modifier, merci de bien vouloir nous envoyer les photos souhaitées par email à l'adresse logisguide@logishotels.com


")%>
<%=Utils.getMessage(context, lngCode, "LF391", false, true, "Je confirme que la photo ci-dessus est libre de droit.")%>

<% }else if(qType == null || qType.equals(dico.getRefIdByCode("FqtType" , "FRE"))){ //String ETAB = dico.getRefIdByCode("EntTyeID", "ETAB"); /* Hotel-Restaurant */ //String entTyeID = (String) EnterpriseBean.lookup(context, "EntTyeID", EntID); if((curQuestion.getFqtSeqNum() == 106) /*&& entTyeID.equals(ETAB))*/ || curQuestion.getFqtSeqNum() != 106){ int inputSize = 0; try { inputSize = curQuestion.getFqtInputSize(); } catch (FieldNotInitializedException fnie) { } String qrsText = ""; String qrsTextInitial = ""; try { qrsText = curQrs.getQrsText(); qrsTextInitial = initCurQrs.getQrsText(); } catch (Exception e) {} int qrsInstance = 0; try { qrsInstance = curQrs.getQrsInstance(); } catch (FieldNotInitializedException fnie) { } %> <% // String initRsp1 = initialResponse != null ? initialResponse.get(0):null; // String rep1 = null; // try{ // rep1=curQrs.getQrsID(); // }catch(Exception e){ // rep1=null; // } // if(lfqPos.equals("428") && (rep1==null || rep1.equals(initRsp1)) ) { // qrsText = ""; // } //Questionnaire Guide 2022 -> rendre les non modifiables s'ils ont dèja une valeur if((fqtSeqNum == 20 || fqtSeqNum == 22 || fqtSeqNum == 19 || fqtSeqNum == 18) || (fqtSeqNum >= 133 && fqtSeqNum <= 135 ) || (fqtSeqNum >= 143 && fqtSeqNum <= 145) ){ if(!Utils.isNullEmptyString(qrsText)){ disabled = true; } else{ disabled = false; } } %>

<%if(fqtSeqNum == 172 || fqtSeqNum == 173 || fqtSeqNum == 174){ if(fqtSeqNum == 172){ %>

<%} %>
<%= qLabelCode != null ? qLabelCode : qLabel %>
<%} else { %>
<%= qLabelCode != null ? qLabelCode : qLabel %>
<%} %>
<%if(fqtSeqNum == 187 || fqtSeqNum == 188){%> <% } else {%> onchange="javascript:checkSemaineLivraison(this);" <% }else if(50 == fqtSeqNum){ //EntSiret field %> onchange="javascript:formatSiret(this);" <%}else if(fqtSeqNum <= 152 && fqtSeqNum >= 149){ %> onchange="javascript:isNumberPhoneValid(this);" <%}else if(fqtSeqNum >= 153 && fqtSeqNum <= 159){ %> onchange="javascript:isEmailValid(this);" <% }else if("java.lang.Double".equals(typeOfQuestion)){ %> style="width:90%;" onchange="javascript:isItValid('java.lang.Double',this);" <%}else if("java.lang.Integer".equals(typeOfQuestion) && fqtSeqNum != 572){ %> onchange="javascript:isItValid('java.lang.Integer',this);" <% } %> <%= (disabled ? "disabled" : "") %> /> <%} if(!disabled && isActorLogis && qrsTextInitial != null && !Utils.isEmpty(qrsTextInitial)){ %> <%= qrsTextInitial %> <%} %> <% if("java.lang.Double".equals(typeOfQuestion)){ if(fqtSeqNum == 447 || fqtSeqNum == 42){ %>  €<% }else{%>  % <%} }%>

<% } }else if ( qType.equals(dico.getRefIdByCode("FqtType" , "FRL")) ) { int inputSize = 0; try { inputSize = curQuestion.getFqtInputSize(); } catch (FieldNotInitializedException fnie) { } String qrsText = ""; String qrsTextInitial = ""; try { qrsText = curQrs.getQrsText(); qrsTextInitial = initCurQrs.getQrsText(); } catch (Exception e) {} int qrsInstance = 0; try { qrsInstance = curQrs.getQrsInstance(); } catch (FieldNotInitializedException fnie) { } %>

<%= qLabelCode != null ? qLabelCode : qLabel %>
<%if(!disabled && isActorLogis && qrsTextInitial != null && !Utils.isEmpty(qrsTextInitial)){ %> <%= qrsTextInitial %> <% } %>

<% }else if(qType != null && qType.equals(dico.getRefIdByCode("FqtType" , "INT"))){ Collections.sort(responses); QuestionResponseBean qrs1 = null; String qrsText1 = ""; String qrsText1Initial = ""; int qrsInstance1 = -1; int instance = -1; int initqrsInstance1 = -1; int initinstance = -1; try{ if(responses != null && responses.size() > 0) qrs1 = new QuestionResponseBean((String)responses.elementAt(0),context); try { qrsText1 = qrs1.getQrsText(); } catch (Exception e) {} try { qrsText1Initial = initCurQrs.getQrsText(); } catch (Exception e) {} try { qrsInstance1 = qrs1.getQrsInstance(); if(qrsInstance1 == 0) instance = 1; else instance = 2; } catch (FieldNotInitializedException fnie) { } try { initqrsInstance1 = initCurQrs.getQrsInstance(); if(initqrsInstance1 == 0) initinstance = 1; else initinstance = 2; } catch (FieldNotInitializedException fnie) { } }catch(Exception e){ } QuestionResponseBean qrs2 = null; String qrsText2 = ""; String qrsText2Initial = ""; int qrsInstance2 = -1; int initqrsInstance2 = -1; try{ if(responses != null && responses.size() > 0) qrs2 = new QuestionResponseBean((String)responses.elementAt(1),context); try { qrsText2 = qrs2.getQrsText(); } catch (Exception e) {} try { qrsText2Initial = initialResponse !=null ?(new QuestionResponseBean(initialResponse.elementAt(1),context)).getQrsText():null; } catch (Exception e) {} try { qrsInstance2 = qrs2.getQrsInstance(); if(qrsInstance2 == 0) instance = 2; else instance = 1; } catch (FieldNotInitializedException fnie) { } try { initqrsInstance2 = initialResponse != null ?(new QuestionResponseBean(initialResponse.elementAt(1),context)).getQrsInstance() : null; if(initqrsInstance2 == 0) initinstance = 2; else initinstance = 1; } catch (FieldNotInitializedException fnie) { } if(initinstance != 1){ String temp = qrsText1Initial; qrsText1Initial = qrsText2Initial; qrsText2Initial = temp; } }catch(Exception e){ } QuestionResponseBean qrs3 = null; String qrsText3 = ""; String qrsText3Initial = ""; int qrsInstance3 = -1; int initqrsInstance3 = -1; QuestionResponseBean qrs4 = null; String qrsText4 = ""; String qrsText4Initial = ""; int qrsInstance4 = -1; int initqrsInstance4 = -1; //to get the thirth and forth if (responses != null && !responses.isEmpty() && responses.size() > 2) { try { qrs3 = new QuestionResponseBean((String) responses.elementAt(2), context); try { qrsText3 = qrs3.getQrsText(); } catch (Exception e) { } try { qrsText3Initial = initialResponse !=null ?(new QuestionResponseBean(initialResponse.elementAt(2),context)).getQrsText():null; } catch (Exception e) { } try { instance = qrs3.getQrsInstance() + 1 ; } catch (FieldNotInitializedException fnie) { } try { initqrsInstance3 = initialResponse != null ?(new QuestionResponseBean(initialResponse.elementAt(2),context)).getQrsInstance() + 1 : null ; // if (initqrsInstance1 == 0) // initinstance = 1; // else // initinstance = 2; } catch (FieldNotInitializedException fnie) { } } catch (Exception e) { } try { qrs4 = new QuestionResponseBean((String) responses.elementAt(3), context); try { qrsText4 = qrs4.getQrsText(); } catch (Exception e) { } try { qrsText4Initial = initialResponse !=null ?(new QuestionResponseBean(initialResponse.elementAt(3),context)).getQrsText():null; } catch (Exception e) { } try { instance = qrs4.getQrsInstance() + 1 ; } catch (FieldNotInitializedException fnie) { } try { initqrsInstance4 = initialResponse != null ?(new QuestionResponseBean(initialResponse.elementAt(3),context)).getQrsInstance() + 1 : null ; // if (initqrsInstance1 == 0) // initinstance = 1; // else // initinstance = 2; } catch (FieldNotInitializedException fnie) { } } catch (Exception e) { } } %> <% // String initRsp = initialResponse != null ? initialResponse.get(0):null; // String rep2 = null; // try{ // rep2=qrs2.getQrsID(); // }catch(Exception e){ // rep2=null; // } boolean isOpen = false; boolean isClosed = false; boolean isOpen24h = false; boolean isInitClosed = false; boolean isInitOpen24h = false; if(!Utils.isNullEmptyString(qrsText1Initial) && !Utils.isNullEmptyString(qrsText2Initial) && qrsText1Initial.equals("00:00")){ isInitClosed = true; } else{ if((qrsText1Initial != null && qrsText1Initial.equals("00:01")) && (qrsText2Initial != null && qrsText2Initial.equals("23:59"))){ isInitOpen24h = true; } } if(!Utils.isNullEmptyString(qrsText1) && !Utils.isNullEmptyString(qrsText2) && qrsText1.equals("00:00")){ isClosed = true; } else{ if((qrsText1 != null && qrsText1.equals("00:01")) && (qrsText2 != null && qrsText2.equals("23:59"))){ isOpen24h = true; }else if(!Utils.isNullEmptyString(qrsText1) || !Utils.isNullEmptyString(qrsText2) || !Utils.isNullEmptyString(qrsText3) || !Utils.isNullEmptyString(qrsText4) ){ isOpen = true; } } %> <%if((fqtSeqNum >= 175 && fqtSeqNum <= 181)){%> <% if(fqtSeqNum == 175){ %> <%} %> <%if(fqtSeqNum == 181){ %>
 

<%= Utils.getMessage(context, lngCode, "FF339", "Je suis fermé") %>

<%= Utils.getMessage(context, lngCode, "FF338", "Je suis ouvert 24h/24h") %>

<%= Utils.getMessage(context, lngCode, "FF33A", "Je suis ouvert sur un créneau horaire") %>

     

<%= Utils.getMessage(context, lngCode, "FF347", true,true, "Ouvert le Midi") %>

<%= Utils.getMessage(context, lngCode, "FF348", true,true, "Ouvert le Soir") %>

<%= qLabelCode != null ? qLabelCode : qLabel %>
"> name="<%=prefix %>_<%= lfqPos %>_ResponseRefID" onchange="disableOpening(this, '<%=prefix %>_<%= lfqPos %>')"/> "> name="<%=prefix %>_<%= lfqPos %>_ResponseRefID" onchange="disableOpening(this, '<%=prefix %>_<%= lfqPos %>')">
onchange="enableOpening(this, '<%=prefix %>_<%= lfqPos %>')"> <%= Utils.getMessage(context, lngCode, "LF1C6", "De") %>  name="<%=prefix %>_<%= lfqPos %>_ResponseInt" value="<%= !isOpen24h && !isClosed ? instance >= 0 ? qrsText1 : "" : ""%>" onblur="doInInputTime(this, '<%=prefix %>_<%= lfqPos %>')"><%if( isActorLogis && qrsText1Initial != null && !Utils.isEmpty(qrsText1Initial)){ %> <%= !isOpen24h && !isClosed ? qrsText1Initial : ""%><% } %>   <%= Utils.getMessage(context, lngCode, "L8254", "À") %> name="<%=prefix %>_<%= lfqPos %>_ResponseInt" value="<%= !isOpen24h && !isClosed ? instance >= 1 ? qrsText2 : "" : ""%>" size="20" onblur="doInInputTime(this, '<%=prefix %>_<%= lfqPos %>')"><%if( isActorLogis && qrsText2Initial != null && !Utils.isEmpty(qrsText2Initial)){ %> <%= !isOpen24h && !isClosed ? qrsText2Initial : ""%><% } %>   <%= Utils.getMessage(context, lngCode, "LF1C6", "De") %>  name="<%=prefix %>_<%= lfqPos %>_ResponseInt" value="<%= !isOpen24h && !isClosed ? instance >= 2 ? qrsText3 : "" : "" %>" onchange="doInInputTime(this, '<%=prefix %>_<%= lfqPos %>')"><%if( isActorLogis && qrsText3Initial != null && !Utils.isEmpty(qrsText3Initial)){ %> <%= !isOpen24h && !isClosed ? qrsText3Initial : ""%><% } %>   <%= Utils.getMessage(context, lngCode, "L8254", "À") %>  name="<%=prefix %>_<%= lfqPos %>_ResponseInt" value="<%= !isOpen24h && !isClosed ? instance > 2 ? qrsText4 : "" : "" %>" size="20" onchange="doInInputTime(this, '<%=prefix %>_<%= lfqPos %>')" ><%if( isActorLogis && qrsText4Initial != null && !Utils.isEmpty(qrsText4Initial)){ %> <%= !isOpen24h && !isClosed ? qrsText4Initial : "" %><% } %>  
<%} //TODO %> <%} else{ %>

<%= qLabelCode != null ? qLabelCode : qLabel %>
<%= "Fermetures_".equals(name) ? Utils.getMessage(context, lngCode, "L3128", "Du") : Utils.getMessage(context, lngCode, "L621C", "De") %>  <%if(!disabled && isActorLogis && qrsText1Initial != null && !Utils.isEmpty(qrsText1Initial)){ %><%= qrsText1Initial %> <% } %><%= "Fermetures_".equals(name) ? "" : " "+"€" %> <%= "Fermetures_".equals(name) ? Utils.getMessage(context, lngCode, "L63B4", "Au") : Utils.getMessage(context, lngCode, "L8254", "A") %>  <%if(!disabled && isActorLogis && qrsText2Initial != null && !Utils.isEmpty(qrsText2Initial)){ %><%= qrsText2Initial %> <% } %><%= "Fermetures_".equals(name) ? "" : " "+"€" %> <%if(typeOfQuestion.equals("java.util.Date|java.util.Date")){ %> <%} %>



<%} } else { //Pas Texte libre, c-a-d REF ou LST Vector refvals = new Vector(); boolean isREF = false; boolean isLST = false; if ( qType.equals(dico.getRefIdByCode("FqtType" , "REF")) ) { isREF = true; if(responses != null && responses.size() > 0){ QuestionResponseBean qrs = null; for(int i=0; i0) ? refvals : (Vector)curQuestion.getCustomProperty("FqtRefsInit_"); refToInitStr = Utils.implodeList(listRef2Init, "|"); }catch(FieldNotInitializedException e){} Vector possibleResponses = new Vector(); possibleResponses = listSelectedRef; if ( isLST ) { for (int j=0 ; j < 15 ; j++) { String lstAnswer = null; try { Method getter = Class.forName("com.edeal.frontline.FormQuestionBean").getMethod("getFqtLstAnswer" + j , null); lstAnswer = (String) getter.invoke(curQuestion , null); } catch (Exception e) { } if (lstAnswer != null) { Vector oneResponse = new Vector(); oneResponse.add(Integer.toString(j)); oneResponse.add(lstAnswer); possibleResponses.add(oneResponse); } } } else { String[] fields = {"RefID","RefVal"}; String[][] query = {{"RefTabID = " + Utils.formatToSQL(context, refTableID)}}; String[] orderBy = {"RefTe1 ASC"}; } Vector initrefvals = new Vector(); if ( qType.equals(dico.getRefIdByCode("FqtType" , "REF")) ) { isREF = true; if(initialResponse != null && initialResponse.size() > 0){ QuestionResponseBean qrs = null; for(int i=0; i0) ? initrefvals : (Vector)curQuestion.getCustomProperty("FqtRefsInit_"); initrefToInitStr = Utils.implodeList(initlistRef2Init, "|"); }catch(FieldNotInitializedException e){} Vector initpossibleResponses = new Vector(); initpossibleResponses = initlistSelectedRef; String initresponseSelected = ""; for (int j=0 ; initpossibleResponses!=null && j < initpossibleResponses.size() ; j++) { String initresponseChoice = (String) initpossibleResponses.elementAt(j); String initresponseLabel = (String)dico.getRefDisp(locale, refTableID, "Te1", initresponseChoice); String qrsRefVal = null; boolean isRefVal = false; boolean isInitVal = (initlistRef2Init != null ? initlistRef2Init.contains(initresponseChoice) : false); int qrsPos = -1; if (!isLST) { try { qrsRefVal = initCurQrs != null ? initCurQrs.getQrsRefValID() : ""; isRefVal = qrsRefVal.equals(initresponseChoice); } catch (Exception e) {} } else { try { qrsPos = initCurQrs.getQrsPosition(); isRefVal = (new Integer(initresponseChoice).intValue() == qrsPos); } catch (Exception e) {} } initresponseSelected = isInitVal ? initresponseLabel : initresponseSelected ; } // Evolution EB030 Boolean isClassement = false; String entTyeID = null; String HOTEL = dico.getRefIdByCode("EntTyeID", "HOTEL"); /* Hotel sans Restaurant */ String ETAB = dico.getRefIdByCode("EntTyeID", "ETAB"); /* Hotel-Restaurant */ try{ entTyeID = (String) EnterpriseBean.lookup(context, "EntTyeID", EntID); }catch(Exception e){ e.printStackTrace(); entTyeID = null; } if(code.equals("EntCheNbID_") || code.equals("EntCocNbID_")/* || code.equals("EntStarClassID_") || code.equals("EntAnx_")*/){ if (!entTyeID.equals(HOTEL) && !entTyeID.equals(ETAB)) { isClassement = true; } } if (isCombo) { if (isClassement == false) { %>

<% if(disabled) { %> <%if(fqtSeqNum == 182){ %>

<%} else { %>
<%} %> <%= qLabelCode != null ? qLabelCode : qLabel %>
<% if(possibleResponses != null && possibleResponses.size() > 0){ String responseSelected = ""; String responseChoice = ""; String responseChoiceSelected = ""; for (int j=0 ; j < possibleResponses.size() ; j++) { responseChoice = (String) possibleResponses.elementAt(j); String responseLabel = (String)dico.getRefDisp(locale, refTableID, "Te1", responseChoice); String qrsRefVal = null; boolean isRefVal = false; boolean isInitVal = (listRef2Init != null ? listRef2Init.contains(responseChoice) : false); int qrsPos = -1; if (!isLST) { try { qrsRefVal = curQrs != null ? curQrs.getQrsRefValID() : ""; isRefVal = qrsRefVal.equals(responseChoice); } catch (Exception e) {} } else { try { qrsPos = curQrs.getQrsPosition(); isRefVal = (new Integer(responseChoice).intValue() == qrsPos); } catch (Exception e) {} } responseSelected = isInitVal ? responseLabel : responseSelected ; responseChoiceSelected = isInitVal ? responseChoice : responseChoiceSelected ; } %> " value="<%= responseChoiceSelected %>" /> id="input1_w100_fqtNum<%= fqtSeqNum %>" <%} else { %> id="input1_w100" <%} %> name="<%=prefix %>__<%= lfqPos %>_<%= isLST ? "ResponsePosition" : "ResponseRefID" %>" value ="<%=responseSelected %>" size="<%= Integer.toString(complementaryText) %>" <%= (disabled ? "disabled" : "") %>/> <%if(!disabled && isActorLogis && responseSelected != null && !Utils.isEmpty(responseSelected)){ %> <%= responseSelected %> <% } %> <% }}else{ %>
<%= qLabelCode != null ? qLabelCode : qLabel %>
<%if(!disabled && isActorLogis && initresponseSelected != null && !Utils.isEmpty(initresponseSelected)){ %> <%= initresponseSelected %> <% } %> <%} %> <% if (complementaryText > 0) { String cplText = null; try { cplText = curQrs != null ? curQrs.getQrsMoreText() : ""; } catch (Exception e) {} %> " size="<%= Integer.toString(complementaryText) %>"> <% } %>

<% } } else { // pas combo , c-a-d checkbox ou radio String tagType = "checkbox"; if (isRadio) { tagType = "radio"; } //int nbResByColumn = possibleResponses.size() / nbColumn; //if ( nbColumn * nbResByColumn < possibleResponses.size() ) nbResByColumn++; //int cptPossibleResponse = 0; if(possibleResponses != null && possibleResponses.size() > 0 && possibleResponses.size() == 1){ int nbResByColumn = possibleResponses.size() / nbColumn; if ( nbColumn * nbResByColumn < possibleResponses.size() ) nbResByColumn++; int cptPossibleResponse = 0; String responseChoice = (String) possibleResponses.elementAt(0); String responseLabel = qLabel; boolean isInitVal = (listRef2Init != null ? listRef2Init.contains(responseChoice) : false); String initresponseChoice = (String) initpossibleResponses.elementAt(0); boolean initisInitVal = (initlistRef2Init != null ? initlistRef2Init.contains(initresponseChoice) : false); %>

<% }else if(possibleResponses != null && possibleResponses.size() > 1){ int nbResByColumn = possibleResponses.size() / nbColumn; if ( nbColumn * nbResByColumn < possibleResponses.size() ) nbResByColumn++; int cptPossibleResponse = 0; %>

<%= qLabelCode != null ? qLabelCode : qLabel %>
<%if(fqtSeqNum == 161) {%> <%} %>
    <% boolean isChecked=false;%> <% if(fqtSeqNum == 29 || fqtSeqNum == 191 || fqtSeqNum == 119){ Hashtable allPossibleResponnesByCatCOde = EventHelper.getResponceChoiseByCategory(context, possibleResponses); int index = 0; List keys = new ArrayList(new HashSet(allPossibleResponnesByCatCOde.keySet())); Collections.sort(keys); for(Object catCodeId : keys){ String catLabel = (String)dico.getRefDisp(locale, (String)RefValuesBean.lookup(context, "reftabid", (String)catCodeId) , "Te1", (String)catCodeId); possibleResponses = (Vector)allPossibleResponnesByCatCOde.get(catCodeId); %>

    <%= catLabel %>

    <% index++; for (int j=0 ; j < possibleResponses.size() ; j++) { String responseChoice = (String) possibleResponses.elementAt(j); String responseLabel = (String)dico.getRefDisp(locale, refTableID, "Te1", responseChoice); String qrsRefVal = null; boolean isRefVal = false; boolean isInitVal = (listRef2Init != null ? listRef2Init.contains(responseChoice) : false); boolean initisInitVal = (initlistRef2Init != null ? initlistRef2Init.contains(responseChoice) : false); if(isInitVal==true) isChecked=true; int qrsPos = -1; String styleVal = j != possibleResponses.size() - 1 ? "" : "margin-bottom: 25px;"; if (!isLST) try { qrsRefVal = curQrs != null ? curQrs.getQrsRefValID() : ""; isRefVal = qrsRefVal.equals(responseChoice); } catch (Exception e) {} else try { qrsPos = curQrs.getQrsPosition(); isRefVal = (new Integer(responseChoice).intValue() == qrsPos); } catch (Exception e) {} String cplText = null; try { cplText = curQrs != null ? curQrs.getQrsMoreText() : ""; } catch (Exception e) {} %>
  • "> <%if (cptPossibleResponse % nbResByColumn == 0) { %> <% } else { %> <% }%> <%if ( (complementaryText > 0) || (hasOther > 0 && j == possibleResponses.size() - 1) ) { %> " size="<%= complementaryText > 0 ? Integer.toString(complementaryText) : Integer.toString(hasOther) %>" <%= (disabled ? "disabled" : "") %> /> <% } %>
  • <% cptPossibleResponse++; } } } else { for (int j=0 ; j < possibleResponses.size() ; j++) { String responseChoice = (String) possibleResponses.elementAt(j); String responseLabel = (String)dico.getRefDisp(locale, refTableID, "Te1", responseChoice); if(fqtSeqNum == 192){ //MF1F7 MF1F8 responseLabel = Utils.getMessage(context, lngCode, (j == 0) ? "MF1F7" : "MF1F8", true,true,"") ; } String onChangesBF = ""; if(fqtSeqNum == 40 && prefix != null && (prefix.startsWith("M") || prefix.startsWith("I"))){ onChangesBF = "onchange=\"handleBreakfastPrice(this);\""; } String responsePostLable = ""; if(fqtSeqNum == 161) responsePostLable = (String) EventHelper.getEquipementPostText(context, locale, responseChoice); String qrsRefVal = null; boolean isRefVal = false; boolean isInitVal = (listRef2Init != null ? listRef2Init.contains(responseChoice) : false); boolean initisInitVal = (initlistRef2Init != null ? initlistRef2Init.contains(responseChoice) : false); if(isInitVal==true) isChecked=true; int qrsPos = -1; if (!isLST) try { qrsRefVal = curQrs != null ? curQrs.getQrsRefValID() : ""; isRefVal = qrsRefVal.equals(responseChoice); } catch (Exception e) {} else try { qrsPos = curQrs.getQrsPosition(); isRefVal = (new Integer(responseChoice).intValue() == qrsPos); } catch (Exception e) {} String cplText = null; try { cplText = curQrs != null ? curQrs.getQrsMoreText() : ""; } catch (Exception e) {} %>
  • ;"> <%if(fqtSeqNum == 1101) {%> <% if (cptPossibleResponse % nbResByColumn == 0) { %> <% } else { %> <% }%> <%} else { if (cptPossibleResponse % nbResByColumn == 0) { %> <% } else { %> <% }}%> <%if ( (complementaryText > 0) || (hasOther > 0 && j == possibleResponses.size() - 1) ) { %> " size="<%= complementaryText > 0 ? Integer.toString(complementaryText) : Integer.toString(hasOther) %>" <%= (disabled ? "disabled" : "") %> /> <% } %> <%if(fqtSeqNum == 165){ %>


  • <%} else { %> <%} %> <% cptPossibleResponse++; } } %>

<%if(fqtSeqNum != 161) {%> <%} if(fqtSeqNum == 165){ %>
<%=Utils.getMessage(context, lngCode, "FF33B", true,true,"Calculer mon indice Séjour plus sûr")%>





<%=Utils.getMessage(context, lngCode, "FF344", true,true,"Indice séjour plus sûr")%>



<%} } //if > 1 %> <% } } %>
<% }%>