You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stephan Schwab <sn...@caimito.net> on 2011/02/04 16:56:28 UTC

URL rewriting to create bookmarkable URLs

Unfortunately I've been a bit out of the loop since version 5.2.x came out.
Hopefully someone can bring me up to speed on this. Instead of hacking
something together that may work I'd like to ask what the recommended
approach for this is.

In my application I would like to avoid using a session for each and
everything. So instead I want to carry around an ID in the URL and also get
bookmarkable URLs at the same time. I want to receive that ID as
EventContext.

So 

/myapp/ID/mypage

should become

/myapp/mypage/ID 

with the ID being passed in as EventContext to onActivate()

Of course I don't want any URLs without the ID to leak out.

Stephan

-- 
View this message in context: http://tapestry.1045711.n5.nabble.com/URL-rewriting-to-create-bookmarkable-URLs-tp3371226p3371226.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: URL rewriting to create bookmarkable URLs

Posted by Stephan Schwab <sn...@caimito.net>.
Hi Igor!

Yes, I read that. And rewriting incoming URLs works just fine.

But what about the other direction?

Let's say I have a page link in one of my *.tml

<t:pageLink page="mypage">...

Do I have to add the context to each and every page link manually or is
there a way that I can do this using some transformer? I don't want to end
up with /app/mypage/ID but /app/ID/mypage

Stephan

-- 
View this message in context: http://tapestry.1045711.n5.nabble.com/URL-rewriting-to-create-bookmarkable-URLs-tp3371226p3371288.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: URL rewriting to create bookmarkable URLs

Posted by Igor Drobiazko <ig...@gmail.com>.
The approach is described here:

http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/

On Fri, Feb 4, 2011 at 4:56 PM, Stephan Schwab <sn...@caimito.net> wrote:

>
> Unfortunately I've been a bit out of the loop since version 5.2.x came out.
> Hopefully someone can bring me up to speed on this. Instead of hacking
> something together that may work I'd like to ask what the recommended
> approach for this is.
>
> In my application I would like to avoid using a session for each and
> everything. So instead I want to carry around an ID in the URL and also get
> bookmarkable URLs at the same time. I want to receive that ID as
> EventContext.
>
> So
>
> /myapp/ID/mypage
>
> should become
>
> /myapp/mypage/ID
>
> with the ID being passed in as EventContext to onActivate()
>
> Of course I don't want any URLs without the ID to leak out.
>
> Stephan
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/URL-rewriting-to-create-bookmarkable-URLs-tp3371226p3371226.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko
http://tapestry5.de