Activation Request Parameters (2)

You requested persons whose name is like "humpty o".

Return
Look at the URL of this page. It is the page render request from the PageLink, and the activation request parameters are at the end.

This page receives the activation request parameter(s) by providing annotated field(s):


	@ActivationRequestParameter
	private String partialName;
	

When to use activation request parameters instead of activation context?
Activation request parameters are good for filter criteria because, arguably, they produce a more RESTful URL in that situation.

A page render request can have an activation context AND activation request parameters at the same time.

References: PageLink, Page Render Requests, Page Activation, Query strings in RESTful Web Services, @ActivationRequestParameter.

Home


<!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>Activation Request Parameters (2)</h3>

    <div class="eg">
        <p>You requested persons whose name is like "<em>${partialName}</em>".</p>
        <t:pagelink t:page="examples/navigation/ActivationRequestParameters1">Return</t:pagelink>
    </div>

    Look at the URL of this page. 
    It is the page render request from the PageLink, and the <strong>activation request parameters</strong> are at the end.<br/><br/>

    This page receives the activation request parameter(s) by providing annotated field(s):<br/><br/>
    
    <pre><code>
    @ActivationRequestParameter
    private String partialName;
    </code></pre><br/>

    <strong>When to use activation request parameters instead of activation context?</strong><br/> 
    Activation request parameters are good for <strong>filter criteria</strong> because, arguably, 
    they produce a more RESTful URL in that situation.<br/><br/>

    A page render request can have an activation context AND activation request parameters at the same time.<br/><br/>

    References: 
    <a href="http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/corelib/components/PageLink.html">PageLink</a>, 
    <a href="http://tapestry.apache.org/page-navigation.html#PageNavigation-PageRenderRequests">Page Render Requests</a>, 
    <a href="http://tapestry.apache.org/page-navigation.html#PageNavigation-Pageactivation">Page Activation</a>, 
    <a href="http://blpsilva.wordpress.com/2008/04/05/query-strings-in-restful-web-services/">Query strings in RESTful Web Services</a>, 
    <a href="http://tapestry.apache.org/5.4/apidocs/org/apache/tapestry5/annotations/ActivationRequestParameter.html">@ActivationRequestParameter</a>.<br/><br/>

    <t:pagelink t:page="Index">Home</t:pagelink><br/><br/>

    <t:tabgroup>
        <t:sourcecodetab src="/web/src/main/java/jumpstart/web/pages/examples/navigation/ActivationRequestParameters2.tml"/>
        <t:sourcecodetab src="/web/src/main/java/jumpstart/web/pages/examples/navigation/ActivationRequestParameters2.java"/>
        <t:sourcecodetab src="/web/src/main/resources/META-INF/assets/css/examples/plain.css"/>
    </t:tabgroup>
</body>
</html>


package jumpstart.web.pages.examples.navigation;

import org.apache.tapestry5.annotations.ActivationRequestParameter;
import org.apache.tapestry5.annotations.Import;
import org.apache.tapestry5.annotations.Property;

@Import(stylesheet = "css/examples/plain.css")
public class ActivationRequestParameters2 {

    // Activation request parameters

    @ActivationRequestParameter
    @Property
    private String partialName;

}


.eg {
                margin: 20px 0;
                padding: 14px;
                border: 1px solid #ddd;
                border-radius: 6px;
                -webkit-border-radius: 6px;
                -mox-border-radius: 6px;
}