Regarding paging

Hi Friends,
I am having problem with paging concept.I entered 11 records into database.In the 1st page it has to display 10 record and the 11th record should be displayed in the 2nd page.When i am executing my code 1st 10 records are getting displayed in 1st page and when i am clicking on next, 2nd page is showing blank.its not displaying the 11th record.here is the code which i have tried
pager.jsp
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<%@ page import="java.sql.*" %>
<html>
<head>
<title>Pager Tag Library Demo</title>
<%
%>
<style type="text/css">
A.nodec { text-decoration: none; }
</style>
</head>
<body bgcolor="#ffffff">
<table bgcolor="#ffcc00" width="100%" border="0"
     cellspacing="0" cellpadding="2">
</table>
<%
     String style = "css";
     String position = "both";
     int maxPageItems = 10;
%>
<form action="<%= request.getRequestURI() %>" method="post">
<center>
<pg:pager
    items="<%= webPalette.length %>"
    maxPageItems="<%= maxPageItems %>"
    isOffset="<%= true %>"
    export="offset,currentPageNumber=pageNumber"
    scope="request">
<%-- keep track of preference --%>
  <pg:param name="style"/>
  <pg:param name="position"/>
  <pg:param name="maxPageItems"/>
  <%-- the pg:pager items attribute must be set to the total number of
       items for index before items to work properly --%>
    <% if ("both".equals(position)) { %>
    <br>
    <pg:index>
      <% if ("css".equals(style)) { %>
       <jsp:include page="/WEB-INF/jsp/css.jsp" flush="true"/>
      <% } %>
    </pg:index>
  <% } %>
  <hr>
  <table width="90%" cellspacing="4" cellpadding="4">
<tr style="background-color:efefef;" align=center>
    <td><b>FirstName</b></td>
    <td><b>LastName</b></td>
    <td><b>EmployeeId</b></td>
    <td><b>DOJ(MM-DD-YYYY)</b></td>
    <td><b>EmailId</b></td>
</tr>
<%
      Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
      Connection con=DriverManager.getConnection("jdbc:odbc:login");
      Statement ps=con.createStatement();
      ResultSet rs=ps.executeQuery("select * from EmployeeTable order by EmpId");
       while(rs.next())
           String str1=rs.getString(1);
           String str2=rs.getString(2);
           int j=rs.getInt(3);
           String str3=rs.getString(4);
           String str4=rs.getString(5);
     for (int i = offset.intValue(),
              l = Math.min(i + maxPageItems,1);
          i < l; i++)
          %><pg:item>
<tr>
<tr><td><%= str1%></td><td><%=str2%></td><td><%=j%></td><td><%=str3%></td><td><%=str4%></td></tr></pg:item><%
  %>
  </table>
  <hr>
