If I understand correctly you want the URL in browser to change. PageRenderLinkTransformer.decodePageRenderRequest() is used for cases where you want to override the way tapestry decodes a URL. It might be because you want to use a different URL pattern or you have a generic url that you want to map to a tapestry page. So this is a decoding of URL NOT a redirection(which results in a URL change in browser)
What you need is a filter at some level of Request Processing http://tapestry.apache.org/request-processing.html Typically it is HttpServletRequestFilter or ComponentRequestFilter or ComponentEventRequestFilter. The decision you have to make is how much information do you need from tapestry to perform filtering. The lesser you need, the early you can exit from the request processing pipeline. regards Taha On Sat, Jul 9, 2011 at 6:28 AM, dick_hu <dickan...@gmail.com> wrote: > I want to rewriting my page,code like this: > public class AutoLoginLinkTransformer implements PageRenderLinkTransformer > { > > @Inject > private RequestGlobals requestGlobals; > > @Inject > private MainLoginService loginService; > > @Inject > private TypeCoercer typeCoercer; > > private String usrid; > > public PageRenderRequestParameters decodePageRenderRequest(Request > request) { > if (filter(request)) { > return new > PageRenderRequestParameters(Space.class.getSimpleName(), > new ArrayEventContext(typeCoercer, > new Object[] { usrid }), > false); > } > return null; > } > > public Link transformPageRenderLink(Link defaultLink, > PageRenderRequestParameters parameters) { > return defaultLink; > } > > I want to the page rewriting to page "Space" and it sucess to the space,but > the browser's url is not change, > how can I solve this problem? Or is there any interface replace the > "PageRenderLinkTransformer". > My target is to add a filter,if it can not pass the filter's validate, then > page skip to another page.Is there any another way? If can share the code > is best. > Any one can help me, thanks a lot. > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/A-rewriting-problem-tp4567132p4567132.html > Sent from the Tapestry - User 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 > >