[ 
https://issues.apache.org/jira/browse/TAP5-1002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Jirout updated TAP5-1002:
-----------------------------

    Attachment: fix.zip

In attached zip file are following files:

ComponentEventLinkEncoderMethodAdvice.java - when new link is created all 
parameters are copied form original link to new link and state of property 
"forForm" is same as it was in original link
Link - added getter getForForm
LinkImpl -  added getter implementation for forForm property

this changes fix my problem.

> action link passed through URLRewriterRule lost page context
> ------------------------------------------------------------
>
>                 Key: TAP5-1002
>                 URL: https://issues.apache.org/jira/browse/TAP5-1002
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Jan Jirout
>         Attachments: fix.zip
>
>
> When application create action link and during generating form action ink and 
> URLRewriterRule rewriting is applied then page context is lost.
> It seems that LinkImpl is correctly created in ComponentEventLinkEncoderImpl 
> at 194 with forForm=true. Next is 
> ComponentEventLinkEncoderMethodAdvice#advice called. There is created 
> "fakeRequest". This "fakeRequest" is then passed through all registered 
> URLRewriterRule implementations and rewrited request is returned. If 
> "fakeRequest" and rewritten request are not same then LinkImpl is rewritten. 
> This is the place where is the problem, LinkImpl rewriting code is:
>            newLink = new LinkImpl(newUrl, false, false, response, null);
> so the rewritten link have always forForm=false. And this is the problem. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to