wood burning stoves 2.0*
The moose likes Struts and the fly likes Iterating the collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Iterating the collection" Watch "Iterating the collection" New topic
Author

Iterating the collection

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
i'm trying to store the value to the variable retrived from the collection using <logic:iterate>. is it possible.

for example

<logic:iterate id="listingcinemas" name="movie" scope="session">
<bean:write name="listingcinemas" property="showtiming"/>
</td>
</tr>
</logic:iterate>

the above code is working properly. but i want to store the value of the property showtiming in to another variable. how to do
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
raj,

Welcome to JavaRanch!

We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.

Thanks Pardner! Hope to see you 'round the Ranch!


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Sree Jag
Ranch Hand

Joined: Oct 14, 2003
Posts: 77
Hi Raj,

You can store the value to the variable retrived from the collection using
<logic:iterate id="listingcinemas" name="movie" scope="session">

<bean efine id="show" name="listingcinemas" property="showtiming" toScope="page"/>
<%= show %>

<bean:write name="listingcinemas" property="showtiming"/>
</td>
</tr>
</logic:iterate>

Hope this helps,
Seshu


Sree Jag<br />SCJP 1.4
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
thanx! it's working properly.

is there anyway to control the <logic:iterate/> loop like

termination or pause
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Iterating the collection
 
Similar Threads
Confusion with logic:iterate tag
how to assign bean value to jsp variable in struts
logic:iterate & DTO Problem
Nested HashMap in logic:iterate
Cannot find bean in any scope...