org.apache.tapestry.contrib.valid
Class DateField

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.valid.ValidField
                  extended by org.apache.tapestry.contrib.valid.DateField
All Implemented Interfaces:
org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, IFormComponent, IComponent, IDirectEvent, Component, IRender

public abstract class DateField
extends ValidField

Backwards compatible version of the 1.0.7 DateField component.

Parameter Type Read / Write Required Default Description
date java.util.Date R / W yes   The date property to edit.
required boolean R no no If true, then a value must be entered.
minimum java.util.Date R no   If provided, the date entered must be equal to or later than the provided minimum date.
maximum java.util.Date R no   If provided, the date entered must be less than or equal to the provided maximum date.
displayName String R yes   A textual name for the field that is used when formulating error messages.
format DateFormat R no Default format MM/dd/yyyy The format used to display and parse dates.
displayFormat String R no MM/DD/YYYY The format string presented to the user if the date entered is in an incorrect format. e.g. the format object throws a ParseException.

Informal parameters are allowed. A body is not allowed.

Since:
1.0.8
Author:
Howard Lewis Ship, Richard Lewis-Shell
See Also:
ValidField

Field Summary
 
Fields inherited from class org.apache.tapestry.AbstractComponent
_body, _bodyCount
 
Constructor Summary
DateField()
           
 
Method Summary
abstract  Date getDate()
           
abstract  String getDisplayFormat()
           
abstract  DateFormat getFormat()
           
abstract  Date getMaximum()
           
abstract  Date getMinimum()
           
 IValidator getValidator()
          Overrides ValidField.getValidator()to construct a validator on-the-fly.
 Object getValue()
           
abstract  boolean isRequired()
          Returns false.
abstract  void setDate(Date date)
           
 void setValue(Object value)
           
 
Methods inherited from class org.apache.tapestry.valid.ValidField
getDisplayName, isDisabled, isHidden, readValue, renderFormComponent, rewindFormComponent, updateValue
 
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.IFormComponent
getClientId
 
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, 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

DateField

public DateField()
Method Detail

getDate

public abstract Date getDate()

setDate

public abstract void setDate(Date date)

getMinimum

public abstract Date getMinimum()

getMaximum

public abstract Date getMaximum()

isRequired

public abstract 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

getFormat

public abstract DateFormat getFormat()

getDisplayFormat

public abstract String getDisplayFormat()

getValidator

public IValidator getValidator()
Overrides ValidField.getValidator()to construct a validator on-the-fly.

Specified by:
getValidator in class ValidField

getValue

public Object getValue()
Specified by:
getValue in class ValidField
See Also:
ValidField.getValue()

setValue

public void setValue(Object value)
Specified by:
setValue in class ValidField
See Also:
ValidField.setValue(java.lang.Object)


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