Location bean is made up of
Locationname
Locationcity
Locationcountry
And a Map, rooms
Rooms consist of 3 room beans
Room1name Room1description
Room2name Room2description
Room3name Room3description
Assume there is a session/request/page scope Object location. On JSP
page using struts,
<bean:write name="location" property="Locationname"/>
<bean:write name="location" property=" Locationcity"/>
<bean:write name="location" property=" Locationcountry"/>
<logic:iterate name="location" property="rooms" id="room">
<bean:write name="room" property="roomname"/>
<bean:write name="room" property="roomdescription"/>
</logic:iterate>
I suggest you study the struts-example came with struts source and
mokey/banana example in struts documentation.
-----Original Message-----
From: Paul Blundell [mailto:[EMAIL PROTECTED]
Sent: March 6, 2003 10:37 AM
To: [EMAIL PROTECTED]
Subject: Iterating through a Map collection of Beans
Does anyone have any examples of code for iterating through a Map
containing
The application is storing data related to a Location. A location can
contain several rooms, so on the form there will be fields such as:
Locationname
Locationcity
Locationcountry
Room1name Room1description
Room2name Room2description
Room3name Room3description
The room will be defined as a bean, the bean holding name and
description.
The Location will hold all the room beans in a Map.
Could anyone show me/point me at some example JSP and Java code which is
similar to what I am trying to do here
Thanks
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]