Leo,

  Actually I got it working now. I didn't realize that JEXL allows to
access all the object methods within its expressions. I was able to
access the Map as follows

 

<jx:forEach items="${myMap.keySet()}" var="key" varStatus="count">


${key}  ${myMap.get(key).get('myInnerKey')}

</jx:forEach>

 

Thank you for your reply.

 

Hiren Pathak

GE Corporate

From: leo [mailto:leo...@inbox.ru] 
Sent: Thursday, April 28, 2011 9:18 AM
To: Pathak, Hiren (GE, Corporate, consultant)
Cc: jxls-user@lists.sourceforge.net
Subject: Re: [jXLS-user] FW: jxls iterating over HashMap??

 

Hi,

jx:forEach tag in its items property expects a class which implements
java.util.Collection interface.
So you cannot directly iterate over HashMap but I think you can iterate
over the map keys and then access the map values inside jx:forEach body.

Wednesday, April 27, 2011, 10:56:17 PM, you wrote:

        Hello,
  I am trying to use jxls with Struts2. I have a Map<Object, Map<String,
Object>> that I would like to iterate over using <jx:forEach> but I am
getting "can't parse expression" error.
 
Is there any special trick that I need to use to iterate over HashMap in
jxls??
 
Thank you in advance.
 
Hiren Pathak
GE Corporate

 

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
jXLS-user mailing list
jXLS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jxls-user

Reply via email to