You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Anton Litvinenko (Commented) (JIRA)" <ji...@apache.org> on 2011/10/19 22:07:10 UTC

[jira] [Commented] (TAP5-1481) ComponentPageElementImpl to throw a special exception when a component cannot be found by id

    [ https://issues.apache.org/jira/browse/TAP5-1481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13130940#comment-13130940 ] 

Anton Litvinenko commented on TAP5-1481:
----------------------------------------

more general solution - seems ok to me :)

Thanks!
                
> ComponentPageElementImpl to throw a special exception when a component cannot be found by id
> --------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1481
>                 URL: https://issues.apache.org/jira/browse/TAP5-1481
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.2.4, 5.1.0.5
>            Reporter: Anton Litvinenko
>
> when an embedded component cannot be found by id, then ComponentPageElementImpl throws a TapestryException at line 841 for 5.1.0.5 (UnknownValueException for 5.2.4).
> I suggest throwing a special kind of exception in such case (e.g. EmbeddedComponentNotFoundException or ComponentNotFoundException), so that application would be able to handle such cases separately (e.g. by serving a 404 error page).
> Particular use-case: google indexing bot cached a tapestry page and tries indexing links that are included on this page. If links are actionlinks, then they include id of the component. When one changes the id of the component (or renames the component), then the "old" link doesn't work anymore as it contains old id of the component -> google indexing bot is served with Tapestry error page (which is a typical page). Instead, it makes sense to send a 404 error as result and let google bot know that there is no such resource anymore. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira