[T5.3] Using ResourceMinimizer to remove debugging code?
Hi, after playing with the new Tapestry 5.3 features, an idea came to my mind. I'd like to abuse the ResourceMinimizer to remove debug code when running in production mode, i.e. calls to Tapestry.debug, T5.console.debug and the like. The idea I currently have is to override the tapestry-yuicompressor contribution for text/javascript (unfortunately, the behavior of existing contributions cannot easily be extended as the MasterResourceMinimizer doesn't use a pipeline for each type, but that's a different story ;-) ) and remove all the calls to debug methods. Yuicompressor does not support features like that, so I wonder if there's a way to get around having to write horrible regular expressions or parser code. Any ideas? :-) Regards, Jochen - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] creating event links without the page activat ion context being encoded into the URLLink to this mes sage
Hello Thiago, sorry, the weekend happened to come in between. ;-) What value are you passing to the context field of LinkFactory.createComponentEventLink()? AFAIK, Tapestry always adds the current activation context to any links, unless you specify an activation context yourself. Try createComponentEventLink(Page page, String nestedId, String eventType, boolean forForm, new Object[0]). I wasn't using that method after all. I injected ComponentResources into the component and used its .createEventLink(String eventType, Object... context) method. But I guess, this one would only call the one you mentioned anyway. I also pass a String value as context and this one gets encoded as a path of the REST-like URI as expected. But still the ?t:ac=${original_page_activation_context} appears at its end. The only way to work around it seems to be using the ComponentResources.createFormEventLink(String eventType, Object... context), which I reckon to call the method you mentioned with the forForm parameter being set to true. But to me, this doesn't seem like the way it is meant to be done (maybe due to the form in the method's name. Thanks for your help, Jochen Pt! Schon vom neuen WEB.DE MultiMessenger gehört? Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3123 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5] creating event links without the page activation context being encoded into the URL
Hello, I've got a problem with creating stateless event links. I've got a page, which has an activation context. On the page, there's a component, that displays images. These images are rendered by a service, which I have injected into the component. In the component, I use an event link and a handler method, that uses a method of the service to have the images created. The problem I run into is, that the created event links get the page activation context encoded as t:ac URL parameter. This information is needed neither by the component nor by the service, but it prevents the browser from caching the images. Can I somehow create event links without this parameter? Regards, Jochen __ Deutschlands größte Online-Videothek schenkt Ihnen 12.000 Videos!* http://entertainment.web.de/de/entertainment/maxdome/index.html - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org