<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- We need a doctype to allow us to use special characters like &nbsp;
We use a "strict" DTD to make IE follow the alignment rules. -->
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd">
<body class="container">
<h3>Return To Page (1)</h3>
Sometimes a page can be called from many other pages. If so, it can be tricky for the page to return to the previous page.<br/>
This example shows a way to do it.<br/><br/>
This page creates a Link to itself, complete with the current context (ie. the value of arg1).
It passes the Link to the next page.
<div class="eg">
<t:form class="form-inline" t:id="inputs">
<div class="form-group">
<t:label for="arg1">Current context</t:label>
<t:textfield t:id="arg1"/>
<t:submit/>
</div>
</t:form>
</div>
References:
<a href="http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/Link.html">Link</a>,
<a href="http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/services/PageRenderLinkSource.html">PageRenderLinkSource</a>.<br/><br/>
<t:pagelink page="Index">Home</t:pagelink><br/><br/>
<t:tabgroup>
<t:sourcecodetab src="/web/src/main/java/jumpstart/web/pages/examples/navigation/ReturnToPage1.tml"/>
<t:sourcecodetab src="/web/src/main/java/jumpstart/web/pages/examples/navigation/ReturnToPage1.java"/>
<t:sourcecodetab src="/web/src/main/resources/META-INF/assets/css/examples/returntopage1.css"/>
</t:tabgroup>
</body>
</html>