Originally posted by rajanikanth bhagavan kanth:
Use Display Tag for pagination....
Regards
Bhagavan R
Thank for u'r reply Bhagavan
I am very confused about paging. I used display tag for pagination.
I have some doubts regarding paging using Struts.
I have 4 links First,Previous,Next,Last.And I want to add one more text box for Enter the page number in text box for select Random page like fifty th page.
I want to retrieve list of say 20(per page record) record from database when user click on
next.
When I am using this tag ( <display:tablename="sessionScope.EmpList" pagesize="20">
<display:setProperty name="paging.banner.placement" value="bottom" />
<display:column property="empJob" title="Job" />
<display:column property="empSal" title="Salary" />
</display:table> ). How can I get the record size from db in first time because the value used pagination like [First/Prev] 1, 2, 3, 4, 5, 6, 7, 8 [Next/Last] . But I don't want fetch all records at first time. The list object get first 100 records for first 5 pages. The user select the 6th page then list object will fecth the value from db except the first 100 records and return this records. It will follow other pages.
I am very confiusing . what can i do? . I want some example code. Ayn one help me. It very urgent. Thanks in Advance.