On Tue, 31 Jan 2012 03:50:49 -0200, Jochen Frey <joc...@jochenfrey.com>
wrote:
Hi!
Hi!
I am looking for a clean way to generically rewrite URLs as follows:
Publicly we want to have an account name to be the first part of the
path in URLs like so: /SomeAccount/settings/page1. Since (I believe)
that in Tapestry I can't bind the first part of the path to a variable,
I would like to rewrite it to something like this:
/settings/page1?account=SomeAccount
Why not as the first page activation context value?
How do I pass newly created variable (account) into the
PageRenderRequestParameters (I guess if knew the Java class from step 1,
I could check if it implements an interface and if so, typecast it and
ask the receiving page to generate a link ... but that wouldn't help
much either.
What do you mean by variable?
It's pretty clear to me how I'd have done it in TS 5.1
(http://tapestry.apache.org/url-rewriting.html), but URLRewriterRule is
not supported any more.
Alternatively I could roll my own RequestFilter (like the TimingFilter),
but it seems there'd have to be a better way?
If you don't want to user LinkTransformer, I'd just copy the URL rewriting
support from Tapestry 5.1 sources. It's basically a RequestFilter and some
helper classes. Not much code and it uses nothing that would cause
problems in 5.3.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org