Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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);
}