org.apache.tapestry.form
Class DatePicker

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.form.AbstractFormComponent
              extended by org.apache.tapestry.form.AbstractValidatableField
                  extended by org.apache.tapestry.form.DatePicker
All Implemented Interfaces:
org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, IFormComponent, ValidatableField, IComponent, IRender

public abstract class DatePicker
extends AbstractValidatableField

Provides a Form java.util.Date field component for selecting dates. [ Component Reference ] As of 4.0, DatePicker can indicate that it is required, use a custom translator (e.g. for java.sql.Date), and perform validation on the submitted date.

Since:
2.2
Author:
Paul Geerts, Malcolm Edgar, Paul Ferraro

Constructor Summary
DatePicker()
           
 
Method Summary
protected  void finishLoad()
          Invoked, as a convienience, from AbstractComponent.finishLoad(IRequestCycle, IPageLoader, IComponentSpecification).
abstract  IAsset getIcon()
           
abstract  boolean getIncludeWeek()
           
abstract  IScriptSource getScriptSource()
          Injected
abstract  java.util.Date getValue()
           
abstract  boolean isDisabled()
          Returns true if the component is disabled.
 java.lang.Object readValue()
          Called during render to read the parameter that drives the value of is form component.
 void render(IMarkupWriter writer, IRequestCycle cycle, java.lang.String value)
          Renders this form component using the specified value.
abstract  void setValue(java.util.Date value)
           
 void writeValue(java.lang.Object value)
          Called during rewind to bind the successfully translated and validated value to the appropriate component parameter.
 
Methods inherited from class org.apache.tapestry.form.AbstractValidatableField
getSubmittedValue, getValidatableFieldSupport, renderContributions, renderFormComponent, rewindFormComponent
 
Methods inherited from class org.apache.tapestry.form.AbstractFormComponent
getForm, getIdParameter, getName, renderComponent, renderDelegateAttributes, renderDelegatePrefix, renderDelegateSuffix, renderIdAttribute, select, setClientId, setForm, setName, setName
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, finishLoad, format, format, format, format, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainer, setId, setNamespace, setPage, setProperty, toString
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.form.ValidatableField
getTranslator, getValidators
 
Methods inherited from interface org.apache.tapestry.form.IFormComponent
getClientId, getDisplayName, getForm, getName, setName
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainer, setId, setNamespace, setPage, setProperty
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

DatePicker

public DatePicker()
Method Detail

getValue

public abstract java.util.Date getValue()

setValue

public abstract void setValue(java.util.Date value)

isDisabled

public abstract boolean isDisabled()
Description copied from interface: IFormComponent
Returns true if the component is disabled. This is important when the containing form is submitted, since disabled parameters do not update their bindings.


getIncludeWeek

public abstract boolean getIncludeWeek()

getIcon

public abstract IAsset getIcon()

getScriptSource

public abstract IScriptSource getScriptSource()
Injected

Since:
4.0

finishLoad

protected void finishLoad()
Description copied from class: AbstractComponent
Invoked, as a convienience, from AbstractComponent.finishLoad(IRequestCycle, IPageLoader, IComponentSpecification). This implemenation does nothing. Subclasses may override without invoking this implementation.

Overrides:
finishLoad in class AbstractComponent
See Also:
AbstractComponent.finishLoad()

render

public void render(IMarkupWriter writer,
                   IRequestCycle cycle,
                   java.lang.String value)
Description copied from interface: ValidatableField
Renders this form component using the specified value.

See Also:
org.apache.tapestry.form.validator.AbstractValidatableField#render(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle, java.lang.String)

readValue

public java.lang.Object readValue()
Description copied from interface: ValidatableField
Called during render to read the parameter that drives the value of is form component.

See Also:
ValidatableField.readValue()

writeValue

public void writeValue(java.lang.Object value)
Description copied from interface: ValidatableField
Called during rewind to bind the successfully translated and validated value to the appropriate component parameter.

See Also:
org.apache.tapestry.form.AbstractValidatableField#updateValue(java.lang.Object)