<%
int nodiSezione = theXMLconf.contaNodi(macroArea + "/sezione");
for (int i = 0; i < nodiSezione; i++) {
String sezione = "/sezione[" + (i + 1) + "]";
String nomeSezione = theXMLconf.valoreNodo(macroArea + sezione + "/@name");
//out.println("nomeSezione "+nomeSezione);
//String idSezione = StringEscapeUtils.escapeEcmaScript(((((nomeSezione.replace('/', '.')).replace('\'', '_')).replace(']', '-')).replace('[', '-')).replace(' ', '-').replace('@', '-').replace('=', '-').replace('(', '-').replace(')', '-')).replaceAll("\\\\","");
// String idSezione = StringEscapeUtils.escapeEcmaScript(((((nomeSezione.replace('/', '.')).replace('\'', '_')).replace(']', '-')).replace('[', '-')).replace(' ', '-').replace('@', '-').replace('=', '-').replace('(', '-').replace(')', '-'));
String idSezione = StringsUtils.escapeSingleApex(((((nomeSezione.replace('/', '.')).replace('\'', '_')).replace(']', '-')).replace('[', '-')).replace(' ', '-').replace('@', '-').replace('=', '-').replace('(', '-').replace(')', '-'));
//out.println(idSezione);
String typeSezione = theXMLconf.valoreNodo(macroArea + sezione + "/@type");
String extra = theXMLconf.valoreNodo(macroArea + sezione + "/@extra",false);
if (typeSezione.equals("custom")) {
if ((theXMLconf.valoreNodo(macroArea + sezione + "/@id")).equals("daogrp")) {
String elemento = "/elemento[1]";
System.out.println("elemento "+elemento);
System.out.println("sezione "+sezione);
System.out.println("macroArea "+macroArea);
generatoreForm.setValues(elemento, sezione, macroArea);
generatoreForm.generateSection(out, theXMLconf.valoreNodo(macroArea + sezione + "/@id"));
}
} else {%>
>
<%=rigaSeparaMiddle%>
<%boolean testSezione = false;
boolean testSezioneOpen = false;
if (!theXMLconf.valoreNodo(macroArea + sezione + "/@disable").equals("yes")) {
String ilTest = theXMLconf.valoreNodo(macroArea + sezione + "/@test");
String ilValore = theXMLconf.valoreNodo(macroArea + sezione + "/@value");
boolean processa = true;
if (!ilTest.equals("")) {
if (ilTest.indexOf("not ") == 0) {
ilTest = ilTest.substring(4);
if (theXML.valoreNodo(ilTest, "").equals(ilValore))
processa = false;
} else {
if (!theXML.valoreNodo(ilTest, "").equals(ilValore))
processa = false;
}
}
if (processa) {
testSezione = true;
int nodiElemento = theXMLconf.contaNodi(macroArea + sezione + "/elemento");
if (theXMLconf.valoreNodo(macroArea + sezione + "/@opened").equals("yes")) {
testSezioneOpen = true;
}
for (int x = 0; x < nodiElemento; x++) {
String elemento = "/elemento[" + (x + 1) + "]";
String newXPathControl = theXMLconf.valoreNodo(macroArea + sezione + elemento + "/@changeXPath");
if (!theXMLconf.valoreNodo(macroArea + sezione + elemento + "/@disable").equals("yes")) {
%>
<%
if(!newXPathControl.equals("")){
generatoreForm.setValues("newXPath", newXPathControl);
}else{
generatoreForm.setValues("newXPath", null);
}
generatoreForm.setValues(elemento, sezione, macroArea);
generatoreForm.generateSection(out);
%>
<%}
}
testaRigaSepara = true;
}
}
%> |
<%if (!testSezione) {
%><%} else {
if (testSezioneOpen) {%><%}
}%><%if (testaRigaSepara) {
testaRigaSepara = false;%><%=rigaSepara%><%}
%><%
}
}
%>