cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <jer...@media.demon.co.uk>
Subject JX Template help
Date Wed, 02 Jul 2003 11:54:26 GMT
(I think I sent this just as the mailing lists were being changed over, 
my apologies if two copies arrive)



Hi All,

Anyone got an idea what I am doing wrong here?

I have a java.util.ArrayList called "pageNames", populated with 
Strings, that I want to output (along with their index) using JX 
Template.

	<t:forEach items="#{pageNames}">
		<a href="#" 
onmousedown="doAction('#{$PAGEACTION}','#{position()}')">#{.}</a><br/>
	</t:forEach>

The output I get looks like this:

	<a href="#" onmousedown="doAction('PAGE_THUS','0')">Abdu'Allah</a><br/>
	<a href="#" onmousedown="doAction('PAGE_THUS','0')">Budgett</a><br/>
	<a href="#" onmousedown="doAction('PAGE_THUS','0')">Evans</a><br/>
	......                                                                 
           ^

ie. 'position()' is not working as I would expect it to do, (from my 
experience with XSLT).

Should I expect it to work the same way?
Is there an alternative way of doing this?


Thanks for any help

regards Jeremy


Mime
View raw message