Help with Pager Tag Library

I am developing a photo website with the JSP Pager Tag Library (http://jsptags.com/tags/navigation/pager/index.jsp). I have installed it and am using it successfully.
I have one question.
I have a page called view_fotos.jsp. This page has the pager tag to display the photos in a series of pages. view_fotos.jsp can accept a variety of parameters.
For example:
view_fotos.jsp?groupnum=10
view_fotos.jsp?groupnum=10&user=john
view_fotos.jsp?user=john&mode=view
Now, I would like to add the QueryString to all the indexed page links.
i.e. The page links should become...
view_fotos.jsp?groupnum=10&pager.offset=0
view_fotos.jsp?groupnum=10&pager.offset=6
view_fotos.jsp?groupnum=10&pager.offset=12
or
view_fotos.jsp?groupnum=10&user=john&pager.offset=0
view_fotos.jsp?groupnum=10&user=john&pager.offset=6
view_fotos.jsp?groupnum=10&user=john&pager.offset=12
depending on the request's QueryString. Can anyone please let me know how can I accomplish that?
Thanks for your kind help!
Regards,
Joe

Take a look at the docs on the pg:param tag. Those parameters will make it on the end of your URL. You might also have to export the offset variable in the pg:pager tag so that you can use it later with <%=offset%> but I think if you set the max items per page part of pg:pager to 6, it will do the offset stuff for you. The docs for the pager tag library should have more info though. That's found at http://jsptags.com/tags/navigation/pager/index.jsp along with the download.

Similar Messages

  • Pagination using pager tag library (logical groupings)

    I'm currently trying to achieve pagination using the pager tag library provided by jsptags.com.
    Instead of the usual breaking up the records into a fix number to be displayed per page, I need to display these records by grouping per page. E.g., my records are grouped by countries, so each group varies in size.
    I would not be accessing the database directly from the JSP page, in fact, the JSP page will get a collection of the objects that I want to display per page.
    Has anyone done anything like this before? Would appreciate very much if you could share with me how you implement this.
    Thanks!

    Hi there,
    I am wondering if you found the solution for your question with paging in JSP. if so i will really appreciate if you can let me know, how you did it. I am using Pager tag lib from JSPTags as well and i used collection object to iterate through. But i have some problems. I am wondeinf if you can help me with this
    Thanks
    Vik

  • Pager Tag Library & JSLT

    Hi
    I try to incorporate paging in my web application and I find Pager Tag Library in http://jsptags.com/tags/navigation/pager/index.jsp.
    Here is my code
    <%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
    <%-- Retrieve data--%>
    <sql:query var="date_data" dataSource="${ds}">
        select *
        from pdate
    </sql:query>
    <html>
    <pg:pager maxPageItems="2">
        <pg:item>
            <c:forEach items="${date_data.rows}" var="row">
                <c:out value="${row.product}"/>
            </c:forEach>
        </pg:item>
        <pg:index>
        <pg:first>
          <a href="<%= pageUrl %>">[ (<%= pageNumber %>) |< Previous ]</a>
        </pg:first>
        <pg:prev>
          <a href="<%= pageUrl %>">[ (<%= pageNumber %>) << Previous ]</a>
        </pg:prev>
        <pg:pages>
           <a href="<%= pageUrl %>"><%= pageNumber %></a>
        </pg:pages>
        <pg:next>
          <a href="<%= pageUrl %>">[ Next >> (<%= pageNumber %>) ]</a>
        </pg:next>
        <pg:last>
          <a href="<%= pageUrl %>">[ Last >| (<%= pageNumber %>) ]</a>
        </pg:last>
      </pg:index>
    </pg:pager>I don�t understand what values the pageUrl expression must have.
    I change all <%= pageUrl %> with numbers and string in order to experiment but the result is just the <c:out value="${row.product}"/> and no paging.
    What should be done in order to work?
    Thanks

    You could rewrite the component's renderer class

  • Pager tag library

    The Pager Tag Library is the easy and flexible way to implement paging of large data in JavaServer Pages (JSP). and we can display something like
    1 2 3 4......
    How can we display
    A B C D E.....
    instead of
    1 2 3 4 .....

    You could rewrite the component's renderer class

  • Paging using page tag Library

    My JSP is using page tag Library. When I click the Next page it returns next page. How can I change my JSP using page tag so that when the next/previous link is clicked, I should see the next/previous 10 records and so on.
    Thanks in advance

    Unfortunately my mind reading powers are not working so well right now.
    Which page tag library are you using? There are several.
    I would suggest that you look at the documentation for that library.
    Unless you show us what the code you are currently using is, we can't suggest changes.
    Oh, and please don't just copy paste your whole JSP here. A relevant excerpt of how you are using the tag library and how you create the links should be more than enough. And please use code tags.

  • Need help with Page Layout and Background Scaling

    hello, everyone.
    I am in the process of designing a new website for myself,
    and while I was researching nicely designed pages to use as
    inspiration, I stumbled upon this site:
    http://www.jeffsarmiento.com/
    obviously, the design is very impressive, but it also
    incorporates a lot of web mechanics that I have been trying to
    figure out, so I will use this page as an example.
    one thing I need help with is backgrounds. as you can see in
    the posted website, the creator used a seamlessly tiled paper
    texture to display the bulk of his content on. also make not of the
    pattern that is located to the left of the paper texture. how do I
    create seamless backgrounds like this that will scale to fit any
    amount of content or any resolution? I can't imagine that the guy
    that made that site created a new size background every time he
    made an update, so there has to be an easier way.
    the second thing that I am having trouble with is general
    site layout. I have read that most sites used series of invisible
    tables to organize there content, but when I open the source of
    this page in dreamweaver, he was using something different. div
    tags? should I be using these? who do I use them? are there any
    general layout tips that someone could pass on to me? perhaps a
    link to a good tutorial?
    please help me. i am very confused.
    thanks so much.

    IMO not a good site to emulate. To wit:
    Top background image:
    http://www.jeffsarmiento.com/images/bg-top.jpg;
    745px
    x 350px 137K
    Main background image:
    http://www.jeffsarmiento.com/images/bg-tile.jpg;
    745px x 950px 130K
    Total page size: 454K (Check here:
    www.websiteoptimization.com)
    Website usability experts routinely recommend a maximum page
    size of ~80K
    Check out the We We Scale @ www.FutureNowInc.com/wewe/ where
    they suggest,
    "You speak about yourself approximately 0,003 times as often
    as you speak
    about your customers. Might that have an impact on your
    effectiveness?"
    That is 100% consistent with the #1 Web Design mistake:
    "Believing people
    care about you and your web site." or to phrase more
    expansively, "Our site
    tries to tell you how wonderful we are as a company, but not
    how we're going
    to solve your problems."
    www.sitepoint.com has some excellent books on making a
    website actually
    attractive and usable at the same time.
    Walt
    "beWILLdered_" <[email protected]> wrote in
    message
    news:[email protected]...
    > hello, everyone.
    > I am in the process of designing a new website for
    myself, and while I was
    > researching nicely designed pages to use as inspiration,
    I stumbled upon
    > this
    > site:
    >
    http://www.jeffsarmiento.com/
    > obviously, the design is very impressive, but it also
    incorporates a lot
    > of
    > web mechanics that I have been trying to figure out, so
    I will use this
    > page as
    > an example.
    > one thing I need help with is backgrounds. as you can
    see in the posted
    > website, the creator used a seamlessly tiled paper
    texture to display the
    > bulk
    > of his content on. also make not of the pattern that is
    located to the
    > left of
    > the paper texture. how do I create seamless backgrounds
    like this that
    > will
    > scale to fit any amount of content or any resolution? I
    can't imagine that
    > the
    > guy that made that site created a new size background
    every time he made
    > an
    > update, so there has to be an easier way.
    > the second thing that I am having trouble with is
    general site layout. I
    > have
    > read that most sites used series of invisible tables to
    organize there
    > content,
    > but when I open the source of this page in dreamweaver,
    he was using
    > something
    > different. div tags? should I be using these? who do I
    use them? are there
    > any
    > general layout tips that someone could pass on to me?
    perhaps a link to a
    > good
    > tutorial?
    > please help me. i am very confused.
    >
    > thanks so much.
    >

  • Help with nested tags

    Hello,
    I need to do something like this:
    <rss:forEachItem feedId="popes80" startIndex="1" endIndex="5">
       <html:link href="<rss:itemLink feedId='popes80' />" >
             <rss:itemTitle feedId="popes80" />
        </html:link>
    </rss:forEachItem>And I'm having problems because it is "not valid xml", I guess it is because the <rss:itemLink> inside the href.
    I tried everything and I'm out of ideas...
    I'm using the library rss utilities and it comes with no source code and no docs...
    I tried Rome and it's too complicated for my simple case, I tried rsstag but it uses SAX which even gives me more problems ...
    �Does anyone know what can I do whith my code? �Or maybe how to disable in my jboss to check the valid xml ?
    Thanks in advance for your help!
    Mar�a
    Edited by: mery on Jul 8, 2008 11:52 AM
    Edited by: mery on Jul 8, 2008 11:53 AM

    You can't have custom tags as attributes to other custom tags.
    You can only have exressions. Either ${elExpression} or <%= scriptletExpression %>
    Here is one approach using the JSTL tag library. It evaluates the rss:itemLink tag, stores it to an attribute and then uses that value with the html:link tag.
    <rss:forEachItem feedId="popes80" startIndex="1" endIndex="5">
       <c:set var="itemLink"><rss:itemLink feedId='popes80' /></c:set>
       <html:link href="${itemLink}" >
             <rss:itemTitle feedId="popes80" />
        </html:link>
    </rss:forEachItem>

  • Help with page numbering.

    Hello. I've searched HIGH and LOW for answers on this. I've gone through the KB documents and the User's manual and NOTHING is helping with my challenge.
    I'm writing a manuscript. I need PAGE 1 to start several pages into the document and automatically repeat in a header on each page. How do I accomplish that? I've tried with Inspector but the minute I click into the header it "grays-out" the inspector control for pagination.
    I also have numerous SEPARATE Pages documents (chapters) that I want to recognize the numbering from the chapter before. How do I accomplish that?
    I'm very frustrated, and you would truly be a hero to me by helping answer my questions. Thanks so much, Dan

    You need to break the document into sections in the +Inspector > Layout (2nd tab) > Section+.
    The First section would be your preface possibly counting in roman numerals.
    The second section would start your count at page 1.
    To edit the header if it is not selectable go +Menu > Format > Advanced > Make Master Objects Selectable+
    Click into the header then go +Menu > Insert > Page Number+
    To control the numbering go +Inspector > Layout (2nd tab) > Section > Start at+
    If you can't insert into a Header it may be because it is has been locked or grouped
    Both of these can be undone in +Menu > Arrange > Unlock or Ungroup+
    You will have to set the starting number in separate documents manually. Remember right hand pages are always odd, if need be add a blank page at the end of a previous document.

  • Help with page-error

    Hello, I`m trying to authenticate acces to my servlet, (Tom Cat 4.0.3), in my Deploy Descriptor I set BASIC authentication and a <error-page> with <error-code> 401 and a <location>/error.html but when I try 3 times Tomcat don�t shows my html page error and shows his page error, I don�t know why, thanks a lot !!!!

    check "*.xml" files,make shure it added the Error page
    Tag in the particular one.Then restart the Tomcat Server.

  • Help with Page Breaks!

    Hello,
    I am having great difficulty with page breaks.
    I have included a link below to a jpg of a format template I am working on (edited for public release, but it works):
    http://home.swbell.net/grog1/work/pagebreaksample.jpg
    The layout template has many text form fields but I have re-colored them all to grey so that the pagebreak stands out in pink (and default text is the same as the help text for clarity).
    The data format that I am using for this layout template can be found at:
    http://home.swbell.net/grog1/work/testdata.xml
    This data is for sample use only and would (normally) contain many G_ORDERS for multiple G_ORD_TYPES in multiple G_REGIONS.
    My problem is that it does not matter where I place the page break, it simply does not work correctly.
    As you can see from the current placement I WISH the report to break between each and every occurrences of REGION in the group “REGION”. At this placement it does not break at all.
    I ‘can’ get the report to break (incorrectly, but at least it breaks) if I place this exact same syntax into the innermost grouping of data (i.e. the G_ORDER group) but even then the breaking is NOT CONSISTENT at all. In this case I would ‘expect’ it to break before every order…it does not.
    I have also tried the syntax: “ <xsl:if xdofo:ctx="inblock" test="1=1"><xsl:attribute name="break-before">page</xsl:attribute></xsl:if> “ (without the quotes which got from he forum here) as well as the MSWORD pagebreak (which has never worked for me). None of these work correctly.
    Any assistance in or insight into getting my reports to CONSISTENTLY break at the appropriate times would be most appreciated as I have been trying to get this to work for several days now...
    Thank you,
    Scott

    Hello again!
    I have the pagebreak problem working, but I would dearly like some insight as to why/how it is working…
    I have template builder 10.1.3.2.1 for reference and I now have the report breaking at the correct times, i.e. after each region.
    My confusion is that to get it to work I must use the syntax and placement of the pagebreak text field exactly as shown below. No other placement cause the pages to break correctly and the other syntax sample varations I have found on this forum, etc (listed above) do not work at all.
    Please review the link to the (now working format template) jpg and provide feedback/insight.
    http://home.swbell.net/grog1/work/pagebreaksample_working.jpg
    Thanks in advance for feedback,
    Scott

  • Want to add a jsp inside pager tag library

    Hi,
    I want to add pagination in my web center application, for This I am using pager tag lib
    But I am not able to add jsp page inside *<pg:index >* tag
    I tried it with different ways: e.g.
    A. <jsp:include page="/WEB-INF/jsp/altavista.jsp" flush="true"/>
    b> <f:subview id="subview1">
    <jsp:include page="inc.jsp" />
    </f:subview>
    When I add JSP  inside <pg:index > tag and run my jsp i am getting noting in my UI and also not seeing any error in console.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:pe="http://xmlns.oracle.com/adf/pageeditor"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:tr="http://myfaces.apache.org/trinidad"
    xmlns:pg="http://jsptags.com/tags/navigation/pager"
    xmlns:trh="http://myfaces.apache.org/trinidad/html"
    xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:pageTemplate viewId="/oracle/webcenter/portalapp/pagetemplates/nowTemplate.jspx"
    id="pt1">
    <f:facet name="content">
    <af:group id="g1">
    <af:panelGroupLayout id="pgl1">
    <div class="line topMargin20">
    <div class="unit size1of4">
    <div class="mod mod-sectionTitle">
    <span>Search Results</span>
    </div>
    </div>
    <!-- /unit -->
    <div class="unit size3of4 lastUnit"></div>
    <!-- /unit -->
    </div>
    <!-- /line -->
    <div>
    <pg:pager items="${backingBeanScope.searchClient.searchResults.totalResults}"
    maxPageItems="${backingBeanScope.searchClient.searchResults.maxPageItems}"
    maxIndexPages="${backingBeanScope.searchClient.searchResults.maxIndexPages}"
    isOffset="${backingBeanScope.searchClient.searchResults.isOffset}"
    export="offset,currentPageNumber=pageNumber"
    scope="request">
    <pg:param name="maxPageItems"/>
    <pg:param name="maxIndexPages"/>
    <input type="hidden" name="pager.offset" value="${backingBeanScope.searchClient.searchResults.isOffset}"></input>
    *<pg:index >*
    *</pg:index>*
    <c:forEach items="${backingBeanScope.searchClient.searchResults.results}"
    var="result">
    </c:forEach>
    </pg:pager>
    </div>
    </af:panelGroupLayout>
    </af:group>
    </f:facet>
    </af:pageTemplate>
    </af:form>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_oracle_webcenter_portalapp_pages_untitled1-->
    </jsp:root>

    PeterBreis0807 wrote:
    Are you having trouble with tabs in a list?
    You haven't said so.
    In lists you have to use option tab, otherwise it just changes the list level.
    Peter
    I guess what you were hoping but you missed the point.
    Yvan KOENIG (VALLAURIS, France) vendredi 20 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k
    My iDisk is : http://public.me.com/koenigyvan

  • Help with Pages & Templetes

    I'm making my site in Adobe Muse and upgraded my the Business Catalyst to webMarketing.  I'm trying to make a page templete from muse to catalyst but I'm not getting the option under Site Manager.
    Under Site Manager I only have >
    Web Forms
    System E-mails
    I'm looking for the pages or templete options in there.  Am I looking in the wrong place or have the worng package?
    Thanks for any help with this

    Yeah, I every upgraded one step more to see if that would fix it to the webCommerce package to see if that would fix it.  Everything else is there, and i did find what I needed on the old layout, but its still not on the v3 layout.
    I'm going to have to contact support in the morning, thanks for your help.

  • Please help with backing up library

    OK, this has maybe been addressed before but I'm new here and haven't really found an answer on the forums... My work is saved as monthly projects and I want to export them to an external HD with metadata and adjustments etc but retain a referenced version in my library on my mac. Make sense? If I need to get anything back I can do a quick search and plug in the HD - yes? Trouble is if I export the project as-is I can't reimport referenced files... This is maybe my poor working practice and I'd really appreciate some help with it. I've previously just exported versions then burned DVD's but I'd really like to keep a record of pics on the mac if poss. HELP PLEASE!

    buzzski wrote:
    Thanks so much for your help with this! It sounds exactly like what I want to achieve. I'm wondering now if I can export my entire library and bring it back in as referenced instead of managed - hopefully someone can advise? Thanks, Craig
    You don't need to export you can do it from within Aperture, see *File->Relocate Master*.
    Again check out the user manual Apple did a real good job with this one.
    And PLEASE, PLEASE, make a complete backup of your Aperture library before trying any of this we are not responsible for lost, missing or mutilated photos

  • Help with JSP Tag Libraries

    Could someone please help me with the setup process of tag libraries? I've looked on the Internet and found some instructions, but they are all for Tomcat. I'm using Jserv, and I'm not sure how to setup my environment to work with custom/tag libraries. Could someone help me by giving me some instructions or sending me to an article that could help me?
    Thanks in advance!
    -PV

    Hi pvongboupha
    The best source for getting to know how to set up tag libraries is the JSP specification. You can download this from :
    http://java.sun.com/products/jsp/download.html
    See the chapter on Tag libraries. Any J2EE compliant server will conform to these rules.
    You can also see a chapter from Core Servlets & JSP by Marty Hall. This chapter is on Tag Libraries
    http://developer.java.sun.com/developer/Books/javaserverpages/cservletsjsp/
    Keep me posted on your progress.
    Good Luck!
    Eshwar R
    Developer Technical Support
    Sun microsystems
    http://www.sun.com/developers/support

  • PC to Mac convert: help with Pages

    I recently moved my father from a PC to a Mac.  He's liking it so far but stumped by one problem.
    He was very fond of using Outlook and Word as his email editor.  This alowed him to format to a much higher degree since Word essential writes the emails in HTML with all the implied bells and whistles.
    I suggested we try Pages to the same effect.  He likes Pages so far but we're stymied as to how to send the final document via email.  He does NOT want to send it as an attachment.
    Is it possible to send the final Page as the actual email (embedded)?

    No, you can't do what you want with Pages.  Best search/ask how you can do formatted email in the forum for that kind of question:
    https://discussions.apple.com/community/ipad/using_ipad#/?tagSet=1191

Maybe you are looking for