aspose file tools*
The moose likes Other Open Source Projects and the fly likes please help regarding pagination Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "please help regarding pagination" Watch "please help regarding pagination" New topic
Author

please help regarding pagination

gayatri umesh
Greenhorn

Joined: Aug 26, 2009
Posts: 17
<%@ taglib uri="/WEB-INF/lib/pagertaglib.tld" prefix="pg" %>
<pg:pager export="currentPageNumber=pageNumber">
<pg:item>
my search data..
</pg:item>
<pg:index>
<pg:pages><%
if (pageNumber.intValue() < 10) {
%> <%
}
if (pageNumber == currentPageNumber) {
%><b><%= pageNumber %></b><%
} else {
%><a href="<%= pageUrl %>"><%= pageNumber %></a><%
}
%>
</pg:pages>
</pg:index>
</pg:pager>

When i run this on the server, it takes indefinite time to load... When i give stop loading current page, the first 10 results are displayed but the links to the next pages dont appear...... Kindly guide how to solve....I am using websphere application server 6.... working in rationl application developer........

I also tried using <pg:paging> tag

//styleDetails1.jsp
<%@ taglib uri="/WEB_INF/lib/pager-taglib.tld" prefix="pg"%>
<pg:paging pageSize="2">
<pg:item>
my logic..</pg:item>
<pg:index>
<pg:page><%=thisPage%></pg:page>
</pg:index>
</pg:paging>

here, the results are displayed for the first page and the links for the next pages are displayed... but when i click on the link to any of the next pages, it says web page cannot be displayed and the error is:
Could not invoke service() method on servlet /styleDetails1.jsp
Exception thrown:java.lang.NullPointerException

Kindly help!!!
Jaydeep Mazumdar
Greenhorn

Joined: Aug 26, 2009
Posts: 23
Can you briefly describe the problem that you are trying to solve?

Just the code by itself does not explain anything.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: please help regarding pagination