What you plan to do looks like a "join" to me. So if you can't do it
directly with SQL, I would do that join in the Action class to populate
one joined collection that you simple iterate once over.

If you really need to do it in your jsp, try similar to:

<logic:iterate id="master" name="myform" property="mastertable">
        <logic:iterate id="detail" name="myform" property="detailtable">
                <bean:define id="which" name="detail" property="ctrid"/>
                <logic:equal name="master" property="gdid" value="<%=
which.toString() %>">
                        <bean:write.../>
                </logic:equal>
        </logic:iterate>
</logic:iterate>


Just a brain dump... Don't know if it works already like this...
Michael

> -----Original Message-----
> From: usha [mailto:[EMAIL PROTECTED]] 
> Sent: Samstag, 15. Februar 2003 07:40
> 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