<% if ("both".equals(position)) { %>
  <pg:index>
    <% if ("css".equals(style)) { %>
     <jsp:include page="/WEB-INF/jsp/css.jsp" flush="true"/>
    <% } %>
  </pg:index>
<% } %>
</pg:pager>
</center>
</form>
</body>
</html>
<%!
private static final String BLACK = "#000000", WHITE = "#ffffff";
private static final String[][] webPalette = {
    { WHITE,   BLACK},
    {"#cccccc",BLACK},
    {"#999999",BLACK},
    {"#666666",WHITE},
    {"#333333",WHITE},
    { BLACK,   WHITE},
    {"#ffcc00",BLACK},
    {"#ff9900",BLACK},
    {"#ff6600",BLACK},
    {"#ff3300",WHITE},
    {"#99cc00",BLACK},
    {"#cc9900",BLACK},
    {"#ffcc33",BLACK},
    {"#ffcc66",BLACK},
    {"#ff9966",BLACK},
    {"#ff6633",BLACK},
    {"#cc3300",WHITE},
    {"#cc0033",WHITE},
    {"#ccff00",BLACK},
    {"#ccff33",BLACK},
    {"#333300",WHITE},
    {"#666600",WHITE},
    {"#999900",BLACK},
    {"#cccc00",BLACK},
    {"#ffff00",BLACK},
    {"#cc9933",BLACK},
    {"#cc6633",WHITE}
%>
css.jsp
<%@ page session="false" %>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<%@ page import="java.sql.*" %>
<%
int count = 0;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:login");
Statement st = con.createStatement();
ResultSet res = st.executeQuery("SELECT COUNT(*) FROM EmployeeTable");
while (res.next())
  count = res.getInt(1);
%>
<table width=100% cellpadding=2 cellspacing=0 border=0 bgcolor=e3e9f8>
<tr><td><font face=arial size=2> <b>Records</b></font>
</td><td align=right nowrap width=1%><font face=arial size=-1>
<pg:index export="total=itemCount">
<pg:page export="first,last">
    <%= first %> - <%= last %> of <%= count %>
</pg:page>
<pg:first export="url" unless="current">
 <b><a href="<%=url%>">First Page</a></b> |
</pg:first>
<pg:prev export="url,first,last">
<% int prevItems = (last.intValue() - first.intValue()) + 1; %>
<b><a href="<%=url%>">Previous </a></b>
</pg:prev>
<pg:next export="url,first,last">
<% int nextItems = (last.intValue() - first.intValue()) + 1; %>
| <b><a href="<%=url%>">Next </a></b>
</pg:next>
  </font></td></tr>
</table>
</pg:index>
pager-taglib.tld
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
  "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
  <tlibversion>1.0</tlibversion>
  <jspversion>1.1</jspversion>
  <shortname>pg</shortname>
  <uri>http://jsptags.com/tags/navigation/pager</uri>
  <info>
    The Pager Tag Library is the easy and flexible way to implement paging of
    large data sets in JavaServer Pages (JSP). It can emulate all currently
    known paging styles with minimal effort. It also includes re-usable index
    styles that emulate the search result navigators of popular web sites
    such as Google[sm], AltaVista® and Yahoo!. The Pager Tag Library does most
    of the work for you by dynamically organizing your data set into pages and
    generating a browsable index with virtually any look desired.
  </info>
  <tag>
    <name>pager</name>
    <tagclass>com.jsptags.navigation.pager.PagerTag</tagclass>
    <teiclass>com.jsptags.navigation.pager.PagerTagExtraInfo</teiclass>
    <bodycontent>JSP</bodycontent>
    <attribute>
      <name>id</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>url</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>items</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>maxItems</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>maxPageItems</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>maxIndexPages</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>isOffset</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>index</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>export</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>scope</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>
  <tag>
    <name>param</name>
    <tagclass>com.jsptags.navigation.pager.ParamTag</tagclass>
    <bodycontent>empty</bodycontent>
    <attribute>
      <name>id</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>name</name>
      <required>true</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>value</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>
  <tag>
    <name>item</name>
    <tagclass>com.jsptags.navigation.pager.ItemTag</tagclass>
    <bodycontent>JSP</bodycontent>
    <attribute>
      <name>id</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>
  <tag>
    <name>index</name>
    <tagclass>com.jsptags.navigation.pager.IndexTag</tagclass>
    <teiclass>com.jsptags.navigation.pager.IndexTagExtraInfo</teiclass>
    <bodycontent>JSP</bodycontent>
    <attribute>
      <name>id</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>export</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
  </tag>
  <tag>
    <name>first</name>
    <tagclass>com.jsptags.navigation.pager.FirstTag</tagclass>
    <teiclass>com.jsptags.navigation.pager.JumpTagExtraInfo</teiclass>
    <bodycontent>JSP</bodycontent>
    <attribute>
      <name>id</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>export</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <name>unless</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>
  <tag>
    <name>prev</name>
    <tagclass>com.jsptags.navigation.pager.PrevTag</tagclass>
    <teiclass>com.jsptags.navigation.pager.PageTagExtraInfo</teiclass>
    <bodycontent>JSP</bodycontent>
    <attribute>
      <name>id</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>export</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <name>ifnull</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>
  <tag>
    <name>page</name>
    <tagclass>com.jsptags.navigation.pager.PageTag</tagclass>
    <teiclass>com.jsptags.navigation.pager.JumpTagExtraInfo</teiclass>
    <bodycontent>JSP</bodycontent>
    <attribute>
      <name>id</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>export</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
  </tag>
  <tag>
    <name>pages</name>
    <tagclass>com.jsptags.navigation.pager.PagesTag</tagclass>
    <teiclass>com.jsptags.navigation.pager.PageTagExtraInfo</teiclass>
    <bodycontent>JSP</bodycontent>
    <attribute>
      <name>id</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>export</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
  </tag>
  <tag>
    <name>next</name>
    <tagclass>com.jsptags.navigation.pager.NextTag</tagclass>
    <teiclass>com.jsptags.navigation.pager.PageTagExtraInfo</teiclass>
    <bodycontent>JSP</bodycontent>
    <attribute>
      <name>id</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>export</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <name>ifnull</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>
  <tag>
    <name>last</name>
    <tagclass>com.jsptags.navigation.pager.LastTag</tagclass>
    <teiclass>com.jsptags.navigation.pager.JumpTagExtraInfo</teiclass>
    <bodycontent>JSP</bodycontent>
    <attribute>
      <name>id</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>export</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <name>unless</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>
  <tag>
    <name>skip</name>
    <tagclass>com.jsptags.navigation.pager.SkipTag</tagclass>
    <teiclass>com.jsptags.navigation.pager.PageTagExtraInfo</teiclass>
    <bodycontent>JSP</bodycontent>
    <attribute>
      <name>id</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>export</name>
      <required>false</required>
      <rtexprvalue>false</rtexprvalue>
    </attribute>
    <attribute>
      <name>ifnull</name>
      <required>false</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
    <attribute>
      <name>pages</name>
      <required>true</required>
      <rtexprvalue>true</rtexprvalue>
    </attribute>
  </tag>
</taglib>Can anyone please help me in this issue.I am using NetBeans IDE.
Thanks and Regards,
V.S.Ravi Kiran Balusu.

Hi Friends,
I have tried in other way but not able to retrieve records.I am posting the code which i have tried so far.Can anyone please guide me.here is the code.
page.jsp
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<%@ page import="java.sql.*" %>
<html>
<head>
<title>Pager Tag Library Demo</title>
<%
%>
<style type="text/css">
A.nodec { text-decoration: none; }
</style>
</head>
<body bgcolor="#ffffff">
<table bgcolor="#ffcc00" width="100%" border="0"
     cellspacing="0" cellpadding="2">
<tr>
</tr>
</table>
<%
    String style = "css";
     String position = "both";
     int maxPageItems = 10;
     java.util.Enumeration e=request.getParameterNames();
     int count = 0;
     Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
     Connection con=DriverManager.getConnection("jdbc:odbc:login");
     Statement st = con.createStatement();
     ResultSet res = st.executeQuery("SELECT COUNT(*) FROM EmployeeTable");
     while (res.next())
      count = res.getInt(1);
%>
<form action="<%= request.getRequestURI() %>" method="post">
<center>
<pg:pager
    items="<%= count %>"
    maxPageItems="<%= maxPageItems %>"
    isOffset="<%= true %>"
    export="offset,currentPageNumber=pageNumber"
    scope="request">
<%-- keep track of preference --%>
  <pg:param name="style"/>
  <pg:param name="position"/>
  <pg:param name="maxPageItems"/>
  <%-- the pg:pager items attribute must be set to the total number of
       items for index before items to work properly --%>
    <% if ("both".equals(position)) { %>
    <br>
    <pg:index>
      <% if ("css".equals(style)) { %>
       <jsp:include page="/WEB-INF/jsp/css.jsp" flush="true"/>
      <% } %>
    </pg:index>
  <% } %>
  <table width="90%" cellspacing="4" cellpadding="4">
<tr style="background-color:efefef;" align=center>
<td><b>FirstName</b></td>
<td><b>LastName</b></td>
<td><b>EmployeeId</b></td>
<td><b>DOJ(MM-DD-YYYY)</b></td>
<td><b>EmailId</b></td>
</tr>
<% while(e.hasMoreElements())
          %>
       <br> <pg:item>
       <%= e.nextElement() %>
       </pg:item>
     <%
%>
  </table>
<% if ("both".equals(position)) { %>
  <pg:index>
    <% if ("css".equals(style)) { %>
     <jsp:include page="/WEB-INF/jsp/css.jsp" flush="true"/>
    <% } %>
  </pg:index>
<% } %>
</pg:pager>
</center>
</form>
</body>
</html>
css.jsp
<%@ page session="false" %>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<table width=100% cellpadding=2 cellspacing=0 border=0 bgcolor=e3e9f8>
<tr><td><font face=arial size=2> <b>Records</b></font>
</td><td align=right nowrap width=1%><font face=arial size=-1>
<pg:index export="total=itemCount">
<pg:page export="first,last">
    <%= first %> - <%= last %> of <%= total %>
</pg:page>
<pg:first export="url" unless="current">
 <b><a href="<%= url %>">First Page</a></b> |
</pg:first>
<pg:prev export="url,first,last">
<% int prevItems = (last.intValue() - first.intValue()) + 1; %>
<b><a href="<%= url %>">Previous </a></b>
</pg:prev>
<pg:next export="url,first,last">
<% int nextItems = (last.intValue() - first.intValue()) + 1; %>
| <b><a href="<%= url %>">Next </a></b>
</pg:next>
  </font></td></tr>
</table>
</pg:index>Thanks and Regards,
V.S.Ravi Kiran Balusu.

Similar Messages

  • Mac mini slow, especially with Office 2004

    I just upgraded from an iMac flat screen to a 1.83 GHz Mac Mini. The move was easy and I'm not experiencing any major bugs, but for a lot of things I'm finding the mini slower than my old iMac. In particular, the two Office 2004 applications I use all the time, Word and Entourage, take a lot longer to open and move around in, with a lot of rotating rainbow time. I installed Office 2004 when I got the mini, but I'd transferred Office X over from the older computer. Would it help to take off Office X? Any ideas?
    1.83 GHz Mac Min   Mac OS X (10.4.8)  

    As per the reply to your other post with the same question:
    This is not something to worry about or be concerned with. Firstly, the paging counts will depend on how long the system has been running since the last boot, but MacOS is designed to actively page out and in, so in itself, the fact your system shows it is doing so means nothing at all.
    If your computer is exhibiting some indication of a problem, I suggest you start a new thread here and describe what you are experiencing. That way we can help you directly with the specifics of your problem. On the other hand, if you have just seen the comments regarding paging and system performance and have checked your own Mac to see what it's doing - the answer is that in the absence of an indication of a problem, it's very likely doing exactly what it ought to be doing!

  • Mac mini slow speed - with pauses

    My Mac Mini crashed and I had to reinstall.
    Now it runs partly very slow, even with pauses, where I have to wait for responses.
    Start-up takes long minutes.
    System profiling tools says HD activity reaches a max of 8MB/s.
    CPU workload looks far below 100%.
    Is there any experience with this?
    How can I check and find out more precise the reason for slowing down?
    Mac Mini:  4GB 1067 MHz DDR3 RAM, 500 GB HD, 2,66 GHz Intel Core 2 Duo, OS X 10.7.2 everything updated

    As per the reply to your other post with the same question:
    This is not something to worry about or be concerned with. Firstly, the paging counts will depend on how long the system has been running since the last boot, but MacOS is designed to actively page out and in, so in itself, the fact your system shows it is doing so means nothing at all.
    If your computer is exhibiting some indication of a problem, I suggest you start a new thread here and describe what you are experiencing. That way we can help you directly with the specifics of your problem. On the other hand, if you have just seen the comments regarding paging and system performance and have checked your own Mac to see what it's doing - the answer is that in the absence of an indication of a problem, it's very likely doing exactly what it ought to be doing!

  • HTTP Rest api call maximum results

    Hi all,
    I´m trying to get data from the portal using the follwoing rest api call:
    http://<ServerURL>/RequestCenter/nsapi/serviceitems/serviceitemsubscription
    but it only gives me 20 results, which I believe it is the default, is there any way to get all the elements or a way to page all the results?
    Thanks
    Alex.

    Hi all,
    found some info on the Integration guide (Cisco Prime Service Catalog 10.0 Integration Guide) page 222, there is a section regarding Paging, but the max results are 50.
    I was looking a simple way to export / import info from the portal, but it seems Java is going to be neded instead http nsapi.
    Regards,
    Alex.

  • Pocket Mac Slow Sync with Entourage 2004

    It takes as much as 2 hours to sync my contacts, calendar, and tasks from Entourage 2004 to my Blackberry Cuve 8330.
    Does anyone have a solution or suggestion? I appreciate your assistance.

    As per the reply to your other post with the same question:
    This is not something to worry about or be concerned with. Firstly, the paging counts will depend on how long the system has been running since the last boot, but MacOS is designed to actively page out and in, so in itself, the fact your system shows it is doing so means nothing at all.
    If your computer is exhibiting some indication of a problem, I suggest you start a new thread here and describe what you are experiencing. That way we can help you directly with the specifics of your problem. On the other hand, if you have just seen the comments regarding paging and system performance and have checked your own Mac to see what it's doing - the answer is that in the absence of an indication of a problem, it's very likely doing exactly what it ought to be doing!

  • HT201412 My response time on games is slow. Frustrating. Since upload of new Ios6

    Response time on games is very slow. Zynga games. My other iPad does not have this problem

    This is not something to worry about or be concerned with. Firstly, the paging counts will depend on how long the system has been running since the last boot, but MacOS is designed to actively page out and in, so in itself, the fact your system shows it is doing so means nothing at all.
    If your computer is exhibiting some indication of a problem, I suggest you start a new thread here and describe what you are experiencing. That way we can help you directly with the specifics of your problem. On the other hand, if you have just seen the comments regarding paging and system performance and have checked your own Mac to see what it's doing - the answer is that in the absence of an indication of a problem, it's very likely doing exactly what it ought to be doing!

  • Paging is not working in xslt dataview webpart

    Hi,
        Problem: Paging is not working in combined views, created by using linked data source
        Decription: Created a combined view using 3 different lists with merge option and enabled paging and grouping. Paging is not working and I have set display sets up to 30 items. Kindly provide any possible scenarious which causes this issue
    and any solutions.
    Thanks
    Razvi444

    Hi Razvi444,
    I assume you created the view web part as the link below:
    http://sp2013.blogspot.com/2013/11/two-sharepoint-lists-in-dataview-linked.html
    After that, we could add web part on our site page by insert > web part > miscellaneous > data source name. By default, the data source is set to display sets of 10 items in Paging.
    If you would like to switch it to 30 items, please save it and save the web part to Site Gallery as well. Then give it a new name and re-add the web part to our page.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to resolve the error " low paging memory"

    HI all ,
    I developed a report, which is running fine in development and in quality , but when it runs on production , it shows the dump 'low paging memory'. how to resolve this , can any one sujjest please ?

    Hi,
    1) Run a trace ST05 in ur quality system and fine tune the memory consuming select queries.
    2) Discuss with the basis regarding this error, probably they can help you out by increasing some space in pRODN.
    Regards
    Subbu

  • Error with paging action handler

    We are using the proposed action handler from Steve Muench's book for stateless paging to our highest confidence.
    The problem is that after some days the paging parameter p gets always a wrong value. We think it is the total rowcount, because we implemented a test-parameter.
    From then displaying a page starts always (?) with the last page. If this situation occurs it happens in different (!) applications, so it isn't a parameter side effect.
    There is not p session or cookie parameter who could override the silent work of the action handler.
    We are using the XSQL servlet 1.0.4.1 under Red Hat Linux 7.0 with an Oracle 8.1.7 database. Servlet container is Tomcat 3.2 with JDK 1.3 from Sun.
    Stopping Tomcat and restarting it solves the problem (for some time).
    Do you have any hint for us ?
    Best regards
    Andreas Saake
    null

    As I can see it's an error from Paging.jar.
    I do an initial call to a XSQL page with a select resultset of 38 rows, for example. With a pagesize of 20 rows I should get 2 pages and having current-page set to 1.
    But what I get is a corrected value (by Paging.jar) of current-page, which starts with page 2. The further paging in my application is ok.
    I've extended the paging handler with a variable called test-paged, which reads the paramater p and stores it in the output tree. Then I dislay the XSQL-page without any stylesheet and get a value of 38 in test-page.
    Below is an excerpt of my paging.jar:
    ---- Start excerpt
    import oracle.xml.xsql.*;
    import oracle.xml.parser.v2.*;
    import org.w3c.dom.*;
    import java.net.*;
    import java.util.StringTokenizer;
    import java.sql.SQLException;
    public class Paging extends XSQLActionHandlerImpl {
    private static final String PAGE_PARAM_NAME = "p";
    private static final String ROWSPERPAGE = "rows-per-page";
    private static final String TARGETPAGEARGS = "url-params";
    private static final String TARGETSORTARGS = "sort-params";
    public void handleAction(Node root) throws SQLException {
    XSQLPageRequest req = getPageRequest();
    Element actElt = getActionElement();
    // Get the count query from the action element content
    String query = getActionElementContent();
    // Get the number of rows per page, defaulting to 10
    long pageSize = longVal(getAttributeAllowingParam(ROWSPERPAGE,actElt),10);
    long totalRows = longVal(firstColumnOfFirstRow(root,query),0);
    long curPage = longVal(variableValue(PAGE_PARAM_NAME,actElt),1);
    long testPage = longVal(variableValue(PAGE_PARAM_NAME,actElt),1);
    // Get the name of the current page to use as the target
    String pageName = curPageName(req);
    // Get any URL parameter names that need to be echoed into paging URL's
    String pageArgs = getAttributeAllowingParam(TARGETPAGEARGS,actElt);
    // Get any URL parameter names that need to be echoed into paging URL's
    // FOR SORTING
    String sortArgs = getAttributeAllowingParam(TARGETSORTARGS,actElt);
    // Calculate the total number of pages
    long totalPages = totalRows / pageSize;
    long fract = totalRows % pageSize;
    if (fract > 0) totalPages++;
    // Make sure current page is between 1 < cur < totalPages
    if (curPage < 1) curPage = 1;if (curPage > totalPages) curPage = totalPages;
    // Create the <paging> fragment to add to the "data page"
    Document d = actElt.getOwnerDocument();
    Element e = d.createElement("paging");
    root.appendChild(e);
    addResultElement(e,"total-rows",Long.toString(totalRows));
    addResultElement(e,"total-pages",Long.toString(totalPages));
    addResultElement(e,"test-page",Long.toString(testPage));
    addResultElement(e,"current-page",Long.toString(curPage));
    --- END Excerpt
    Thanks,
    Andreas
    null

  • Issue with ADF table range paging and sorting

    Hello,
    We have a requirement to support pagination in ADF tables. For this, we have made use of Range paging access mode in the view object level. The paging works perfectly fine with this. But we have another requirement of letting the user do a sort on the table (Yes!! The paginated table). The sort should be applied on all rows in the db and the control should return to the first row.
    Applying sort as it is provided by the fwk, sorts the records in the obtained range only. So we have over ridden the Sort listener in Managed bean for this and are able to acheive the sorting of all rows through a AM method call. We are seeing a problem after this. If the sort action is applied to the key attribute then the previous and next range navigation works fine. If the same action is applied to non-key field, then some times (yea!! This is not consistent) the next set is not fetched.
    Here is the code snippet that is called on Next navigation:
    Map<String,Object> pfScope = AdfFacesContext.getCurrentInstance().getPageFlowScope();
    Object objPageNumber = pfScope.get("pageNumber");
    int pageNumber = 0;
    if(null != objPageNumber)
    pageNumber = new Integer(objPageNumber.toString()).intValue();
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    JUCtrlRangeBinding view = (JUCtrlRangeBinding)bindings.getControlBinding("GeDmRequestVO");
    int iRange = getTable().getAutoHeightRows();
    int currentPage = view.getIteratorBinding().getNavigatableRowIterator().getRangeStart()/(iRange + 1);
    System.out.println("Before " + view.getIteratorBinding().getNavigatableRowIterator().getRangeStart());
    System.out.println("Current : " + currentPage);
    System.out.println("Page Number : " + pageNumber);
    System.out.println("Range : " + iRange);
    System.out.println("Value : " + iRange*(currentPage + pageNumber));
    view.getIteratorBinding().getNavigatableRowIterator().scrollRange(iRange*pageNumber);
    System.out.println("After " + view.getIteratorBinding().getNavigatableRowIterator().getRangeStart());
    Although, the new values are not refreshed in the table, the SOPs for before and after print the proper range sizes. And as I mentioned above, the above code works perfectly fine if there is no sort applied or when key attribute is sorted.
    Would appreciate your help on this regard with navigation after non-key attribute sort.
    Thanks,
    Chitra.

    Hi Chitra,
    Can you specify some links to implement RangePaging.....We need to implement pagination.If possible can you share the code or specify the steps how you achieved it.
    Thanks

  • Paging Problem in JSP using request.

    Dear Friends,
    I have an issue in JSP paging using request. In my action servelet my code is set as follows.
    request.setAttribute("clients", clients);
    In JSP I have
    <%ClientDataBean[] clients = (ClientDataBean[]) request.getAttribute("clients");
    If I navigate to another page it becomes null. I could make through session. If there any way to handle request param while navigating between pages.
    Thanks,

    public class PagingBean{
       private int pageSize;
       private int pagePointer;
       private int pages;
       private int startPage;
       private int lastPage;
       private List dataList;
       private List resultantList;
       //respective getters and setters
       // write getResultantList() method in such a way that it gives the resultantList which is to be displayed as per persisted   values of all other properties in Bean and use it for displaying on your view.
    }write your backing bean / Action Class to manage the respective persisted values according to the actions done.
    Or if you are not intrested in re-inventing the wheel please go ahead and use custom built solutions.
    please google for finding such.
    could startup with the one below
    http://java-source.net/open-source/jsp-tag-libraries
    REGARDS,
    RaHuL

  • [Logical Standby] Which table/SQL caused paging-out

    We have a Primary-Logical DR configuration.
    Recently, it has a problem with the logical: it's continuously paging out data from some transactions:
    SELECT SUBSTR(name, 1, 40) AS NAME, SUBSTR(value,1,32) AS VALUE FROM GV$LOGSTDBY_STATS;
    number of preparers     3
    number of appliers     18
    maximum SGA for LCR cache     4095
    parallel servers in use     24
    maximum events recorded     1000000
    preserve commit order     TRUE
    transaction consistency     FULL
    record skip errors     Y
    record skip DDL     Y
    record applied DDL     N
    record unsupported operations     Y
    coordinator state     IDLE
    transactions ready     7
    transactions applied     0
    coordinator uptime     9646
    realtime logmining     Y
    apply delay     0
    Log Miner session ID     1
    txns delivered to client     1068651
    DML txns delivered     1017135
    DDL txns delivered     15
    CTAS txns delivered     0
    Recursive txns delivered     51501
    Rolled back txns seen     23463
    LCRs delivered to client     11682189
    bytes of redo processed     14475529508
    bytes paged out     1482524624
    seconds spent in pageout     8922
    bytes checkpointed     0
    seconds spent in checkpoint     0
    bytes rolled back     7500032
    seconds spent in rollback     90
    seconds system is idle     0
    SELECT SID, SERIAL#, SPID, TYPE, HIGH_SCN, STATUS_CODE, STATUS
    FROM GV$LOGSTDBY_PROCESS
    ORDER BY TYPE, SPID;
    ANALYZER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    APPLIER     16116     ORA-16116: no work available
    BUILDER     16243     ORA-16243: paging out 4752 bytes of memory to disk
    COORDINATOR     16116     ORA-16116: no work available
    PREPARER     16127     ORA-16127: stalled waiting for additional transactions to be applied
    PREPARER     16127     ORA-16127: stalled waiting for additional transactions to be applied
    PREPARER     16127     ORA-16127: stalled waiting for additional transactions to be applied
    READER     16127     ORA-16127: stalled waiting for additional transactions to be applied
    select xidusn, xidslt, xidsqn, count(*) from system.logmnr_spill$
    group by xidusn, xidslt, xidsqn;
    996     46     249     254
    710     37     838     825
    623     3     706     254
    478     7     42564     254
    765     38     649     824
    42     6     415494     3729
    264     35     4817     3738
    How can we identify the table/SQL to skip & instantiate it later so the logical DB will not being lag far behind.
    Thank you.

    Hi,
    Best way to find SQL is to mine the current archive log getting applied on standby and check for the SQL, you might not get the exact SQL, but you will get the object which is getting updated.
    Or
    You can use AWR report from logical standby of this time to find the update statement which is resource extensive.
    There is no way to find the exact SQL on primary which is causing the issue on standby.
    Regards
    Anudeep

  • Regarding Portal Performance

    HI friends:
       after some time running, Portal memory seems to be overflow, users can't log onto the
    system, error  says iviews couldn't be reached,  when restart server, everything recover,
    could you please tell me how release those memory which seems not to be released automatically
    thank you very much

    Hello ,
    You need to set JVM Parameter to collect the Heap Dump, Core Dump ,
    Add jvm parameters:
    -Xmx30m -XX:+HeapDumpOnOutOfMemoryError (SUN JVM) to limit the maximum to 30MB and
    trigger a heap dump when out of memory error occurred
    -Xdump:system:events=user,request=exclusiveprepwalkcompact for manually triggering of core dump
    Issues could be following,
    Long GC Pause Times for Class unloading times , High Paging in your system.
    Frquent Garbage Collection for Insufficient heap size for the nursery area & tenure area.
    Realu201D OOM, where a new allocation request can not be satisfied by the JVM.
    I will advise you to create an OSS Message for this issue and follow the instruction based on the issue.
    While there will be system hung situation , need to collect heap , core and thread dump from where you can start investigation.
    As result , you may need to upgrade your JVM / Change in JVM Parameter / Increasing Hardware resource.
    Regards
    Sumanta

  • After Creating a RecordSet using Wizard, Unable to Create RecordSet Paging - Error Occurs

    I created a record set using the wizard and it tested just fine using the test button.  So my next step was to create the "RecordSet Paging" "Move to First Record", whe I select this I get the error "Before using this Server Behavior, please create a record set"
    The record set is there, it is even checked off in the binding list as being there, yet I can not do anything, I even went in and deleted it and tried again with the same result, this is getting very annoying and is causing me a lot of extra work.
    Is this a BUG!!!
    I have seen this issue several times now.
    Running Version 11.0 build 4993
    Signed
    Frustrated!!!!!

    Hi,
    For questions regarding dynamic site development,  hop over to the following forum.  You'll get better answers there.
    Dreamweaver Application Development Forum
    http://forums.adobe.com/community/dreamweaver/dreamweaver_development?view=discussions
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Paging with JDBC

    Hi
    What is the best way to do paging with JDBC when using PL/SQL Cursor. I want to create DAOs that access PL/SQL Cursors with a paging mechanism. The DAO must be stateless.
    Regards,
    Nestor Boscan

    Nestor,
    While I'm not trying to take away from Mikael's suggestion, the way I do it (which was implemented before the existence of "OracleCachedRowSet") is to maintain a scrollable "ResultSet" on the server, and send "Collection"s to the client. But beware of very large "ResultSet"s, because the Oracle JDBC driver implements scrollable "ResultSet"s via client memory.
    In any case, paging has been discussed previously in this forum. Did you try searching the forum archives?
    Good Luck,
    Avi.

Maybe you are looking for

  • CUSTOMER_REL - Business partner not created; duplicate check on address

    Hello Colleagues I have a problem during CUSTOMER_REL replication from ERP to CRM. In r3am1 object looks fine but in some BDoc following error appears: Assignment person - address exists already Message no. AM038 and the Business Partner for Contact

  • Mac Mini audio In???

    Hi just bought myself the new mac mini core duo.. I already had a logitech Headset : http://www.logitech.com/index.cfm/products/details/CA/EN,crid=103,contentid=7511 ,detail=2 It doesnt seem to work with the mac (and only the mac) they say it needs a

  • Comes With Music - "Unable to acquire license" err...

    I have a N97 with Comes With Music. Since the past week, I have been unable to download tracks from the Music Store. I log in to my CWM account as usual, but everytime i click on the download button after selecting a track, it just gives me the error

  • Error while installing ovi store on windows xp (ju...

    when i try to install i get : installation operation failed with error code : 3 i just installed my fresh windows xp with all drivers any idea if im missing a softwear or something?

  • Error when deploying Visual composer model in NWDS

    Hello Experts, I am trying to run Visual composer model from inside NWDS. I have included a Web Dynpro application (with a public part) in the VC model. When the VC model is compiled, it successfuly compiles and completes, However when i try to deplo