org.apache.tapestry.annotations
Annotation Type Component


@Target(value=METHOD)
@Retention(value=RUNTIME)
@Documented
public @interface Component

Annotation used within a page or component class to define a contained component (which will typically match up against a component reference in the template). This annotation is attached to an accessor method.

Since:
4.0
Author:
Howard Lewis Ship

Optional Element Summary
 String[] bindings
          Bindings for the component.
 String copyOf
          The name of a previously defined component.
 String id
          The component's id.
 String[] inheritedBindings
          Inherited bindings bind a parameter of the component to a parameter of the container.
 boolean inheritInformalParameters
          If true, then the component inherits informal parameters from its container.
 String type
          The component type.
 

id

public abstract String id
The component's id. Defaults to the property name if left unspecified.

Default:
""

type

public abstract String type
The component type. Defaults to the return type class name if left unspecified.

Default:
""

copyOf

public abstract String copyOf
The name of a previously defined component. The type and bindings of that component will be copied to this component. Either type or copy-of must be specified.

Default:
""

inheritInformalParameters

public abstract boolean inheritInformalParameters
If true, then the component inherits informal parameters from its container.

Default:
false

bindings

public abstract String[] bindings
Bindings for the component. Each binding string is of the format name=binding reference, where the binding reference is the same kind of string (possibly with a prefix such as "ognl:" or "message:" as would appear in a specification.

Default:
{}

inheritedBindings

public abstract String[] inheritedBindings
Inherited bindings bind a parameter of the component to a parameter of the container. Each binding string is of the format parameter-name=container-parameter-name, where the former is the name of the component parameter and the latter is the name of the container parameter to bind the parameter to. In case both names are the same, it's possible to just use parameter-name.

Default:
{}


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.