I noticed code below, actually cause a http 302, that's actually a redirect,
not the thing I was expecting.


angelochen wrote
> 
> works, thanks. a related question, I was rewriting the incoming url:
> 
> /30000/list
> 
> it will be sent to /Mylist/30000
> 
> it works, but the url in the browser got changed to /Mylist/30000 as well
> which I don't want, I want the url to remain as /30000/list, the old
> URLRewrite was working as expected, here is the code:
> 
> 
> public class MyListTransformer implements PageRenderLinkTransformer {
> 
>     @Inject
>     private ContextValueEncoder contextValueEncoder;
> 
>     @Override
>     public Link transformPageRenderLink(Link link,
> PageRenderRequestParameters pageRenderRequestParameters) {
>         return null; 
>     }
> 
>     @Override
>     public PageRenderRequestParameters decodePageRenderRequest(Request
> request) {
>         HashMap<String, String> inf =
> this.getIncomingInfoFromPath(request.getPath());
>        if (!inf.isEmpty()) {
>             return new
> PageRenderRequestParameters(MyList.class.getSimpleName(),
>                     new URLEventContext(contextValueEncoder, new
> String[]{inf.get("code")}), false);
>         }
>         return null;  
>     }
> }
> 
> 
> 
> 
> 
> Markus Feindler wrote
>> 
>> Use URLEventContext: 
>> http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/internal/URLEventContext.html
>> 
>> The ContextValueEncoder can be injected.
>> 
>> 
> 


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/EventContext-tp5044354p5044619.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

Reply via email to