Package org.apache.tapestry5.annotations
Annotation Type ActivationRequestParameter
-
@Target(FIELD) @Retention(RUNTIME) @Documented @UseWith(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 theLink
(via theEventConstants.DECORATE_COMPONENT_EVENT_LINK
orEventConstants.DECORATE_PAGE_RENDER_LINK
events). The field may be of any type; aValueEncoder
(from theValueEncoderSource
) 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 toPersist
. Fields annotated with ActivationRequestParameter are not considered persistent (its a process parallel to the one related to thePersist
annotation). InvokingComponentResources.discardPersistentFieldChanges()
will not affect annotated fields, only assigning them back to null will.- See Also:
RequestParameter
,ValueEncoder
-
-
-
required
boolean required
If true then a null value is an error. If false, then a null value will result in no update to the field. Either way, a null field value will result in no query parameter added to a generated link.- Since:
- 5.4
- Default:
- false
-
-