Class Html5DateField
- java.lang.Object
-
- org.apache.tapestry5.corelib.base.AbstractField
-
- org.apache.tapestry5.corelib.components.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">)Component Parameters Name Type Flags Default Default Prefix clientId String 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. ensureClientIdUnique boolean Since 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. messages org. apache. tapestry5. commons. Messages Since 5.2.0.0 componentResources. messages prop Used to override the component's message catalog. validate org. 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. value java. util. Date Required prop The value parameter of a DateField must be a java.util.Date. Component Events Name Description validate
-
-
Field Summary
-
Fields inherited from class org.apache.tapestry5.corelib.base.AbstractField
cssClass, decorator, defaultProvider, disabled, environment, fieldValidationSupport, formSupport, javaScriptSupport, label, request, resources, validationTracker
-
-
Constructor Summary
Constructors Constructor Description Html5DateField()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isRequired()
Returns false; most components do not support declarative validation.protected void
processSubmission(String controlName)
Method implemented by subclasses to actually do the work of processing the submission of the form.-
Methods inherited from class org.apache.tapestry5.corelib.base.AbstractField
decorateInsideField, getClientId, getControlName, getLabel, isDisabled, putPropertyNameIntoBeanValidationContext, removePropertyNameFromBeanValidationContext, setDecorator, setFormSupport
-
-
-
-
Constructor Detail
-
Html5DateField
public Html5DateField()
-
-
Method Detail
-
processSubmission
protected void processSubmission(String 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 notdisabled
.- Specified by:
processSubmission
in classAbstractField
- 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 interfaceField
- Overrides:
isRequired
in classAbstractField
- Returns:
- true if a non-blank value is required for the field
-
-