Interface FormValueOptionsApi


public interface FormValueOptionsApi
The FormValueOptionsApi is exposed to form logics through the form binding during the valueOptions phase.

This phase is triggered when the frontend requests dynamic value options for a specific input. The logic should return a Collection or Map of available options for the input identified by sourceInputName().

Since:
17.0 - Paloma
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the name of the input for which value options are being requested.
  • Method Details

    • sourceInputName

      String sourceInputName()
      Returns the name of the input for which value options are being requested.

      Example:

      
           if (form.sourceInputName() == "country") {
               return ["US": "United States", "DE": "Germany"]
           }
       
      Returns:
      The name of the source input.
      Since:
      17.0 - Paloma