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_LINKorEventConstants.DECORATE_PAGE_RENDER_LINKevents). 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 thePersistannotation). InvokingComponentResources.discardPersistentFieldChanges()will not affect annotated fields, only assigning them back to null will.- See Also:
RequestParameter,ValueEncoder
-
-
Element Detail
-
value
java.lang.String value
The name of the query parameter, which defaults to the name of the field.- Default:
- ""
-
-
-
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
-
-