Class Html5DateField

  • All Implemented Interfaces:
    ClientElement, Field

    @Events("validate")
    public class Html5DateField
    extends AbstractField
    A component used to collect a provided date from the user using the native HTML5 date picker (<input type="date">)
    See Also:
    Form, TextField
    Component Parameters 
    NameTypeFlagsDefaultDefault Prefix
    clientIdString  literal
    Used to explicitly set the client-side id of the element for this component. Normally this is not bound (or null) and org.apache.tapestry5.services.javascript.JavaScriptSupport#allocateClientId(org.apache.tapestry5.ComponentResources) is used to generate a unique client-id based on the component's id. In some cases, when creating client-side behaviors, it is useful to explicitly set a unique id for an element using this parameter. Certain values, such as "submit", "method", "reset", etc., will cause client-side conflicts and are not allowed; using such will cause a runtime exception.
    ensureClientIdUniquebooleanSince 5.4 prop
    A rarely used option that indicates that the actual client id should start with the clientId parameter (if non-null) but should still pass that Id through org.apache.tapestry5.services.javascript.JavaScriptSupport#allocateClientId(String) to generate the final id. An example of this are the components used inside a org.apache.tapestry5.corelib.components.BeanEditor which will specify a clientId (based on the property name) but still require that it be unique. Defaults to false.
    messagesorg.apache.tapestry5.commons.MessagesSince 5.2.0.0componentResources.messagesprop
    Used to override the component's message catalog.
    validateorg.apache.tapestry5.FieldValidator  validate
    The object that will perform input validation (which occurs after translation). The translate binding prefix is generally used to provide this object in a declarative fashion.
    valuejava.util.DateRequired prop
    The value parameter of a DateField must be a java.util.Date.

    Component Events 
    NameDescription
    validate 

    • Method Detail

      • processSubmission

        protected void  controlName)
        Description copied from class: AbstractField
        Method implemented by subclasses to actually do the work of processing the submission of the form. The element's controlName property will already have been set. This method is only invoked if the field is not disabled.
        Specified by:
        processSubmission in class AbstractField
        Parameters:
        controlName - the control name of the rendered element (used to find the correct parameter in the request)
      • isRequired

        public boolean isRequired()
        Description copied from class: AbstractField
        Returns false; most components do not support declarative validation.
        Specified by:
        isRequired in interface Field
        Overrides:
        isRequired in class AbstractField
        Returns:
        true if a non-blank value is required for the field