| Author |
How to display 10 records per page
|
Radha Kethana
Greenhorn
Joined: Jun 11, 2003
Posts: 13
|
|
HI I am developing a struts application. One of the requirement is I need to display 10 records per page out of like 100 records that I receive from Database. Does anybody know how to do this. And also I need to give an option to export all the database records in an xl file. Any website that coverts these topics? Merrill Higginson - I hope you read this. Please help me on these 2 items. Thank you in advance Radha [ October 03, 2008: Message edited by: Bear Bibeault ]
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26496
|
|
"radha", I'm not sure why your question is directed only at Merrill. Does that mean you think only he can help you? In any case, please check your private messages about an important administrative matter.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Shikhar Madhok
Ranch Hand
Joined: Dec 18, 2006
Posts: 95
|
|
Check the August issue of the Javaranch Journal. That has a detailed article on implementing pagination. The part about exporting to excel should be fairly simple. But you will have to fire the query on the database again, and open a new page with the mime type as ms/excel. HTH Shikhar Also please check your private messages
|
He who asks a question is a fool for five minutes; he who does not ask a question remains a fool forever - Chinese proverb
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
Looks like Shikhar gave an excellent response to your question. I'm flattered that you asked for me by name, but this just goes to show that asking a question in an open forum and letting anyone who knows the answer provide it is a better system than just asking one person. As it happens, I haven't had much time to devote to JavaRanch lately, but luckily there are lots of knowledgeable, helpful people out there who can answer questions.
|
Merrill
Consultant, Sima Solutions
|
 |
Nishan Patel
Ranch Hand
Joined: Sep 07, 2008
Posts: 676
|
|
Hi.. you have to use paging for display 10 record out of 100. Display tag which is plug-in for struts paging for limit record per page. Thanks, Nishan Patel.
|
Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
|
 |
Radha Kethana
Greenhorn
Joined: Jun 11, 2003
Posts: 13
|
|
Thank you everyone for quick response and suggestions. I did not mean that Merrill is the only one who can help me. But, I always get exact reply back from him all the time. I thought He will look into the post for sure if I specify the name. I should not have done that. Sorry for the inconvenience that I caused by specifying the name. Greatly appreciate all your responses. Thanks everybody
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26496
|
|
"Radha", Please check your private messages and change your display name before posting again. Accounts with invalid names are subject to closure.
|
 |
Nishan Patel
Ranch Hand
Joined: Sep 07, 2008
Posts: 676
|
|
Hi Radha I think http://sourceforge.net/project/showfiles.php?group_id=73068 this will also help to export all record into xsl file and paging problem with less configuration and code. if you solve your problem reply me.
|
 |
Radha Kethana
Greenhorn
Joined: Jun 11, 2003
Posts: 13
|
|
Jeanne - I changed my display name. Thank you for letting me know the impact of using proper names. Nishan - I will definitely inform you once I implement. Thank you for your response.
|
 |
Nyanas Kandhan
Ranch Hand
Joined: Jan 27, 2009
Posts: 35
|
|
|
Try using display tag for pagination. A simple example can be downloaded from here. Struts Display Tag Pagination and Sorting Example
|
regards,
Nyanaskandhan
|
 |
 |
|
|
subject: How to display 10 records per page
|
|
|