Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Layout tweaks
Wiki Markup
{float:right}
{panel:|background=#eee}
{contentbylabel:title=Related Articles|showLabels=false|showSpace=false|space=@self|labels=expressions,component-classes,component-templates,parameters}
{panel}

h3. Contents
{toc}
{float}

Component parameters are the primary means for a component instance and its container to communicate with each other. Parameters are used to configure component instances.

...

Code Block
languagexml
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
    <t:pagelink page="Index">Go Home</t:pagelink>
</html>

A component may have any number of parameters. Each parameter has a specific name, a specific Java type (which may be a primitive value), and may be optional or required.

...

In Tapestry, a parameter is not a slot into which data is pushed: it is a connection between a field of the component (marked with the @Parameter annotation) and a property or resource of the component's container. (Components can be nested, so the container can be either the page or another component.)

Wiki Markup
{float:right}
{panel:title=Contents|background=#eee}
{toc:minLevel=2|maxLevel=4}
{panel}
{float}

 

The connection between a component and a property (or resource) of its container is called a binding. The binding is two-way: the component can read the bound property by reading its parameter field. Likewise, a component that updates its parameter field will update the bound property.

...