org.apache.tapestry5.corelib.components
Class DateField
java.lang.Object
org.apache.tapestry5.corelib.base.AbstractField
org.apache.tapestry5.corelib.components.DateField
- All Implemented Interfaces:
- ClientElement, Field
@IncludeStylesheet(value="${tapestry.datepicker}/css/datepicker.css")
@IncludeJavaScriptLibrary(value={"${tapestry.datepicker}/js/datepicker.js","datefield.js"})
public class DateField- extends AbstractField
A component used to collect a provided date from the user using a client-side JavaScript calendar. Non-JavaScript
clients can simply type into a text field.
One wierd aspect here is that, because client-side JavaScript formatting and parsing is so limited, we (currently)
use Ajax to send the user's input to the server for parsing (before raising the popup) and formatting (after closing
the popup). Wierd and inefficient, but easier than writing client-side JavaScript for that purpose.
Tapestry's DateField component is a wrapper around WebFX
DatePicker.
|
Method Summary |
boolean |
isRequired()
Returns false; most components do not support declarative validation. |
protected void |
processSubmission(String elementName)
Method implemented by subclasses to actually do the work of processing the submission of the form. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateField
public DateField()
processSubmission
protected void processSubmission(String elementName)
- Description copied from class:
AbstractField
- Method implemented by subclasses to actually do the work of processing the submission of the form. The element's
elementName property will already have been set. This method is only invoked if the field is not
disabled.
- Specified by:
processSubmission in class AbstractField
- Parameters:
elementName - the name of the 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
Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.