Re: Page Url rewriting in tapestry

2013-05-30 Thread Boris Horvat
Hm...I see so it basically still uses the 'build' which in returns causes my circular dependency Thanks that is a good to know. Cheers On Thu, May 30, 2013 at 11:55 AM, Lance Java wrote: > A "contribute" method builds up a Map, List or Collection prior to invoking > the constructor of a servic

Re: Page Url rewriting in tapestry

2013-05-30 Thread Lance Java
A "contribute" method builds up a Map, List or Collection prior to invoking the constructor of a service. The Map, List or Collection is then passed to the constructor of a service. The service must be annotated with one of @UsesMappedConfiguration, @UsesOrderedConfiguration or @UsesConfiguration.

Re: Page Url rewriting in tapestry

2013-05-29 Thread Boris Horvat
I understand the difference between decorator and builder method. Actually i was using contribute as my weapon of choice and I guess I could be lacking on the knowledge there. More specifically does contribution of the method act more like decorator or builder. Nonetheless I was able to make my de

Re: Page Url rewriting in tapestry

2013-05-29 Thread Lance Java
Hi Boris, I'm not sure you have grasped the concept of an IOC decorator. A decorator method name is prefixed with "decorate" and gets passed the default implementation so that it can delegate through to it. It is different to a "builder" method (prefixed with "build") which I think you might be usi

Re: Page Url rewriting in tapestry

2013-05-28 Thread Boris Horvat
Hi Lance, I hope you see this as I have a question regarding your code (if anyone else can answer I will be happy with that as well :)) I have created the implementation of the PageRenderLinkTransformer. This is a simple implementation that checks for a few condition and then adds the appropriate

Re: Page Url rewriting in tapestry

2013-05-27 Thread Boris Horvat
I guess I am a bit tiered as I just manage to move the code from one implementation to the other and it worked. So now PageRenderLinkTransformer implementation can handle this transformation. Thanks for the help everyone On Tue, May 28, 2013 at 12:41 AM, Boris Horvat wrote: > At first glance (a

Re: Page Url rewriting in tapestry

2013-05-27 Thread Boris Horvat
At first glance (and small try) this look like something I can use. So here is my idea. I can use this interface "ComponentEventLinkEncoder" to contribute my own logic that will strip the prefixed path from the link. However I am not sure what should I return if dont want any transformation. Shoul

Re: Page Url rewriting in tapestry

2013-05-27 Thread Lance Java
Not sure if this will help but thought it might be of interest. I've written a ComponentEventLinkEncoder which looks for "special" URL prefixes. If a "special" folder is found on the URL, it is removed from the URL and passed on to the normal tapestry component rendering. The "special" folder (whic

Re: Page Url rewriting in tapestry

2013-05-27 Thread Boris Horvat
I was thinking about that but I dont see it will fit in what I need. Right now what I need is to somehow generate a link to the page that "doesnt exist' since decodePageRenderRequest will make sure that that link is processable. To me at least this looks like a bug, why would a component throw an

Re: Page Url rewriting in tapestry

2013-05-27 Thread Alejandro Scandroli
Hi Boris, Have you consider using tapestry.application-folder? http://tapestry.apache.org/configuration.html#Configuration-tapestry.applicationfolder If you are using two instances of the same application using tapestry.application-folder would be your best option. Is that the case? or you want t

Re: Page Url rewriting in tapestry

2013-05-27 Thread Boris Horvat
So my idea was that in my class that contributes to the tapestry url I would have 2 methods decodePageRenderRequest - that looks for the page under given subfolder and transformPageRenderLink - that strips the actual folder (since i need to put it or pagelink component would fail) My assumption

Re: Page Url rewriting in tapestry

2013-05-26 Thread Boris Horvat
I do have one more question if anyone has an idea how to solve it. My Index page is ok as nothing is pointing to it. However all of the other pages are now at problem since they reside inside of a folder so when I use t:pagelink t:page="MyPageThatIsNowInFolder1" it complains that it cant find th

Re: Page Url rewriting in tapestry

2013-05-26 Thread Boris Horvat
I spoke too soon. A bit of testing got me the answer that I can just insert the folder as a string. Cheers On Mon, May 27, 2013 at 1:05 AM, Boris Horvat wrote: > Hi all, > > I was looking into this example here > http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/ however > I a

Page Url rewriting in tapestry

2013-05-26 Thread Boris Horvat
Hi all, I was looking into this example here http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/ however I am not sure if what I want is possible as I am not really sure how to do it. What I want to do is separate my application into 2 folders but I need to keep my urls as they a