The nested tag deals with nested objects. In other words it will deal with
beans in a hierarchal manner. Only if each "master" object in your "master"
collection has a collection of "detail" objects can nested tags work here.
If you want to merge two collections into a display you would be better off
using jstl for that. However, you might be pushing unnecessary logic into
your page.

I am not familiar with how your two different collections are set up. If you
have two action forms with two different collections (questionable practice)
that somehow coincide you will have a difficult time making them mesh on the
page.

If you provide more concrete information on the content of the individual
collections and why you have chosen to have two ActionForms to get data from
you might find more specific help here.

Brandon Goodin
Phase Web and Multimedia
PO Box 85
Whitefish MT 59937
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-----Original Message-----
From: usha [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 14, 2003 11:40 PM
To: Struts Users Mailing List
Subject: Re: iterate tag


Hi Sankaran

my problem is i have a 2 seperate collections. one i am getting from one
ActionForm  and another one getting form another ActionForm. these 2
collections represents master details table data, one is from master
table and another one is from detail table. what my question is can we
use the nested tag to display the in the format like following

gdid : 1

gdid ctrid
1        2
1         3

gdid : 2

gdid ctrid
2        4
2        3


Thanks
usha

Sri Sankaran wrote:

>Following is based on connecting the dots of information you have provided
(remember, not everyone on the list is seeing what you are seeing or is
conversant with your business domain; so please introduce your problem more
clearly)
>
>I *think* what you have is a collection of "gdid"s each of which has a
collection of "ctrid"s.  If so, you can do the following :
>
><nested:iterate
>  property="list-of-gdids">
>  <nested:write property="gdid">  <!-- to display "gdid - 1" -->
>  <!--
>  Static HTML to display the row headings
>  goes here
>  -->
>  <nested:iterate
>    property="list-of-ctrids">
>    <nested:write property="../gdid">
>    <nested:write property="ctrid">
>  </nested:iterate>
></nested:iterate>
>
>Sri
>
>-----Original Message-----
>From: usha [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, February 13, 2003 11:29 PM
>To: [EMAIL PROTECTED]
>Subject: iterate tag
>
>
>Hi
>
>i have requirement like this. i have master and detail table. i wanted
>to display the content like this.
>i wanted to dispaly all the master records under that realted child
>records like i showed below.
>can i use the nested:iterate tag to perform this operation. or what is
>the best way to do this kind of display.
>let say i have the header data  collection and i have a detail data
>collection. how can i compare the header data collection value with
>details data collection value and display the related set of data
>together. can anybody help in this issue.
>
>
>gdid : 1
>
>gdid ctrid
>1        2
>1         3
>
>gdid : 2
>
>gdid ctrid
>2        4
>2        3
>
>Thanks
>usha
>
>
>
>---------------------------------------------------------------------
>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]
>
>




---------------------------------------------------------------------
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]

Reply via email to