Hi,
if you are using struts 1.x you can use nested tags, look at this link for a
sample
http://www.laliluna.de/struts-nested-iteration-tutorial.html
Thanks,
Nuwan
----- Original Message -----
From: "hk" <[EMAIL PROTECTED]>
To: <user@struts.apache.org>
Sent: Tuesday, May 22, 2007 12:57 AM
Subject: How can I access a collection of object using struts tags?
I have a bean, which has a class that contains a ArrayList of another
class.
In this case, how can I access the property of the last class in a JSP
page.
For example, the business object Movie has a class TitleStores that
contains
a property of titlestores, which is a conllection of a class store. And, I
want to access and ourput a property of a store, such as storeID, name,
etc
by using struts tags, such as bean:write.
================================
public class Movie
{
private String studio = null;
private Genres genres = null; // ArrayList
private TitleStores titleStores = null;
private String rating = null;
private String language = null;
private int availableStock = -1; // For test
private CastMembers castMembers = null; // ArrayList
....
}
public class TitleStores {
private ArrayList titleStores;
private int storeID;
private String name;
private String phone;
private String street;
private String city;
private String state;
private String owner;
private String zipCode;
private String policy;
....}
public class Store {
private int storeID;
private String name;
private String phone;
private String street;
private String city;
private String state;
private String owner;
private String zipCode;
private String policy;
//private Policies policies;
...
}
--
View this message in context:
http://www.nabble.com/How-can-I-access-a-collection-of-object-using-struts-tags--tf3793680.html#a10729836
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
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]