Implementing Pagination in ATG

Hi,
We have a listing page where we show all mobiles and must show pagination 1, 2, 3, 4 .. Next.
How to implement this in ATG. is there any Out of the Box component that supports this? please help.
Thanks
Gopi

Hi,
there is a Knwoledge Article that may help you here:
Creating Pagination for Repository Search Results (Doc ID 1037655.1)
That is if you have access to MOS.
Dave

Similar Messages

  • How to implement pagination in atg

    Hi,
    I am new to atg and wants to implement pagination in atg.
    Please let me know how to start with it?

    Hi,
    I have done something like this.
    Please see the below as for your requirement-
    1)input.jsp:-
    *<%@ taglib uri="/dspTaglib" prefix="dsp" %>*
    *<%@ page import="atg.servlet.*" %>*
    *<dsp:page>*
    *<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">*
    *<html xmlns="http://www.w3.org/1999/xhtml">*
    *<head>*
    *<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />*
    *<title>CSS Pagination Style Template</title>*
    *<style type="text/css">*
    *<!--*
    *#tnt_pagination {*
    *     display:block;*
    *     text-align:left;*
    *     height:22px;*
    *     line-height:21px;*
    *     clear:both;*
    *     padding-top:3px;*
    *     font-family:Arial, Helvetica, sans-serif;*
    *     font-size:12px;*
    *     font-weight:normal;*
    *#tnt_pagination a:link, #tnt_pagination a:visited{*
    *     padding:7px;*
    *     padding-top:2px;*
    *     padding-bottom:2px;*
    *     border:1px solid #EBEBEB;*
    *     margin-left:10px;*
    *     text-decoration:none;*
    *     background-color:#F5F5F5;*
    *     color:#0072bc;*
    *     width:22px;*
    *     font-weight:normal;*
    *#tnt_pagination a:hover {*
    *     background-color:#DDEEFF;*
    *     border:1px solid #BBDDFF;*
    *     color:#0072BC;     *
    *#tnt_pagination .active_tnt_link {*
    *     padding:7px;*
    *     padding-top:2px;*
    *     padding-bottom:2px;*
    *     border:1px solid #BBDDFF;*
    *     margin-left:10px;*
    *     text-decoration:none;*
    *     background-color:#DDEEFF;*
    *     color:#0072BC;*
    *     cursor:default;*
    *#tnt_pagination .disabled_tnt_pagination {*
    *     padding:7px;*
    *     padding-top:2px;*
    *     padding-bottom:2px;*
    *     border:1px solid #EBEBEB;*
    *     margin-left:10px;*
    *     text-decoration:none;*
    *     background-color:#F5F5F5;*
    *     color:#D7D7D7;*
    *     cursor:default;*
    -->
    *</style>*
    *</head>*
    *<body>*
    *<div id="tnt_pagination">*
    *<span class="disabled_tnt_pagination">Prev</span>*
    *<span class="active_tnt_link">4</span>*
    *<dsp:droplet name="/com/FirstAssignmentDroplet">*
    *          <dsp:param name="count" value="5"/>*
    *          <dsp:oparam name="output">*
    *     <dsp:valueof param="index"/>*
    *          </dsp:oparam>*
    *     </dsp:droplet>*
    *     Next</div>*
    *</body>*
    *</html>*
    *</dsp:page>*     
    2)CompareDroplet.java:-
    package com;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import atg.core.util.StringUtils;
    import atg.servlet.DynamoHttpServletRequest;
    import atg.servlet.DynamoHttpServletResponse;
    import atg.servlet.DynamoServlet;
    ** @author Prateek g*
    *public class CompareDroplet extends DynamoServlet {*
    *     public void service(DynamoHttpServletRequest req,DynamoHttpServletResponse res) throws ServletException,IOException{*
    *          String param1 = req.getParameter("param1");*
    *          String param2 = req.getParameter("param2");*
    *          if (!StringUtils.isBlank(param1) && !StringUtils.isBlank(param2)) {*
    *               if (param1.equalsIgnoreCase(param2)) {*
    *                    req.serviceParameter("true", req, res);*
    *               } else {*
    *                    req.serviceParameter("false", req, res);*
    *          } else {*
    *               req.serviceParameter("false", req, res);*
    3)CompareDroplet.properties:-
    *$class=com.CompareDroplet*
    4)FirstAssignmentDroplet.java:-
    package com;
    *public class MyDroplet extends atg.servlet.DynamoServlet{*
    *     public static final atg.nucleus.naming.ParameterName COUNT=atg.nucleus.naming.ParameterName.getParameterName("count");*
    *     public static final atg.nucleus.naming.ParameterName OUTPUT = atg.nucleus.naming.ParameterName.getParameterName("output");*
    *     public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws ServletException, IOException {*
    *          int count=Integer.parseInt(pRequest.getParameter(COUNT));*
    *          for(int i=1;i<=count;i++){*
    pRequest.setParameter("index", i);
    *               pRequest.serviceParameter(OUTPUT, pRequest, pResponse);*
    And make the properties file for this droplet also and run your program.
    Hope it works!
    Regards,
    Prateek Gupta
    Edited by: Prateek G on May 27, 2013 1:04 AM

  • Implemented pagination using JSTL !

    Hi,
    I have implemented pagination using JSTL and uploaded the code at the following website
    http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=4718&lngWId=2Please send feedback on improving the code if any to [email protected]
    It can be used for doing Pagination using JSTL.
    Change the query as required in pagination.jsp
    Rows to be displayed per page can be changed by changing the variable rowsPerPage in printResult.jsp.

    Congrats! Atleast you are posting a solution.
    Rich

  • Implementing pagination

    Hi,
    Pls suggest for implementing pagination with af:table.
    I referred the link http://wiki.apache.org/myfaces/WorkingWithLargeTables . It looks like too many changes required.
    We have to implement pagination for 5 tables in our app.
    Thanks
    Tilak

    Tilak,
    You don't indicate what you use for your model layer (the link you posted describes how to make a fetch-on-demand model). If you are using ADF Business Components as your model layer, then any of tr:table, af:table (10g - with paging), af:table (11g - with scrolling) will have this fetch-on-demand automatically.
    If you are building your own data model layer from scratch, then the link you provided is a great start. Yes, it's a lot of work, which is an excellent reason to consider using a framework, such as ADF, where someone (Oracle) has already done this work for you.
    John

  • Issue in pagination of pivotal view (10 rows per page)???

    Hi All,
    I’m implementing pagination in pivotal view, report has to show 10 records per page.
    Report has to show for 8 weeks data per employee and 10 employees information per page, however report is displaying data for more than 10 employees and for a week single week, in second page its showing for 2 week and so on ….
    I used all the following functions however issue persists.
    1. FLOOR(RCOUNT(1) /10)
    2. CEILING((RCOUNT(1))/10.0)
    3. TRUNCATE((RCOUNT(1)-1)/10, 0) +1
    4. CASE when rcount(1)<11 then '1-10' when rcount(1)<21 then '11-20' when rcount(1)<31 then '21-30' else '30+' end
    Any suggestions
    Thanks,
    SMA

    Look in criteria add one more column
    in FX write this formula
    Go to the formula window of this column and enter the formula shown below
    CASE WHEN RCOUNT(1) < 11 THEN ‘1-10′
    WHEN RCOUNT(1) < 21 THEN ‘11-20′
    WHEN RCOUNT(1) < 31 THEN ‘21-30′
    ELSE ‘30+’ END
    Once this is done, drag and drop this column into the Pages section of your pivot table. Now you can paginate through your pivot table report.
    let us know if its solve your problem
    Thanks

  • Table Pagination in the  12345 format

    Hello,
    My Jdeveloper version is 11.1.1.6.0.
    I drag and dropped the database table data control on to the page and I want to implement pagination for this table in the form as below:
    *12345>* These are the page number and <,> are the arrow to go to next and previous pages. also I want to maintain drop down to show no of result/records per page . What will be the procedure to do this approach.How to get the records as per pagination .Is there is any buildIn method to do that or should I have to do this programatically by using some logic.

    Thank you Timo Hahn,
    Its working correctly but to show the pages in format of links like *<12345>* what should I do? what logic I can build for showing like this
    Edited by: 925410 on Jul 3, 2012 5:54 AM
    Edited by: 925410 on Jul 3, 2012 6:00 AM

  • Persist column values clicking on next or previous link of pagination

    Hello All,
    I have created one tabular form type report using apex APIs like apex_item.checkbox,apex_item.textfield etc
    where i want to update the values of each rows , i have also implemented pagination also.
    Actual problem is that i have 17 rows and pagination is set to 15 rows per page.
    so my report have 2 pages ,one contains 15 rows and other has 2 rows,
    In my case after entering data in page 1st , as i am clicking on next page then all the values which is entered in first page get reset,so only the value of page 2 is updated,
    so i want all the rows get submitted with new value on clicking of final submit button.
    Apex Version = 4.1.0
    Database = 11g
    Thanks,
    Jitendra

    So you would like the "next" pagination button to also submit the data on the page, then navigate to the next page of results? Or just have the first set of values stored in limbo somewhere until the user hits the submit button?
    I'm not expert in tabular forms, but it sounds like you want your cake and eat it too

  • Using rownum in EJB-QL ..Pagination using CMP 2.1

    Hi ,
    Hope this is the right forum .. rather than JDBC .
    My requirement is to implement Pagination using EJB2.1 on weblogic with Oracle DB. This is for an application which is quite old system and is not ready yet to be migrated to EJB3.0. So we are struck with EJB2.1 at the moment.
    We are using EJB-QL to get Search result and now need to add Pagination logic in it. I can find weblogic.ejb.PreparedQuery.setMaxElements() API to specify the upper limit but what am looking for is a lower limit ..somthing like setFirstRow() ..
    Can it be done using CMP Entity Bean 2.1 .. EJBQL or someother way ?
    I have the sql for pagination but am not sucessful in translating it to EJB-QL
    select * from
    select /*+ FIRST_ROWS(n) */ a.*, ROWNUM rnum from
    (your_query_goes_here) a
    where ROWNUM <=:MAX_ROW_TO_FETCH
    where rnum >= :MIN_ROW_TO_FETCH;
    Thanks in advance ! I hope I get a solution soon ..
    Edited to get some answers !!!
    is it possible to use rownum in EJBQL ? I know rownum is specific to Oracle and my application will stay with Oracle. I get this exception
    "EJB QL compilation encountered error: [EJB:013042]The Identifier 'rownum' is neither a cmp-field nor a cmr-field. Re-examine your query."
    Edited by: user11305835 on Oct 12, 2009 10:48 PM

    Beevin
      Both two are not even validated,
      but with the first one as select max(c.id) from customer as c , in this case it is validated but while deploying it is error as , object must be return
      But when i saw  the ejb2.1 specification we can write this type of queries also ?
      Is it problem with was any thing
    Regards
    Somaraju

  • How to split presentation level and business level using two ATG instances

    Hello All!
    We are investigating possibility of splitting ATG presentation (web store with jsp pages and other presentation components) and business (ATG components such as Pricing, Catalog, etc.) levels. The first idea that we have is simply start two instances of ATG. One instance will serve client requests (presentation level) and communicates with another ATG instance (business level) where all ATG components are situated.
    The main problem is a Nucleus container which is used for accessing all ATG components. And we don't know right solution how to point to a Nucleus container that is situated on a remote ATG instance. Right now we have two ideas how to establish communication between two ATG instances:
    - try to replace local Nucleus container by remote one using RMI;
    - do not replace Nucleus container by implementing some custom filter that can redirect all servlet requests to another ATG instance. In that case we will have two Nucleus containers.
    What do you think about all this? Do you have any other solutions how to solve the task? Maybe we lost something? Can we deploy a cluster of ATG instances that will communicate between each other?
    Thanks in advance.
    Andrey.
    Edited by: 945758 on Jul 11, 2012 7:00 AM

    Yes ATG system can have multiple nodes grouped in one or more clusters managed by load balencer
    If the services you are talking about are inherently ATG services like login, add to cart, checkout then its better to implement it with ATG.
    ATG provides and support both REST and SOAP based Webservice and allows you to expose any ATG component as service thus making it available outside ATG space.
    To be able to manage load better you can split your servers to page serving servers and services oriented servers and place them into multiple clusters.
    Though I haven't seen anyone using this kind of topology so not sure whether it's there is any challenge in setting up this topology.

  • Table sorting with pagination

    Hi,
    I have implemented pagination for the table. I have start,previous,next,last buttons in the bottom of the table. It is working fine.
    Generally if i click on column for sorting it will sort the columns in which where we are.(Suppose if we are in second page, it will sort the rows only in 2nd page as i am using range paging for VO.)
    But,instead of sorting rows on the specific page client is asking me to do the sorting on all rows in the table and display it accordingly.
    Here i m not able to sort the rows in the sort listener.
    Let me explain u with example.
    I have 2 columns in the table name,age. and displaying 5 rows per page. and rows are like A,B,C,D,E in first page and F,G,H,I,J,K are in 2 nd page..
    Name| Age
    A
    B
    C
    D
    E
    now if i click on column Name for sorting for desc it gives E,D,C,B,A ,for ASc it gives A,B,C,D,E ...
    But for me if i click on desc the rows should be in the order of K,J,I,H,G,F..
    After ascending
    Name| Age
    A
    B
    C
    D
    E
    After descending
    Name| Age
    K
    J
    I
    H
    G
    F
    Here is the my code for pagination on click of pagination buttons : Just am setting scroll range for the VO terator..
    JUCtrlRangeBinding staffView = getStaffView();
    int prePage =staffView.getIteratorBinding().getNavigatableRowIterator().getRangeStart() / RANGE_SIZE + 1;
    ViewObject vo = staffView.getIteratorBinding().getViewObject();
    vo.setAccessMode(vo.RANGE_PAGING);
    staffView.getIteratorBinding().getNavigatableRowIterator().scrollRange(RANGE_SIZE * (this.pageNumber -prePage));
    any idea about how to implement sort accordingly for table?
    Hope you understand ,you problem..Let me know if any questions..
    Thanks..

    let me give it a hit: Can you try setting the query execution mode to database just before you start sorting ?
    http://docs.oracle.com/cd/E16764_01/apirefs.1111/e10653/oracle/jbo/ViewObject.html , check for QUERY_MODE_SCAN_DATABASE_TABLES
    Edited by: Kamaal, Saif Kamaal on Dec 19, 2012 6:34 PM

  • How can Pagination be achieved in portlets ???

    HI,
    I wanna implement pagination in portlets.
    Ex: I display 20 pages .. 1, 2 , 3, 4, 5, 6, 7, 8..
    So i will have following clickable texts...
    prev>> 1 2 3 4 5 6 7 8 9 10 next<<
    when i select 3 , it should route me to page no 3.
    when i click on next it should display me the following
    prev>> 11 12 13 14 15 16 17 18 19 20
    Any ideas ?

    Hi,
    Here You go......
    http://forum.java.sun.com/thread.jspa?threadID=5194183
    My friend i'm afraid to say this but the one Suggested by you will not work on Portlet Environment under a Portlet Container.
    It wud be gr8 if you can revisit Basic Concepts of Portal,Portlet Container,Portlets & a Servlet,Servlet Container.
    REGARDS,
    RaHuL

  • Pagination using AJAX

    i need to implement pagination in my jsp page.
    is it possible to create a table in the page and upon clicking the next page,retrieve only the sufficient data from the server using AJAX?
    my idea is to retrive data in xml format from the database and use AJAX to display it in the table.will it be possible?

    I think you can do it only using JSF DataTable instead Ajax.

  • JavaFX ListView with pagination capability?

    Does anyone know of an example of steer me in the right direction of how to implement pagination on a ListView control in JavaFX? I need the scroll bar functionality as well.

    PaginatedTableView control has an example of a TableView with pagination. The basic idea should be pretty similar.

  • Nested XML & Pagination

    Hi,
    Just wondering if anyone has implemented pagination for
    nested XML. Our XML structure is as following:
    <items>
    <item id="0001" type="donut">
    <name>Cake</name>
    <ppu>0.55</ppu>
    <batters>
    <batter id="1001">Regular</batter>
    <batter id="1002">Chocolate</batter>
    <batter id="1003">Blueberry</batter>
    </batters>
    <topping id="5001">None</topping>
    <topping id="5002">Glazed</topping>
    <topping id="5005">Sugar</topping>
    <topping id="5006">Sprinkles</topping>
    <topping id="5003">Chocolate</topping>
    <topping id="5004">Maple</topping>
    </item>
    </items>
    We are trying to achieve the following display:
    * Cake
    o None
    o Glazed
    o Sugar
    o Powdered Sugar
    o Chocolate with Sprinkles
    o Chocolate
    o Maple
    * Raised
    o None
    o Glazed
    o Sugar
    o Chocolate
    o Maple
    * Buttermilk
    * Bar
    o Chocolate
    o Maple
    * Twist
    o Glazed
    o Sugar
    * Filled
    o Glazed
    o Powdered Sugar
    o Chocolate
    o Maple
    The Spry code for it as following:
    <script language="JavaScript" type="text/javascript"
    src="../../includes/xpath.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="../../includes/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="../../includes/SpryNestedXMLDataSet.js"></script>
    <script type="text/javascript">
    // Setup a parent data set:
    var dsItems1 = new
    Spry.Data.XMLDataSet("../../data/donuts.xml", "/items/item");
    // Setup a couple of nested data sets:
    var dsBatters = new Spry.Data.NestedXMLDataSet(dsItems1,
    "batters/batter");
    var dsToppings = new Spry.Data.NestedXMLDataSet(dsItems1,
    "topping");
    </script>
    <div spry:region="dsItems1 dsToppings">
    <ul>
    <li spry:repeat="dsItems1">{dsItems1::name}
    <ul>
    <li
    spry:repeat="dsToppings">{dsToppings::topping}</li>
    </ul>
    </li>
    </ul>
    </div>
    We want to implement pagination on dsItems1::name. Any help
    on how to implement pagination on it would be greatly appreciated.
    Many thanks.
    Cheers,
    D.

    Hi DharmenderY,
    The PagedView data set doesn't work very well with Nested
    Data Sets. This is something I want to fix in the next version. The
    work around is to make nested data sets based on the paged view:
    // Setup a parent data set:
    var dsItems1 = new
    Spry.Data.XMLDataSet("../../data/donuts.xml", "/items/item");
    var pvItems1 = new Spry.Data.PagedView(dsItems1);
    // Setup a couple of nested data sets:
    var dsBatters = new Spry.Data.NestedXMLDataSet(pvItems1,
    "batters/batter");
    var dsToppings = new Spry.Data.NestedXMLDataSet(pvItems1,
    "topping");
    That should get things rendering properly.
    --== Kin ==--

  • ViewObject: pagination

    Hello All,
    I am trying to implement pagination through Viewobject such that it load only x number of rows from DB, i read about range paging in oracle docs and i am trying to implement the same but i am not able to do so:
        MyROVOImpl vo = getMyROVO();
        vo.setRangeSize(argPageSize);
        vo.setAccessMode(RowSet.RANGE_PAGING);
        while (vo.hasNext())
          System.out.println(vo.next());
        }my while loop is executed hundreds of times ie. loading all the rows...
    Please help me find out how it can be done.. i will appreciate your help..
    Thanks

    Hi,
    I have some dirty way to do it, i am not sure if this is something you want though... As per my understanding i can offer you something like below:
        int rangeStart = (pageNo * rangeSize) - rangeSize;
        int rangeEnd = (pageNo * rangeSize) + 1;
        YourROVOImpl vo = getYourROVOImpl();
        vo.setFullSqlMode(YourROVOImpl.FULLSQL_MODE_AUGMENTATION);
        vo.setQuery("select * from (" +
                    "SELECT IQ.*, ROWNUM as Z_R_N from ( " +
                    " SELECT * FROM your_table where someCondition_if_u_have_one" +
                    " )IQ WHERE ROWNUM &lt " + rangeEnd + " ) " +
                    " WHERE Z_R_N &gt " + rangeStart);
         vo.executeQuery();     This will take care of rangeSize and paging both as they changes on each request.
    I would also say try to use bind variable instead of injecting variable in the query, just for sql injection case.
    Let me know, if it was what you wanted.
    Thanks
    Raj

Maybe you are looking for

  • Account determination for posting area Aggr

    Hi experts,     i'm very new to ISU and would like your help on an issue.i am using ETHIM to post mass act aggr posting for the serv prov.i get an error *Key selection not defined for application &1, posting area &2* msg no 005.. exact error msg woul

  • Burned disc won't play in CD Player

    Help Please! I burned a disc in iTunes. The disc will play in the computer; but it won't play in the CD player in the car or the home stereo. I suspect it is a file extension issue, but I don't know how to check or change anything. Thanks in advance

  • Printing background color - NOT

    I have someone who insists on sending me meeting minutes as email with a background color for the email. I'd like to turn off the background for printing, but can't figure how to do this. If I ask the printer to print B&W I get a grey background. In

  • Hostapd `EAPOL TX: no buffer space available' error

    Hi guys, I have just configured hostapd with NAT to let my smart phone use wired network. At first, it worked normally. But recently I found that sometimes, the connection between the AP and my phone seemed to fail after some time, especially when th

  • 5610 xpressmusic (file explorer)

    hey guys, what is the best file manager application for nokia 5610? like system explorer for s60.