If the current page wasn't loaded by the PageService, I believe this hack is needed in order to prevent a page reload. Right?

On Thu, 17 Aug 2006 22:22:45 +0200, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:

How cool! You guys aren't using Tapestry somewhere are you?

I love your product =)

On 8/17/06, David Harkness <[EMAIL PROTECTED]> wrote:

Henri Dupre wrote:
> I'd like to write an @Anchor component that provides anchor links with
the
> absolute url of the page so that I can easily use anchors in any page.
> How can I retrieve the current URL in a page?

I'm using this in my base page class, though I'm sure there's a spiffier
way since I'm pretty new to Tap.

     @InjectObject("service:tapestry.globals.HttpServletRequest")
     public abstract HttpServletRequest getHttpServletRequest();

     protected String getUrl ( ) {
         HttpServletRequest request = getHttpServletRequest();
         String url = request.getRequestURI();
         String params = request.getQueryString();
         if ( params != null ) {
             url += "?" + params;
         }

         return url;
     }

Peace,
Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to