aspose file tools
The moose likes Struts and the fly likes Strurs 2 iterate over a Map Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Strurs 2 iterate over a Map" Watch "Strurs 2 iterate over a Map" New topic
Author

Strurs 2 iterate over a Map

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 8795

Guys,

I'm trying to iterate over a Map that contains an Object as a Key and has a List of other Objects as value.

For example., Map < MyObject, List < OtherObject> > myMap.

I need to iterate over myMap and display a couple of variables from the key and the remaining couple from the value. In essence I need to do something like

myMap.MyObject.firstName and myMap.MyObject.lastName and get the other values from the value as myMap.OtherObject.address1.street and so on....

I have a simple iterator as below:



SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 8795

Ok, I got it to work. This is what I did:

Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

Why you are storing heavy object in session, why you are not using applicationAware interceptor for this purpose.


ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Strurs 2 iterate over a Map
 
Similar Threads
struts 2: how to validate text fields in a collection
[Struts2] losing display only(prepopulated) values of the form if the validaiton fails
struts2:Displaying dtatbase values in jsp
struts2 custom components checkbox JSP
Iterating over Map using JSTL