Class EnumLabel<T extends Enum<T>>

    • Constructor Detail

      • EnumLabel

        public EnumLabel​(String id)
        Constructor
        Parameters:
        id - See Component
      • EnumLabel

        public EnumLabel​(String id,
                         T value)
        Convenience constructor. Same as Label(String, new Model<String>(String))
        Parameters:
        id - See Component
        value - Enum value to render
        See Also:
        Component(String, IModel)
    • Method Detail

      • onComponentTagBody

        public void onComponentTagBody​(MarkupStream markupStream,
                                       ComponentTag openTag)
        Description copied from class: Component
        Processes the body.
        Overrides:
        onComponentTagBody in class Component
        Parameters:
        markupStream - The markup stream
        openTag - The open tag for the body
      • resourceKey

        protected String resourceKey​(T value)
        Converts enum value into a resource key that should be used to lookup the text the label will display
        Parameters:
        value -
        Returns:
        resource key
      • nullValue

        protected String nullValue()
        Returns:
        value that should be displayed if model object is null
      • onComponentTag

        protected void onComponentTag​(ComponentTag tag)
        Description copied from class: Component
        Processes the component tag. Overrides of this method most likely should call the super implementation.
        Overrides:
        onComponentTag in class Component
        Parameters:
        tag - Tag to modify