The site I gave you, www.displaytag.org (with source and binaries available
from SourceForge.net), lists plenty of examples and code.  Basically, you
have a collection of objects (usually in request or session scope, but you
can do it in page scope) and set your tag with the columns.  From their
"basic columns" example, if you have a List stored as "test", for each item
you can display the fields id, name, email, status, description using the
below code:

<display:table name="test">
  <display:column property="id" />
  <display:column property="name" />
  <display:column property="email" />
  <display:column property="status" />
  <display:column property="description" />
</display:table>

Just keep in mind the binary updates a few jars to newer versions.  Off the
top of my head, I think it updates (don't pay attention, I just code *grin*)
commons-lang, commons-beanutils, commons-logging, and commons-collections.
But don't worry, they are in the binary distribution's example .war
application and work fine with Struts v1.1 (probably with v1.0 as well).

Also, fancier things are available, such as sorting, grouping, and
downloading the fields as excel, csv, and xml.

Regards,
David

-----Original Message-----
From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 03, 2004 10:27 AM
To: 'David Friedman'; 'Struts Users Mailing List'
Subject: RE: Paging for table...



.Can you please send across the sample code that you have developed???

-----Original Message-----
From: David Friedman [mailto:[EMAIL PROTECTED]
Sent: 03 January 2004 20:57
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: Paging for table...


I use displaytag, www.displaytag.org, for that.

Regards,
David

-----Original Message-----
From: vasudevrao gupta [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 03, 2004 7:40 AM
To: 'Struts Users Mailing List'
Subject: Paging for table...

Hi,

I have a requirement where in user executes a query and gets some x
number
of records.  I have to show the user 1-y records per page and when user
clicks "next" button, he should be be able to see next y number of
records.(Similar to yahoo site ).

Can any one pls tell me if struts frame work provides any inbuilt
framework
to do this kind of paging

Regards
VasudevRaoGupta

Confidentiality Notice

The information contained in this electronic message and any attachments
to
this message are intended
for the exclusive use of the addressee(s) and may contain confidential
or
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or
[EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Confidentiality Notice

The information contained in this electronic message and any attachments to
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or
[EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.

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