Class OptionFormElementRenderer

java.lang.Object
io.micronaut.views.fields.render.secondary.OptionFormElementRenderer
All Implemented Interfaces:
FormElementRenderer<Option>

@Internal @Secondary @Singleton public class OptionFormElementRenderer extends Object implements FormElementRenderer<Option>
FormElementRenderer implementation of Option.
Since:
4.1.0
Author:
Sergio del Amo
  • Constructor Details

    • OptionFormElementRenderer

      public OptionFormElementRenderer(io.micronaut.context.MessageSource messageSource)
      Parameters:
      messageSource - Message source.
  • Method Details

    • render

      @NonNull public @NonNull String render(@NonNull @NonNull Option el, @NonNull @NonNull Locale locale)
      Description copied from interface: FormElementRenderer
      Renders a Form Element as HTML.
      Specified by:
      render in interface FormElementRenderer<Option>
      Parameters:
      el - Form Element
      locale - Locale
      Returns:
      HTML
    • attributes

      protected List<HtmlAttribute> attributes(@NonNull @NonNull Option el)
      Parameters:
      el - Option
      Returns:
      a List of HTML attributes