Class TimeField

    • Constructor Detail

      • TimeField

        public TimeField​(String id)
        Construct.
        Parameters:
        id - the component id
      • TimeField

        public TimeField​(String id,
                         IModel<Date> model)
        Construct.
        Parameters:
        id - the component id
        model - the component's model
    • Method Detail

      • convertInput

        public void convertInput()
        Description copied from class: DateTimeField
        Sets the converted input, which is an instance of Date, possibly null. It combines the inputs of the nested date, hours, minutes and am/pm fields and constructs a date from it.

        Note that overriding this method is a better option than overriding FormComponent.updateModel() like the first versions of this class did. The reason for that is that this method can be used by form validators without having to depend on the actual model being updated, and this method is called by the default implementation of FormComponent.updateModel() anyway (so we don't have to override that anymore).

        Overrides:
        convertInput in class DateTimeField