Re: Adding a dynamic sub directory to URL 

2012-07-19 Thread Thiago H de Paula Figueiredo
On Thu, 19 Jul 2012 05:18:39 -0300, Lance Java wrote: In option 1: - The URL displayed in the user's browser will be different to the @Injected request's getPath() That's exactly the point of URL rewriting! :) - I can only assume that the HTTPServletRequest will not be cloaked so @Injec

Re: Adding a dynamic sub directory to URL 

2012-07-19 Thread Lance Java
Consider a site with the following url rewriting /mysite/cars/view - view all cars /mysite/cars/bmw/view - set the Car environmental as "bmw" then invoke /mysite/cars/view /mysite/cars/porsche/view - set the Car environmental as "porsche" then invoke /mysite/cars/view /mysite/facebook/cars/view -

Re: Adding a dynamic sub directory to URL 

2012-07-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Jul 2012 13:17:51 -0300, Lance Java wrote: For the incoming ones (requested URLs), it works by changing the Request Yes, I saw that... I'm not sure I agree with that approach. If a downstram process Example please. :) was trying to calculate URL's relative to the current path

Re: Adding a dynamic sub directory to URL 

2012-07-18 Thread Lance Java
> For the incoming ones (requested URLs), it works by changing the Request Yes, I saw that... I'm not sure I agree with that approach. If a downstram process was trying to calculate URL's relative to the current path (to send to the browser), it would get the calculation wrong. -- View this messag

Re: Adding a dynamic sub directory to URL 

2012-07-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Jul 2012 10:31:51 -0300, Lance Java wrote: If anyone wants to grab its sources, check https://github.com/thiagohp/tapestry-url-rewriter. Peeking at the code, it looks like you needed to decorate ComponentEventLinkEncoder too It does, but just for outgoing links (the ones generat

Re: Adding a dynamic sub directory to URL 

2012-07-18 Thread Lance Java
> If anyone wants to grab its sources, check https://github.com/thiagohp/tapestry-url-rewriter. Peeking at the code, it looks like you needed to decorate ComponentEventLinkEncoder too Whatever happens, we need access to the core behaviour so that we can perform some string manipulation on it. The

Re: Adding a dynamic sub directory to URL 

2012-07-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Jul 2012 04:58:31 -0300, Lance Java wrote: I do this by decorating the ComponentEventLinkEncoder as I found that the LinkTransformer API was not adequate. I really need to take some time to get the old URL rewriter API, which is better suited than LinkTransformer in some scenar

Re: Adding a dynamic sub directory to URL 

2012-07-18 Thread Lance Java
I have written a sample application which takes a URL of the form "http://host:port/context//foo/bar" and transforms it to "http://host:port/context/foo/bar";. It also sets a "Mode" environmental to contain the . This environmental can then be accessed in pages and components. In your case, the mod

Re: Adding a dynamic sub directory to URL

2012-07-18 Thread Dusko Jovanovski
Take a look at http://tynamo.org/tapestry-routing+guide It's a tynamo module written for this purpose. On Wed, Jul 18, 2012 at 3:04 AM, dkeenan wrote: > This looks perfect! Tapestry is outstandingly good. > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Adding-a

Re: Adding a dynamic sub directory to URL 

2012-07-17 Thread dkeenan
This looks perfect! Tapestry is outstandingly good. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Adding-a-dynamic-sub-directory-to-URL-tp5714532p5714537.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

Re: Adding a dynamic sub directory to URL 

2012-07-17 Thread dkeenan
Thanks. Will take a look. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Adding-a-dynamic-sub-directory-to-URL-tp5714532p5714535.html Sent from the Tapestry - User mailing list archive at Nabble.com. - T

Re: Adding a dynamic sub directory to URL 

2012-07-17 Thread dkeenan
Superbe! It looks like I can just use a URL rewriter filter to rewrite my URLs and pass the club name in as a request param. http://urlrewritefilter.googlecode.com/svn/trunk/src/doc/manual/4.0/index.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/Adding-a-dynamic-s

Re: Adding a dynamic sub directory to URL 

2012-07-17 Thread Taha Siddiqi
Hi You should take a look at Tapestry's LinkTransformer API http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/linktransform/LinkTransformer.html Here is more than helpful Igor's post http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/ regards Taha On J