You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Christian Riedel (JIRA)" <ji...@apache.org> on 2010/06/25 16:58:51 UTC

[jira] Created: (TAP5-1194) ComponentEventLinkEncoder omits original Link's parameters when URL Rewriting has been applied.

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


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.


[jira] Updated: (TAP5-1194) ComponentEventLinkEncoder omits original Link's parameters when URL Rewriting has been applied.

Posted by "Christian Riedel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Attachment: patch_ComponentEventLinkEncoder.txt

Patch attached.

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


[jira] Updated: (TAP5-1194) ComponentEventLinkEncoder omits original Link's parameters when URL Rewriting has been applied.

Posted by "Christian Riedel (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (TAP5-1194) ComponentEventLinkEncoder omits original Link's parameters when URL Rewriting has been applied.

Posted by "Christian Riedel (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Closed: (TAP5-1194) ComponentEventLinkEncoder omits original Link's parameters when URL Rewriting has been applied.

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1194.
--------------------------------------

    Resolution: Invalid

As noted, prior bug fixes (available as part of 5.2) have invalidated this issue.

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


[jira] Updated: (TAP5-1194) ComponentEventLinkEncoder omits original Link's parameters when URL Rewriting has been applied.

Posted by "Christian Riedel (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Attachment: patch_ComponentEventLinkEncoder.txt

Patch attached.

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


[jira] Closed: (TAP5-1194) ComponentEventLinkEncoder omits original Link's parameters when URL Rewriting has been applied.

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1194.
--------------------------------------

    Resolution: Invalid

As noted, prior bug fixes (available as part of 5.2) have invalidated this issue.

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