Class UrlTextField

All Implemented Interfaces:
Serializable, Iterable<Component>, IEventSink, IEventSource, IFeedbackContributor, IConverterLocator, IGenericComponent<String,FormComponent<String>>, IMetadataContext<Serializable,Component>, IFormModelUpdateListener, IFormVisitorParticipant, ILabelProvider<String>, IHeaderContributor, IRequestableComponent, IHierarchical<Component>, IClusterable

public class UrlTextField extends TextField<String>
A TextField for HTML5 <input> with type url.

Automatically validates the input that it is a valid Url.

See Also:
  • Constructor Details

    • UrlTextField

      public UrlTextField(String id, String url)
      Construct.
      Parameters:
      id - component id
      url - the url input value
    • UrlTextField

      public UrlTextField(String id, IModel<String> model)
      Construct.
      Parameters:
      id - the component id
      model - the input value
    • UrlTextField

      public UrlTextField(String id, IModel<String> model, UrlValidator urlValidator)
      Construct.
      Parameters:
      id - the component id
      model - the input value
      urlValidator - the validator that will check the correctness of the input value
  • 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 TextField<String>
      Returns:
      The input type of this textfield, default is null