cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Rosenberger" <>
Subject ForEach and JXTemplateGenerator
Date Sat, 13 Nov 2004 15:37:33 GMT

have a strange problem in accessing a list via JXTemplateGenerator and 

In flowscript I create the array like in an example from the wiki:

var yearslist = ["2000","2001","2002"];

Tried also an LinkedList:

var list = new java.util.LinkedList();

My JXTemplate looks like this:

<?xml version="1.0" encoding="ISO-8859-1"?>

 <html xmlns:jx="">

  <div class="mainmenu-item"><a href="years.html">Years</a></div>
   <p> Heading: <b> ${heading} </b> </p>

   <jx:forEach var="year" items="${yearlist}">
     Year: $year

The $heading variable is correctly substituted , but the JXTemplateGenerator 
doesn't generate a iterated list.

The output in HTML is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
<html xmlns:jx="">
<div class="mainmenu-item"><a href="years.html">Years</a></div>
<p> Heading: <b> GREAT</b> </p>

			<jx:forEach var="year" items="org.mozilla.javascript.NativeArray@66db4e">

Any ideas, why the jx:forEach isn't translated?!?

In an other application at the same cocoon installation, JXTemplateGenerator 
works fine with objects in an arraylist.

It's quite strange, that the above code doesn't work.

Thanks in advance.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message