Annotation Interface StrutsParameter
Used to annotate public getter/setter methods or fields on
Action classes that are
intended for parameter injection by the ParametersInterceptor.- Since:
- 6.4.0
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanAllows a dynamic property sink, such as a REST JSON or XML any-setter, to accept parameter names that do not correspond to declared members on the action.intThe depth to which parameter injection is permitted, where a depth of 0 only allows setters/fields directly on the action class.
-
Element Details
-
depth
int depthThe depth to which parameter injection is permitted, where a depth of 0 only allows setters/fields directly on the action class. Setting within a POJO on an action will require a depth of 1 or more depending on the level of nesting within the POJO.In a practical sense, the depth dictates the number of periods or brackets that can appear in the parameter name.
- Default:
- 0
-
allowDynamicKeys
boolean allowDynamicKeysAllows a dynamic property sink, such as a REST JSON or XML any-setter, to accept parameter names that do not correspond to declared members on the action.This is an explicit opt-in for input channels that support dynamic keys. Ordinary parameter injection ignores this flag, although placing
@StrutsParameteron a field still makes that field eligible for ordinary query and form parameter injection. Thedepth()value limits nesting below each dynamic key.- Default:
- false
-