I want to make a dynamic list of links. Under a computed text control, i have this code :
var aHtml=“
- ”;
var result = @Unique(getComponent(“books”).getValue ());
for (i=0; i<result.length; i++) {
aHtml+="<li><a href=\"#\" onclick=\"viewScope.dossier='"+result[i]+"'\">"+result[i]+"</a></li>"
}
return aHtml + “
”In the browser i have this error : “viewScope is undefined”.
What is wrong ?
Thank you in advance.