You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2013/07/25 22:37:49 UTC

[jira] [Closed] (TAP5-1990) Link interface should be more fluid to allow setting of anchor, etc., more concisely

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

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

       Resolution: Fixed
    Fix Version/s: 5.4
         Assignee: Howard M. Lewis Ship
    
> Link interface should be more fluid to allow setting of anchor, etc., more concisely
> ------------------------------------------------------------------------------------
>
>                 Key: TAP5-1990
>                 URL: https://issues.apache.org/jira/browse/TAP5-1990
>             Project: Tapestry 5
>          Issue Type: Improvement
>            Reporter: Angelo Chen
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.4
>
>
> first, the use case:
> You might be in a situation adding Backbonejs router to your existing Tapestry5 app, you got one like this:
> Object onActivate(String code, String entry);   // localhost:8080/mypage/0001/e001
> and you would like to redirect this to your backbonejs version which is: localhost:8080/mypage/0001#e001
> you can do it now by:
> Object onActivate(String code, String entry) {
> 	Link lnk = renderLinkSource.createPageRenderLinkWithContext(Mypage.class, code);
> 	lnk.setAnchor(entry);
> 	return lnk
> }
> if setAnchor returns Link instead of void, then it can be simplified to:
> Object onActivate(String code, String entry) {
>   return renderLinkSource.createPageRenderLinkWithContext(Mypage.class, code).setAnchor(entry);
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira