Class RangeTextField<N extends Number & Comparable<N>>

Type Parameters:
N - the number type
All Implemented Interfaces:
Serializable, Iterable<Component>, IEventSink, IEventSource, IFeedbackContributor, IConverterLocator, IGenericComponent<N,FormComponent<N>>, IMetadataContext<Serializable,Component>, IFormModelUpdateListener, IFormVisitorParticipant, ILabelProvider<String>, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, IClusterable

public class RangeTextField<N extends Number & Comparable<N>> extends NumberTextField<N>
A TextField for HTML5 <input> with type range.

Automatically validates the input against the configured NumberTextField.setMinimum(Number) min} and NumberTextField.setMaximum(Number) max} attributes. If any of them is null then Double.MIN_VALUE and Double.MAX_VALUE are used respectfully.

See Also:
  • Constructor Details

    • RangeTextField

      public RangeTextField(String id)
      Construct.
      Parameters:
      id - component id
    • RangeTextField

      public RangeTextField(String id, IModel<N> model)
      Construct.
      Parameters:
      id - see Component
      model - the model
    • RangeTextField

      public RangeTextField(String id, IModel<N> model, Class<N> type)
      Construct.
      Parameters:
      id - component id
      model - the input value
      type - The type to use when updating the model for this text field
  • Method Details

    • getInputTypes

      protected String[] getInputTypes()
      Description copied from class: TextField
      Subclass should override this method if this textfield is mapped on a different input type as text. Like PasswordTextField or HiddenField.
      Overrides:
      getInputTypes in class NumberTextField<N extends Number & Comparable<N>>
      Returns:
      The input type of this textfield, default is null