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

Christian Riedel updated TAP5-1194:
-----------------------------------

    Attachment: patch_ComponentEventLinkEncoder2.txt

I found another misbehavior some lines above. The original link is passed in as 
absolute uri to the rewritten link but doesn't get the parameters stripped off. 
That leads to links like 
/en/page.component:event?t:cp=containingPage?t:cp=containingPage since the 
previous fix retained the link's parameters map.

This second fix should do the trick but maybe one of the committers could have 
a look if there are unforeseen side effects?

> ComponentEventLinkEncoder omits original Link's parameters when URL Rewriting 
> has been applied. 
> ------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1194
>                 URL: https://issues.apache.org/jira/browse/TAP5-1194
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Christian Riedel
>            Priority: Critical
>         Attachments: patch_ComponentEventLinkEncoder.txt, 
> patch_ComponentEventLinkEncoder2.txt
>
>
> This was my use case:
> Page ABC renders a block that origins in another page XYZBlockSource. The 
> block renders a form component and when being submitted Tapestry throws an 
> exception that says "page ABC does not contain component form". 
> It happens because the ComponentEventLinkEncoder creates a new LinkImpl from 
> scratch when the URL of the form and thereby the original link is rewritten. 
> It omits the original link's parameters, which are empty most of the time. 
> Component event links contain the 't:cp' parameter to point Tapestry on their 
> containing page if it differs from the active page.

-- 
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