More Parameters (1)

To pass more parameters in a context, use square brackets and commas, and single quotes for literals.

For example t:context="['view',personId]" would render a URL like this: http://thehost/jumpstart/examples/navigation/MoreParameters2/view/1.

Pass many parameters
References: PageLink, Page Render Requests, Page Activation, Grammar, Binding Expressions, Type Coercion.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<!-- 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="">
<body class="container">
    <h3>More Parameters (1)</h3>

    <p>To pass more parameters in a context, use square brackets and commas, and single quotes for literals.</p>
    <p>For example <code>t:context="['view',personId]"</code> 
    would render a URL like this: <code>http://thehost/jumpstart/examples/navigation/MoreParameters2/view/1</code>.</p>
    <div class="eg">
        <t:pagelink page="examples/navigation/MoreParameters2" context="[anInt,aLong,aString,aDouble,aBigDecimal,aBoolean,aMode,'create']">
            Pass many parameters
    <a href="">PageLink</a>, 
    <a href="">Page Render Requests</a>, 
    <a href="">Page Activation</a>, 
    <a href="">Grammar</a>, 
    <a href="">Binding Expressions</a>, 
    <a href="">Type Coercion</a>.<br/><br/>

    <t:pagelink t:page="Index">Home</t:pagelink><br/><br/>
        <t:sourcecodetab src="/web/src/main/java/jumpstart/web/pages/examples/navigation/MoreParameters1.tml"/>
        <t:sourcecodetab src="/web/src/main/java/jumpstart/web/pages/examples/navigation/"/>
        <t:sourcecodetab src="/web/src/main/resources/META-INF/assets/css/examples/olive.css"/>
        <t:sourcecodetab src="/web/src/main/java/jumpstart/web/models/"/>

package jumpstart.web.pages.examples.navigation;

import java.math.BigDecimal;

import jumpstart.web.models.Mode;

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

@Import(stylesheet = "css/examples/olive.css")
public class MoreParameters1 {
    private int anInt;
    private Long aLong;
    private String aString;
    private double aDouble;
    private BigDecimal aBigDecimal;
    private boolean aBoolean;
    private Mode aMode;
    void setupRender()  {
        anInt = 1;
        aLong = new Long(2);
        aString = "3";
        aDouble = 4.321;
        aBigDecimal = new BigDecimal("5.432");
        aBoolean = true;
        aMode = Mode.REVIEW;


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

package jumpstart.web.models;

public enum Mode {