Class EnumRadioChoiceRenderer<T extends Enum<T>>

java.lang.Object
de.agilecoders.wicket.core.markup.html.bootstrap.form.radio.DefaultRadioChoiceRenderer<T>
de.agilecoders.wicket.core.markup.html.bootstrap.form.radio.EnumRadioChoiceRenderer<T>
All Implemented Interfaces:
IRadioChoiceRenderer<T>, Serializable, IDetachable, IClusterable

public class EnumRadioChoiceRenderer<T extends Enum<T>> extends DefaultRadioChoiceRenderer<T>
Enum radio renderer similar to EnumChoiceRenderer. Option labels are pulled from the resources.
Author:
reiern70
See Also:
  • Constructor Details

    • EnumRadioChoiceRenderer

      public EnumRadioChoiceRenderer(Buttons.Type type)
    • EnumRadioChoiceRenderer

      public EnumRadioChoiceRenderer(Buttons.Type type, Component resourceSource)
  • Method Details

    • labelOf

      public IModel<String> labelOf(T option)
      Specified by:
      labelOf in interface IRadioChoiceRenderer<T extends Enum<T>>
      Overrides:
      labelOf in class DefaultRadioChoiceRenderer<T extends Enum<T>>
    • getDisplayValue

      public final CharSequence getDisplayValue(T object)
    • postProcess

      protected CharSequence postProcess(String value)
      Post processes the value after it is retrieved from the localizer. Default implementation escapes any markup found in the value.
      Parameters:
      value -
      Returns:
      postprocessed value
    • resourceKey

      protected String resourceKey(T object)
      Translates the object into resource key that will be used to lookup the value shown to the user
      Parameters:
      object -
      Returns:
      resource key