%@page import="org.xdams.utility.ExpressionEvaluationUtils"%>
<%@page import="org.xdams.utility.testing.TestingViewBean"%>
<%@page import="org.apache.commons.lang3.StringEscapeUtils"%>
<%@page import="org.apache.commons.lang3.StringUtils"%>
<%@page import="org.xdams.page.view.bean.MediaBean"%>
<%@page import="org.xdams.xml.builder.XMLBuilder"%>
<%@page import="org.xdams.workflow.bean.WorkFlowBean"%>
<%
// INIZIO GESTIONE DATI
int nodiMacroarea = theXMLconf.contaNodi("/root/macroarea");
for(int z = 0; z < nodiMacroarea;z++){
if(!theXMLconf.valoreNodoHTML("/root/macroarea["+(z+1)+"]/@summary","").equals("no")){
boolean testMacro = false;
int nodiSezione = theXMLconf.contaNodi("/root/macroarea["+(z+1)+"]/sezione");
for(int i = 0; i < nodiSezione;i++){
if(!theXMLconf.valoreNodoHTML("/root/macroarea["+(z+1)+"]/sezione["+(i+1)+"]/@summary","").equals("no")){
boolean testSezione = false;
int nodiElemento= theXMLconf.contaNodi("/root/macroarea["+(z+1)+"]/sezione["+(i+1)+"]/elemento");
for(int x = 0; x < nodiElemento;x++){
if(!theXMLconf.valoreNodoHTML("/root/macroarea["+(z+1)+"]/sezione["+(i+1)+"]/elemento["+(x+1)+"]/@summary","").equals("no")){
/*SCRIVO L'ELEMENTO*/
String fieldType = theXMLconf.valoreNodoHTML("/root/macroarea["+(z+1)+"]/sezione["+(i+1)+"]/elemento["+(x+1)+"]/@type","");
String fieldPath = theXMLconf.valoreNodoHTML("/root/macroarea["+(z+1)+"]/sezione["+(i+1)+"]/elemento["+(x+1)+"]/text()","");
String fieldFormatBefore = theXMLconf.valoreNodoHTML("/root/macroarea["+(z+1)+"]/sezione["+(i+1)+"]/elemento["+(x+1)+"]/@format_before","");
String fieldFormatAfter = theXMLconf.valoreNodoHTML("/root/macroarea["+(z+1)+"]/sezione["+(i+1)+"]/elemento["+(x+1)+"]/@format_after","");
String fieldFormat = theXMLconf.valoreNodoHTML("/root/macroarea["+(z+1)+"]/sezione["+(i+1)+"]/elemento["+(x+1)+"]/@format","");
String fieldName = theXMLconf.valoreNodoHTML("/root/macroarea["+(z+1)+"]/sezione["+(i+1)+"]/elemento["+(x+1)+"]/@name","");
String fieldPrefix = theXMLconf.valoreNodoHTML("/root/macroarea["+(z+1)+"]/sezione["+(i+1)+"]/elemento["+(x+1)+"]/@prefix","");
String fieldInLine = theXMLconf.valoreNodoHTML("/root/macroarea["+(z+1)+"]/sezione["+(i+1)+"]/elemento["+(x+1)+"]/@inline","");
String fieldControlled = theXMLconf.valoreNodoHTML("/root/macroarea["+(z+1)+"]/sezione["+(i+1)+"]/elemento["+(x+1)+"]/@externalPath","");
String fieldControlledValue = theXMLconf.valoreNodoHTML("/root/macroarea["+(z+1)+"]/sezione["+(i+1)+"]/elemento["+(x+1)+"]/@value","");
if(fieldType.equals("")){/* campo semplice*/
String valoreNodo = theXML.valoreNodoHTML(fieldPath,"
"," ");
if(!fieldControlled.equals("") && !(valoreNodo.trim()).equals("")){
int nodiOpzioni = theXMLValControllati.contaNodi(fieldControlled);
for (int d = 0; d < nodiOpzioni; d++) {
if (valoreNodo.equalsIgnoreCase(theXMLValControllati.valoreNodoHTML(fieldControlled + "[" + (d + 1) + "]/@value"))) {
valoreNodo =theXMLValControllati.valoreNodoHTML(fieldControlled + "[" + (d + 1) + "]/text()");
}
}
}
if(!valoreNodo.equals("")){ /* esiste un valore */
%>
| <%=theXML.valoreNodoHTML(fieldPrefix+"/daodesc//text()"," ")%> | <%
for(int w = 0; w < numeroFoto; w++){
if(fieldMode.indexOf("thumb")==0){
%> <% }else{ if(fieldMode.indexOf("simple")==0){ %>" target="_new"> <%if(!(theXML.valoreNodoHTML(fieldPrefix+"["+(w+1)+"]"+fieldSuffix)).equals("")){%> <%=theXML.valoreNodoHTML(fieldPrefix+"["+(w+1)+"]"+fieldSuffix)%> <%}else{%> allegato <%=(w+1)%> <%}%> <% }else{ if(fieldMode.indexOf("mp3")==0){%> <%if(!(theXML.valoreNodoHTML(fieldPrefix+"["+(w+1)+"]"+fieldSuffix)).equals("")){%> <%=theXML.valoreNodoHTML(fieldPrefix+"["+(w+1)+"]"+fieldSuffix)%> <%}else{%> brano <%=(w+1)%> <%}%> <%} } } } %> |
| <%=theXML.valoreNodoHTML(fieldPrefix+"["+(a+1)+"]/daodesc//text()"," ")%> | <%
for(int w = 0; w < numeroFoto; w++){
if(fieldMode.indexOf("thumb")==0){
%> <% }else{ if(fieldMode.indexOf("simple")==0){ %>" target="_new"> <%if(!(theXML.valoreNodoHTML(fieldPrefix+"["+(a+1)+"]/daoloc["+(w+1)+"]/@title")).equals("")){%> <%=theXML.valoreNodoHTML(fieldPrefix+"["+(a+1)+"]/daoloc["+(w+1)+"]/@title")%> <%}else{%> allegato <%=(a+1)%> <%}%> <% }else{ if(fieldMode.indexOf("mp3")==0){%> <%if(!(theXML.valoreNodoHTML(fieldPrefix+"["+(a+1)+"]/daoloc["+(w+1)+"]/@title")).equals("")){%> <%=theXML.valoreNodoHTML(fieldPrefix+"["+(a+1)+"]/daoloc["+(w+1)+"]/@title")%> <%}else{%> brano <%=(a+1)%> <%}%> <%} } } } %> |
<%=theXML.valoreNodoHTML(fieldPrefix+"["+(a+1)+"]/extptr/@title"," ")%> |
|
| " target="_new"> <%if(!(theXML.valoreNodoHTML(fieldPrefix+"["+(a+1)+"]/extptr/@title","")).equals("")){%> <%=theXML.valoreNodoHTML(fieldPrefix+"["+(a+1)+"]/extptr/@title"," ")%> <%}else{%> allegato <%=(a+1)%> <%}%> | |
| <%if(!(theXML.valoreNodoHTML(fieldPrefix+"["+(a+1)+"]/extptr/@title","")).equals("")){%> <%=theXML.valoreNodoHTML(fieldPrefix+"["+(a+1)+"]/extptr/@title"," ")%> <%}else{%> brano <%=(a+1)%> <%}%> |
| <%=theXML.valoreNodoHTML(fieldPrefix+"["+(a+1)+"]/extref/@title"," ")%> | |
| " target="_new"> <%if(!(theXML.valoreNodoHTML(fieldPrefix+"["+(a+1)+"]/extref/@title","")).equals("")){%> <%=theXML.valoreNodoHTML(fieldPrefix+"["+(a+1)+"]/extref/@title"," ")%> <%}else{%> allegato <%=(a+1)%> <%}%> | |
| <%if(!(theXML.valoreNodoHTML(fieldPrefix+"["+(a+1)+"]/extref/@title","")).equals("")){%> <%=theXML.valoreNodoHTML(fieldPrefix+"["+(a+1)+"]/extref/@title"," ")%> <%}else{%> brano <%=(a+1)%> <%}%> |