how to do paging in jsp

how to do paging in jsp

Page 1 of 1

1 Replies - 9950 Views - Last Post: 16 February 2007 - 07:08 AM Rate Topic: **--- 1 Votes

#1 lmw_s   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 15-February 07

how to do paging in jsp

Posted 16 February 2007 - 02:04 AM

I want to know how to do paging in a jsp. Im getting data from a database as an object list and show them using a display:table. I want to show 10 records in one page and rest like in next pages. So can you give me a sample code. I have shown here my code in the jsp where I use to get data. Pls tell me what are the tags I need to add and anything to be changed in sql queries and so on. :)

 <display:table border = "0" width="100%" scope="session"  pagesize="15" offset="15" name="recievedReportQueues" styleClass="table_report" requestURI="">
					  <display:column  property="id" title="Id"  align="center" href="" paramId="recievedSMSValueSid" paramProperty="id"  sort="true" width="10%"/>	
					  <display:column property="module" title="Module" width="10%" align="center" sort="list"/> 
					  <display:column property="modifiedDateOnly" title="Updated Date" width="10%" align="left" sort="list" maxLength="15" />				   
					  <display:column property="modifiedTimeOnly" title="Updated Time" width="20%" align="left" sort="list" maxLength="15" />				   
					  <display:column property="mobileNo" title="Sender Mobile Number" width="15%" align="left" sort="list"  />
					  <display:column property="status" title="Status" align="left" width="10%" sort="list"/>					  
					  <display:column property="message" title="Message Text" width="35%" align="left" sort="list"  maxLength="40"/> 
					  <display:setProperty name="sort.behavior" value="list" />
					  <display:setProperty name="paging.banner.include_first_last" value="true" />
					  <display:setProperty name="table_report" value="true" />

Please help me with this.... :huh:

Is This A Good Question/Topic? 0
  • +

Replies To: how to do paging in jsp

#2 Amadeus   User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 250
  • View blog
  • Posts: 13,507
  • Joined: 12-July 02

Re: how to do paging in jsp

Posted 16 February 2007 - 07:08 AM

Do you want to page the results from the database (which means the query will be re-run on the next set when the next page is clicked) or do you want to pull all records from the database, and simply page through the entire set using jsp?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1