You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Naresh Sharma <Na...@KeaneIndia.Com> on 2004/06/08 18:39:22 UTC
Logic:iterate
Hi,
I am setting a bean from my action class, this bean class has one hashmap
object, and in jsp I want to print Hashmap "key" and "values" both.
Can you please suggest how to do that?
Regards
Naresh
Re: Logic:iterate
Posted by Bill Siggelkow <bi...@bellsouth.net>.
I am doing this from memory but I think it is right ...
Let' suppose that the HashMap is exposed on the bean by the method
Map getFooMap() {...}
then you can use on your JSP:
<logic:iterate id="entry" name="bean" property="fooMap">
Key:<bean:write name="entry" property="key"/><br />
Value:<bean:write name="entry" property="value"/><br />
</logic:iterate>
Bill Siggelkow
Naresh Sharma wrote:
> Hi,
>
> I am setting a bean from my action class, this bean class has one
> hashmap object, and in jsp I want to print Hashmap "key" and "values" both.
>
> Can you please suggest how to do that?
>
>
> Regards
> Naresh
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Logic:iterate
Posted by Lucas Gonzalez <lu...@convergia.com.ar>.
Logic:iterate<logic:iterate id="navigationPage" name="navigationBar" indexId="index" property="pages">
< bean : write name="navigationPage" property="title" />
</logic:iterate>
----- Original Message -----
From: Naresh Sharma
To: Struts Users Mailing List
Sent: Tuesday, June 08, 2004 1:39 PM
Subject: Logic:iterate
Hi,
I am setting a bean from my action class, this bean class has one hashmap object, and in jsp I want to print Hashmap "key" and "values" both.
Can you please suggest how to do that?
Regards
Naresh
------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org