<%
}
}//End idx==1
if(idxTab > 1) {%>
<%}%>
">
<%
idxTab++;%>
<%
} // fin formTabMode
else {
//Idx tab = 0 --> on met un espace
%>
<%=paragraph%>
<%
}
} else {
FormQuestionBean curQuestion = null;
try {
curQuestion = new FormQuestionBean(questionID , session);
} catch (AccessDeniedException ade) {
} catch (FrontlineException fex) {
}
if (curQuestion != null) {
String qLabel = null;
try {
qLabel = curQuestion.getFqtLabel();
} catch (FieldNotInitializedException fnie) {
}
%>
<%= qLabel == null ? " " : qLabel %>
<%
String qType = null;
try {
qType = curQuestion.getFqtType();
} catch (FieldNotInitializedException fnie) {
}
boolean isFreeText = qType.equals(dico.getRefIdByCode("FqtType" , "FRE"));
if ( qType == null || isFreeText) {
int inputSize = 0;
try {
inputSize = curQuestion.getFqtInputSize();
} catch (FieldNotInitializedException fnie) {
}
%>
<%
// If we have chosen a free text zone, and not set a size, consider it is a textarea.
if (isFreeText && (inputSize == 0)) {
%>
<%
} else {
%>
">
<%
}
%>
<%
}else if(qType != null && "INT".equals(dico.getRefCode("FqtType" , qType))){
%>
<%
} else { //Pas Texte libre, c-a-d REF ou LST
boolean isREF = false;
boolean isLST = false;
if ( qType.equals(dico.getRefIdByCode("FqtType" , "REF")) ) {
isREF = true;
}
if ( qType.equals(dico.getRefIdByCode("FqtType" , "LST")) ) {
isLST = true;
}
boolean isCombo = true;
boolean isRadio = false;
boolean isCheck = false;
String dispType = null;
try {
dispType = curQuestion.getFqtDispType();
} catch (FieldNotInitializedException fnie) {
}
if (dispType != null && dispType.equals(dico.getRefIdByCode("FqtDispType", "RADIO"))) {
isCombo = false;
isRadio = true;
}
if (dispType != null && dispType.equals(dico.getRefIdByCode("FqtDispType", "CHECK"))) {
isCombo = false;
isCheck = true;
}
int complementaryText = 0;
try {
complementaryText = curQuestion.getFqtAssociatedText();
} catch (FieldNotInitializedException fnie) {
}
int nbColumn = 1;
try {
nbColumn = curQuestion.getFqtColumnsNb();
} catch (FieldNotInitializedException fnie) {
}
int hasOther = 0;
try {
hasOther = curQuestion.getFqtHasOther();
} catch (FieldNotInitializedException fnie) {
}
String refTableID = null;
try {
refTableID = curQuestion.getFqtRefTable();
} catch (FieldNotInitializedException fnie) {
}
Vector listSelectedRef = null;
try{
listSelectedRef = (Vector)curQuestion.getCustomProperty("FqtRefsDisp_");
}catch(FieldNotInitializedException e){}
Vector listRef2Init = null;
try{
listRef2Init = (Vector)curQuestion.getCustomProperty("FqtRefsInit_");
}catch(FieldNotInitializedException e){}
Vector possibleResponses = new Vector();
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 {
try {
possibleResponses = dico.getRefList(session, refTableID , "Te1");
if(listSelectedRef != null && listSelectedRef.size() > 0){
int k = 0;
for(int h=0; h
">
<%
for (int j=0 ; j < possibleResponses.size() ; j++) {
String responseChoice = (String) ((Vector) possibleResponses.elementAt(j)).elementAt(0);
String responseLabel = (String) ((Vector) possibleResponses.elementAt(j)).elementAt(1);
if(listRef2Init != null && listRef2Init.contains(responseChoice)){
%>
<%= responseLabel %>
<%
}else{
%>
<%= responseLabel %>
<%
}
}
%>
<%
if (complementaryText > 0) {
%>
<%
}
%>
<%
} else { // pas combo , c-a-d checkbox ou radio
String tagType = "checkbox";
if (isRadio) {
tagType = "radio";
}
%>
<%
}
}
}//currQuestion != null
}//N est pas un paragraph
}//End for
}//If list != null
%>
<%
if(formTabMode) {
%>
<%
}
%>
<% if (isPreview) { %>
<% } %>