Annotation Interface StrutsParameter


@Target({METHOD,FIELD}) @Retention(RUNTIME) public @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 Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Allows 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.
    int
    The 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 depth
      The 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 allowDynamicKeys
      Allows 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 @StrutsParameter on a field still makes that field eligible for ordinary query and form parameter injection. The depth() value limits nesting below each dynamic key.

      Default:
      false