org.apache.tapestry5.annotations
Annotation Type ActivationRequestParameter


@Target(value=FIELD)
@Retention(value=RUNTIME)
@Documented
@UseWith(value=PAGE)
public @interface ActivationRequestParameter

Marks a field of a page (not a component) as persistent within the URL, as with a page activation context. The field is mapped to a query parameter. When component event or page render links are generated for the page, additional values will be added to the Link (via the EventConstants.DECORATE_COMPONENT_EVENT_LINK or EventConstants.DECORATE_PAGE_RENDER_LINK events).

The field may be of any type; a ValueEncoder (from the ValueEncoderSource) will be used to convert between client-side and server-side representations. Null values are not added as query parameters (just non-null).

When a page is activated, the mapped fields will receive their values before an activate event handler method is invoked.

This annotation is an alternative to Persist.

Fields annotated with ActivationRequestParameter are not considered persistent (its a process parallel to the one related to the Persist annotation). Invoking ComponentResources.discardPersistentFieldChanges() will not affect annotated fields, only assigning them back to null will.

See Also:
RequestParameter

Optional Element Summary
 String value
          The name of the query parameter, which defaults to the name of the field.
 

value

public abstract String value
The name of the query parameter, which defaults to the name of the field.

Default:
""


Copyright © 2003-2012 The Apache Software Foundation.