You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Shakti <sh...@hotmail.com> on 2003/11/22 11:09:04 UTC
Re: :Problem in grouping using logic iterate & logic equal: Somewht solved
Hi,
it was really a gr8 reference for my problem ... but i am not sure whether
my Team will allow new libs to be added to the current version ...
still i will try n find out some other ( CRUDE SOLUTION .. ) for this
grouping. . but in new projects i think we will consider these libraries as
they will be really useful in reducing the presentation probs that we face
.. :-) ..
Thanks David !!!!!!!!
:-) ..
bye
Shakti
----- Original Message -----
From: "David Friedman" <hu...@ix.netcom.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>;
<jh...@patriot.net>
Sent: Saturday, November 22, 2003 3:21 PM
Subject: RE: Still no reply for :Problem in grouping using logic iterate &
logic equal
> This sounds like a job for ... the DisplayTag Taglib.
> See this example page:
>
> http://www.displaytag.org/example-grouping.jsp
>
> Your formbean looks pretty simple:
> (Should I ask why your properties start with a capital letter?)
> myteam.teamName
> myteam.Firstname
> myteam.Midinitial
> myteam.Lastname
>
> If so it's practically build for the displaytag library, might
> even work a bit like this:
>
> <displaytag:table name="myTeamFormBean.allTeams">
> <displaytag:column property="teamName" title="Team Name" group="1"/>
> <displaytag:column property="Firstname" title="First Name" />
> <displaytag:column property="Midinitial" title="Middle Initial" />
> <displaytag:column property="Lastname" title="Last Name" />
> </displaytag:table>
>
> If you use the displaytag library, follow their directions
> about the handful of apache commons .jar files that need
> to be updated!!!!!!
>
> Regards,
> David
>
> -----Original Message-----
> From: Joe Hertz [mailto:jhertz@patriot.net]
> Sent: Saturday, November 22, 2003 4:39 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Still no reply for :Problem in grouping using logic iterate
> & logic equal
>
>
> Your doing a bean:write of the team name inside of your iterate, so
> yeah, the team name is going to show up on every iteration.
>
> What approaches have you tried already? Which is the part your not
> getting?
>
>
> > -----Original Message-----
> > From: Shakti [mailto:shakti_simanta@hotmail.com]
> > Sent: Saturday, November 22, 2003 4:11 AM
> > To: Struts Users Mailing List
> > Subject: Still no reply for :Problem in grouping using logic
> > iterate & logic equal
> >
> >
> >
> > > Hi,
> > > "MyTeamFormBean "contains an arraylist "allTeams" having
> > > MyTeamRowBean with attributes :
> > > String teamName, first, middle & last
> > >
> > > <logic:iterate id="myteam" name="myTeamFormBean"
> > property="allTeams">
> > > <tr>
> > > <td ><B><bean:write name="myteam"
> > property="teamName" /></B></td>
> > > <td> </td>
> > > </tr>
> > > <tr>
> > > <td> </td>
> > > <td> <bean:write name="myteam"
> > > property="Firstname"/> <bean:write name="myteam"
> > > property="Midinitial"/> <bean:write name="myteam"
> > property="Lastname"/>
> > > </td>
> > > </tr>
> > > </logic:iterate>
> > >
> > > Which produces something like this ....
> > >
> > > Team Name 1
> > > Firstname1 1 Midinitial1 1 Lastname 1 1
> > > Team Name 1
> > > Firstname1 2 Midinitial1 2 Lastname 1 2
> > > Team Name 1
> > > Firstname1 3 Midinitial1 3 Lastname 1 3
> > > Team Name 2
> > > Firstname2 1 Midinitial2 1 Lastname 2 1
> > > Team Name 2
> > > Firstname2 2 Midinitial2 2 Lastname 2 2
> > > Team Name 2
> > > Firstname2 3 Midinitial2 3 Lastname 2 3
> > > Team Name 3
> > > Firstname3 1 Midinitial3 1 Lastname 3 1
> > > Team Name 3
> > > Firstname3 2 Midinitial3 2 Lastname 3 2
> > > Team Name 3
> > > Firstname3 3 Midinitial3 3 Lastname 3 3
> > > Team Name 4
> > > Firstname4 1 Midinitial4 1 Lastname 4 1
> > > Team Name 4
> > > Firstname4 2 Midinitial4 2 Lastname 4 2
> > > Team Name 4
> > > Firstname4 3 Midinitial4 3 Lastname 4 3
> > > Team Name 5
> > > Firstname5 1 Midinitial5 1 Lastname 5 1
> > > Team Name 5
> > > Firstname5 2 Midinitial5 2 Lastname 5 2
> > > Team Name 5
> > > Firstname5 3 Midinitial5 3 Lastname 5 3
> > >
> > >
> > > but i want something like this. ..........
> > >
> > >
> > > Team Name 1
> > > Firstname1 1 Midinitial1 1 Lastname 1 1
> > > Firstname1 2 Midinitial1 2 Lastname 1 2
> > > Firstname1 3 Midinitial1 3 Lastname 1 3
> > > Team Name 2
> > > Firstname2 1 Midinitial2 1 Lastname 2 1
> > > Firstname2 2 Midinitial2 2 Lastname 2 2
> > > Firstname2 3 Midinitial2 3 Lastname 2 3
> > > Team Name 3
> > > Firstname3 1 Midinitial3 1 Lastname 3 1
> > > Firstname3 2 Midinitial3 2 Lastname 3 2
> > > Firstname3 3 Midinitial3 3 Lastname 3 3
> > > Team Name 4
> > > Firstname4 1 Midinitial4 1 Lastname 4 1
> > > Firstname4 2 Midinitial4 2 Lastname 4 2
> > > Firstname4 3 Midinitial4 3 Lastname 4 3
> > > Team Name 5
> > > Firstname5 1 Midinitial5 1 Lastname 5 1
> > > Firstname5 2 Midinitial5 2 Lastname 5 2
> > > Firstname5 3 Midinitial5 3 Lastname 5 3
> > >
> > >
> > >
> > > can anyone plz help me out in this ...
> > >
> > > Thanks in advance ..
> > > Shakti..
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org