Annotation Interface ComponentParameter


@Target(PARAMETER) @Retention(RUNTIME) public @interface ComponentParameter
Marks the annotated method parameter as being a dynamic parameter for the given ComponentType. This annotation may be applied to parameters of type:
  • DomainObject - Will render a select box to choose from a list (a provider is required).
  • Enum - Will render a select box with the various enum values (all if no provider is given).
  • Boolean - Will render a checkbox
  • String - Will render a text field, or a select box if a provider is given.
  • Number - Will render a number field, or a select box if a provider is given.
Author:
João Carvalho (joao.pedro.carvalho@tecnico.ulisboa.pt)
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the presentation name of this parameter.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Returns the reference to an implementation of ComponentContextProvider, which will be used to give the user a choice of value.
    boolean
    Returns whether the annotated parameter is required.
  • Element Details

    • value

      String value
      Returns the presentation name of this parameter.
      Returns:
      The presentation name
    • provider

      Class<? extends ComponentContextProvider<?>> provider
      Returns the reference to an implementation of ComponentContextProvider, which will be used to give the user a choice of value. Do not change this value if you wish the user to be free to specify any value.
      Returns:
      The provider class
      Default:
      org.fenixedu.cms.domain.component.ComponentContextProvider.EmptyProvider.class
    • required

      boolean required
      Returns whether the annotated parameter is required. If it is not required, a null value may be passed to the constructor parameter.
      Returns:
      Whether this parameter is required
      Default:
      true