Activation Request Parameters (1)

A page render request can also include query parameters in key=value fashion, which Tapestry calls activation request parameters.

To specify activation request parameters in a PageLink, use the parameters parameter. Here we have specified parameters="queryParams". Click the link to learn more.
Find persons whose name is like "humpty o".
References: PageLink, Page Render Requests, Page Activation.

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 (1)</h3>

    A <strong>page render request</strong> can also include query parameters in <strong>key=value</strong> fashion, 
    which Tapestry calls <strong>activation request parameters</strong>.<br/><br/>
    
    To specify activation request parameters in a PageLink, use the <code>parameters</code> parameter. 
    Here we have specified <code>parameters="queryParams"</code>. 
    Click the link to learn more.
    
    <div class="eg">
        <t:pagelink page="examples/navigation/ActivationRequestParameters2" parameters="queryParams">Find persons whose name is like "${partialName}".</t:pagelink><br/>
    </div>
    
    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>.<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/ActivationRequestParameters1.tml"/>
        <t:sourcecodetab src="/web/src/main/java/jumpstart/web/pages/examples/navigation/ActivationRequestParameters1.java"/>
        <t:sourcecodetab src="/web/src/main/resources/META-INF/assets/css/examples/olive.css"/>
    </t:tabgroup>
</body>
</html>


package jumpstart.web.pages.examples.navigation;

import java.util.HashMap;
import java.util.Map;

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

@Import(stylesheet = "css/examples/olive.css")
public class ActivationRequestParameters1 {
    
    @Property
    private String partialName;
    
    void setupRender() {
        partialName = "humpty o";
    }
    
    public Map<String, Object> getQueryParams() {
        Map<String, Object> queryParams = new HashMap<>();
        queryParams.put("partialName", partialName);
        return queryParams;
    }
    
}


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