Return-Path: Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 46579 invoked by uid 500); 10 Aug 2003 08:55:45 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 46566 invoked from network); 10 Aug 2003 08:55:44 -0000 Received: from smtpzilla2.xs4all.nl (194.109.127.138) by daedalus.apache.org with SMTP; 10 Aug 2003 08:55:44 -0000 Received: from pt (a213-84-18-216.adsl.xs4all.nl [213.84.18.216]) by smtpzilla2.xs4all.nl (8.12.9/8.12.9) with SMTP id h7A8tuZt082536 for ; Sun, 10 Aug 2003 10:55:57 +0200 (CEST) From: "Hugo Burm" To: Subject: RE: accessing a HashMap from JXTemplate Date: Sun, 10 Aug 2003 10:56:00 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <0EF9ED64-C9D9-11D7-8570-0003935AD2EE@media.demon.co.uk> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N It took me some time to find out how you can iterate over a map in jxpath: #{./id}
/units is a map of unit objects. You can call a java function on a java object by giving the instance as the first parameter. So I am calling the java values() function on my /units map which creates a collection of its values. #{./id} prints the id field of each of my unit objects. The jexl syntax works without conversion: ${item.getId()}
Hugo > -----Original Message----- > From: Jeremy Quinn [mailto:jeremy@media.demon.co.uk] > Sent: Friday, August 08, 2003 9:47 PM > To: dev@cocoon.apache.org > Subject: accessing a HashMap from JXTemplate > > > but it does not output anything, so I tried this : > > > > #{name()} > #{.} > > > > but got unexpected results : > >