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.DatePicker
All Implemented Interfaces:
org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, IFormComponent, TranslatedField, ValidatableField, IComponent, IDirectEvent, Component, IRender

public abstract class DatePicker
extends AbstractFormComponent
implements TranslatedField

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.

As of 4.0, this component can be configurably translated and validated.

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

Field Summary
 
Fields inherited from class org.apache.tapestry.AbstractComponent
_body, _bodyCount
 
Constructor Summary
DatePicker()
           
 
Method Summary
abstract  IAsset getIcon()
           
abstract  String getImageClass()
           
abstract  boolean getIncludeWeek()
           
abstract  IScript getScript()
          Injected.
abstract  String getTitle()
           
abstract  TranslatedFieldSupport getTranslatedFieldSupport()
          Injected.
abstract  ValidatableFieldSupport getValidatableFieldSupport()
          Injected.
abstract  Date getValue()
           
abstract  boolean isDisabled()
          Returns true if the component is disabled.
 boolean isRequired()
          Returns false.
protected  void renderFormComponent(IMarkupWriter writer, IRequestCycle cycle)
          Invoked from AbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle) to render the component.
protected  void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle)
          Invoked from AbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle) to rewind the component.
abstract  void setValue(Date value)
           
 
Methods inherited from class org.apache.tapestry.form.AbstractFormComponent
generateClientId, getCanTakeFocus, getForm, getIdParameter, getName, getRenderBodyOnRewind, peekClientId, renderComponent, renderDelegateAttributes, renderDelegatePrefix, renderDelegateSuffix, setForm, setName, setName
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, equals, finishLoad, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getBoundId, getClientId, getComponent, getComponents, getContainedComponent, getContainedRenderers, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getInnerRenderers, getListeners, getMessages, getNamespace, getPage, getRenderWorker, getSpecification, getSpecifiedId, getTemplateTagName, hasEvents, hashCode, isInActiveState, isParameterBound, isRendering, isStateful, pageEndRender, prepareForRender, render, renderBody, renderIdAttribute, renderInformalParameters, setBinding, setClientId, setContainedComponent, setContainer, setHasEvents, setId, setNamespace, setPage, setTemplateTagName, toString, triggerEvent
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.form.TranslatedField
getTranslator
 
Methods inherited from interface org.apache.tapestry.form.ValidatableField
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, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getSpecification, getSpecifiedId, getTemplateTagName, isRendering, peekClientId, renderBody, setBinding, setClientId, setContainedComponent, setContainer, setId, setNamespace, setPage, setTemplateTagName
 
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 Date getValue()

setValue

public abstract void setValue(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.

Specified by:
isDisabled in interface IFormComponent

getIncludeWeek

public abstract boolean getIncludeWeek()

getIcon

public abstract IAsset getIcon()

getImageClass

public abstract String getImageClass()

getTitle

public abstract String getTitle()
Since:
4.1.1

getScript

public abstract IScript getScript()
Injected.

Since:
4.0

renderFormComponent

protected void renderFormComponent(IMarkupWriter writer,
                                   IRequestCycle cycle)
Description copied from class: AbstractFormComponent
Invoked from AbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle) to render the component.

Specified by:
renderFormComponent in class AbstractFormComponent
See Also:
AbstractFormComponent.renderFormComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)

rewindFormComponent

protected void rewindFormComponent(IMarkupWriter writer,
                                   IRequestCycle cycle)
Description copied from class: AbstractFormComponent
Invoked from AbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle) to rewind the component. If the component is disabled this will not be invoked.

Specified by:
rewindFormComponent in class AbstractFormComponent
See Also:
AbstractFormComponent.rewindFormComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)

getValidatableFieldSupport

public abstract ValidatableFieldSupport getValidatableFieldSupport()
Injected.


getTranslatedFieldSupport

public abstract TranslatedFieldSupport getTranslatedFieldSupport()
Injected.


isRequired

public boolean isRequired()
Description copied from class: AbstractFormComponent
Returns false. Subclasses that might be required must override this method. Typically, this involves checking against the component's validators.

Specified by:
isRequired in interface IFormComponent
Overrides:
isRequired in class AbstractFormComponent
See Also:
AbstractFormComponent.isRequired()


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.