Generates a render request link to some other page in the application. If an activation context is supplied (as the context parameter), then the context values will be encoded into the URL. If no context is supplied, then the target page itself will supply the context via a passivate event. Pages are not required to have an activation context. When a page does have an activation context, the value typically represents the identity of some object displayed or otherwise manipulated by the page.
| Name | Type | Flags | Default | Default Prefix | Description |
|---|---|---|---|---|---|
| anchor | String | literal | An anchor value to append to the generated URL (the hash separator will be added automatically). | ||
| context | java.util.List | prop | If provided, this is the activation context for the target page (the information will be encoded into the URL). If not provided, then the target page will provide its own activation context. | ||
| disabled | boolean | false | prop | If true, then then no link element is rendered (and no informal parameters as well). The body is, however, still rendered. | |
| page | String | Required | literal | The logical name of the page to link to. |
<t:grid source="users" row="user" model="model">
<t:parameter name="lastnamecell">
<t:pagelink page="user/view" context="user.id">${user.lastname}</t:pagelink>
</t:parameter>
</t:grid>
public class ViewUser
{
private User _user;
@Inject
private UserDAO _userDAO;
public User getUser()
{
return _user;
}
void onActivate(long userId)
{
_user = _userDAO.findById(userId);
}
}
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<body>
<h1>View User</h1>
<t:beandisplay object="user"/>
</body>
</html>