Return-Path: Delivered-To: apmail-incubator-abdera-dev-archive@locus.apache.org Received: (qmail 23442 invoked from network); 18 Jun 2008 14:55:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jun 2008 14:55:37 -0000 Received: (qmail 96236 invoked by uid 500); 18 Jun 2008 14:55:38 -0000 Delivered-To: apmail-incubator-abdera-dev-archive@incubator.apache.org Received: (qmail 96206 invoked by uid 500); 18 Jun 2008 14:55:38 -0000 Mailing-List: contact abdera-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: abdera-dev@incubator.apache.org Delivered-To: mailing list abdera-dev@incubator.apache.org Received: (qmail 96172 invoked by uid 99); 18 Jun 2008 14:55:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2008 07:55:37 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2008 14:54:56 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2E550234C144 for ; Wed, 18 Jun 2008 07:54:45 -0700 (PDT) Message-ID: <2055463281.1213800885188.JavaMail.jira@brutus> Date: Wed, 18 Jun 2008 07:54:45 -0700 (PDT) From: "James M Snell (JIRA)" To: abdera-dev@incubator.apache.org Subject: [jira] Commented: (ABDERA-168) Generating page links In-Reply-To: <1499798690.1211392315842.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/ABDERA-168?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1260= 5975#action_12605975 ]=20 James M Snell commented on ABDERA-168: -------------------------------------- You could use a URI Template to do this by setting the template pattern and= passing in the current uri parameters in the context with the appropriate = changes for the page. e.g. something like: Template template =3D new Template("?{-join|&|a,b,c,d,page}"); Map context =3D new HashMap(); context.put("a", request.getParameter("a")); context.put("b", request.getParameter("b")); context.put("c", request.getParameter("c")); context.put("d", request.getParameter("c")); context.put("page", 2); String queryString =3D template.expand(context); you can then append the expanded querystring to the base request uri > Generating page links > --------------------- > > Key: ABDERA-168 > URL: https://issues.apache.org/jira/browse/ABDERA-168 > Project: Abdera > Issue Type: Improvement > Affects Versions: 0.4.0 > Reporter: Remy Gendron > Priority: Minor > > Hello all, > I'm adding glue code in my application to automatically generate and add = paging links to a returned feed. > I have the necessary information to decide if a link should be there. > I know how to compute the URI parameters to target another page. > I know how to add a link to a feed with the FeedPagingHelper class. > My question is: Is there an easy way provided by Abdera to generate the l= ink by altering the current request URI parameters? I need to pass thru all= the current parameters that define the feed content returned (eg ?q=3Dxxx&= author=3Dyyy&max-results=3D10) but alter the start-index parameter to targe= t the new page. > I can do it manually by getting this information from the RequestContext = and building the new link. But I see a bunch of getLink() methods in the ad= apter classes. Is there an easy (or recommended) way of generated new links= based on the current request that I haven't seen? > Another question would be... do you make the paging links relative to the= base URI or do paging links need to be absolute as the examples in RFC5005= seem to indicate? > Thank you, > R=C3=A9my --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.