Hello,
First I m a beginer in Tapestry... Actually I m developping a webview which
has to display an ordered array as below:
Root 1
Root 2
Root 3
|----Child1
|----Child2
|---Child 2.1
|---Child 2.2
....
...
My code in local working perfectly... However when I intrated in my tapestry
application it idisplays the following exception:
Tag <> on line 158 contains more than one 'valuebool' attribute.
I checked on webview and there is no tags which are using this variable
name. I try to rename in toto. And the results is the same:
Below you can see the code:
In bold where Apache detects an exception.
function clear(result)
{
var res= result.replace('"','');
var res= res.replace('"','');
var res= res.replace('[','');
var res= res.replace(']','');
var res= res.replace('[','');
var res= res.replace(']','');
return res;
}
function who_is_root(tab_result)
{
var i=3;
var root=new Array();
var y=0;
var valuebool;
var z;
while (i < tab_result.length)
{
var id_parent=clear(tab_result[i]);
valuebool=false;
z=1;
while (z < tab_result.length)
{
if(clear(tab_result[z])==id_parent)
{
// An exception is up
valuebool=true;
}
//Sometimes the exception is
up for z variables
z=z+4;
}
if (!valuebool)
{
root[y]=clear(tab_result[i-3]);
root[y+1]=clear(tab_result[i-2]);
root[y+2]=clear(tab_result[i-1]);
root[y+3]=clear(tab_result[i]);
y=y+4;
}
i=i+4;
}
return(root);
}
function afficher_enfant(id_root,y,result)
{
if (y <result.length)
{
if(id_root==clear(result[y]))
{
//Afficher l'enfant ci-dessous
document.write("<tr>");
document.write("<td>" + clear(result[y-3]) +
"</td>");
document.write("<td>" + clear(result[y-2]) +
"</td>");
document.write("<td>" + clear(result[y-1]) +
"</td>");
document.write("<td>" + clear(result[y]) +
"</td>");
document.write("</tr>");
}
y=y+4;
afficher_enfant(id_root,y,result);
}
}
function afficher_ma_config(code,result)
{
result=result.split(",");
var tab_root=who_is_root(result);
var i=1;
document.write("<table align='center' class='tablesorter'>");
document.write("<thead><tr ><td>Zone
List</td></tr><tr><th>Name</th><th>ID</th><th>Type</th><th>Parents</th></tr></thead>");
document.write("<tbody>");
while(i<tab_root.length)
{
document.write("<tr>");
document.write("<td>" + clear(tab_root[i-1]) + "</td>");
document.write("<td>" + clear(tab_root[i]) + "</td>");
document.write("<td>" + clear(tab_root[i+1]) + "</td>");
document.write("<td>" + clear(tab_root[i+2]) + "</td>");
document.write("</tr>");
afficher_enfant(tab_root[i],3,result);
i=i+4;
}
document.write("</tbody>");
document.write("</table>");
}
var reqparam="http://10.170.212.167/zones/list";
triggerAction('listrules',[reqparam],afficher_ma_config,'text/html');
Thank you for answering to this question,
I think this subject was already underlined in either part of this forum
Best Regards,
--
View this message in context:
http://old.nabble.com/TemplateParseException%3A-Tag-%3C%3E-on-line-xxx-contains-more-than-one-%27y%27-attribute.-tp26267695p26267695.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]