Em Mon, 30 Mar 2009 18:21:14 -0300, xfile80303 <l...@grokers.net> escreveu:

> Hi Thiago, all,

Hi!

> Thanks for adding this feature.

:)

> Is there a way to utilize this to only rewrite page render requests and  
> not component or asset requests?  I know it is pretty early on in the  
> request lifespan, but without this discrimination this feature is not  
> nearly as useful to me (and possibly others?).

It's really very early in the request handling pipeline. Maybe Tapestry  
should add some way (maybe methods in the Request instance) that tells if  
the given request is an page one or an event one or an asset one or etc.

Don't forget that every rules can choose if it will overwrite the request  
(returning another Request instance) or not, so your rule must first check  
if the request is one that needs to be rewritten or not. What exactly is  
the URL rewriting you want to do?



Yeah, I was afraid of this being too early on.

I understand the rules can choose to augment the request or not, but short of 
having my rule be smart enough to understand what type of request is 
potentially being re-written (which in my opinion is best left to the internals 
of Tapestry, as you suggest may be possible) there's no real way (that I see?) 
for me to accomplish something quite similar to this post:

http://n2.nabble.com/How-to-parse-and-map-URLs--tt2540788.html

without breaking all asset and component requests.

i.e. I can insert or parse for this context in the rule, but if I do insert it, 
then all asset and component requests break.  If I just parse it, then the 
generated outgoing links are "broken" because they lack this context.
 
(I have older posts which illustrate something similar, but I think this is a 
pretty easy example to understand).

Thanks!

Levi
-- 
View this message in context: 
http://n2.nabble.com/T5.1-URL-Rewriting-tp2557652p2559849.html
Sent from the Tapestry Users mailing list archive at Nabble.com.


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

Reply via email to