PAJES 3.0.21

org.pajes.html
Class InputDateTimeString

java.lang.Object
  extended by org.pajes.html.Tag
      extended by org.pajes.html.Input
          extended by org.pajes.html.InputField
              extended by org.pajes.html.InputString
                  extended by org.pajes.html.InputDateTimeString
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, HTML, InputMandatoryValidation, InputValidation
Direct Known Subclasses:
InputDate, InputTime, InputTimestamp

public class InputDateTimeString
extends InputString

This class creates an input field in a form that accepts a a formatted string from the user.

See Also:
IsDateTime, Serialized Form

Field Summary
 
Fields inherited from class org.pajes.html.Input
TYPE_ATTRIBUTE
 
Fields inherited from class org.pajes.html.Tag
ON_CLICK_ATTRIBUTE, TAG_CLOSE, TAG_LEFT, TAG_RIGHT
 
Constructor Summary
protected InputDateTimeString()
          Creates a new InputFormattedString object.
  InputDateTimeString(Form form, java.lang.String name, java.text.SimpleDateFormat format)
          Creates a named input field with the specified format mask.
  InputDateTimeString(Form form, java.lang.String name, java.text.SimpleDateFormat format, java.lang.String value)
          Creates a named input field with the specified format mask and default value.
  InputDateTimeString(InputField source, java.text.SimpleDateFormat format)
          Creates a named input field.
 
Method Summary
 java.util.Date getDateValue()
          Returns the value as a Date object.
 java.text.SimpleDateFormat getFormat()
          Returns the validation format mask assigned to this field.
 InputDateTimeString setFormat(java.text.SimpleDateFormat format)
          Sets the validation format for this field.
 Input setValue(java.util.Date value)
          Sets the value attribute of this INPUT tag.
 Input setValue(java.lang.String value)
          Sets the value attribute of this INPUT tag.
 
Methods inherited from class org.pajes.html.InputField
getClientValidation, getMaxLength, getSize, isMandatory, setMandatory, setMandatory, setMandatory, setMaxLength, setMaxLength, setSize, setSize
 
Methods inherited from class org.pajes.html.Input
addClientValidation, addContent, clone, getClientValidation, getDOMReference, getFieldNameForErrorMessage, getForm, getInstance, getLabel, getName, getOnBlurHandler, getOnChangeHandler, getOnFocusHandler, getOnSelectHandler, getReadOnlyStyleSheetClass, getTabIndex, getType, getValue, isChangeFlagEnabled, isDisabled, isReadOnly, isRequiringValidation, logNoFormWarning, removeClientValidation, removeClientValidation, removeClientValidation, removeMandatoryClientValidation, setChanged, setChangedFlag, setContent, setDisabled, setFieldNameInErrorMessage, setFieldNameInErrorMessage, setForm, setId, setLabel, setName, setOnBlurHandler, setOnBlurValidation, setOnChangeHandler, setOnClickHandler, setOnFocusHandler, setOnSelectHandler, setReadOnly, setReadOnlyStyleSheetClass, setTabIndex, setTabIndex, setTabIndex, write
 
Methods inherited from class org.pajes.html.Tag
addAttribute, addAttributes, addAttributes, clearAttribute, clearAttributes, destroy, getAttribute, getAttributes, getAttributeSet, getContainer, getContent, getDocument, getId, getOnClickHandler, getOnDBLClickHandler, getOnKeyDownHandler, getOnKeyPressHandler, getOnKeyUpHandler, getOnMouseDownHandler, getOnMouseOutHandler, getOnMouseOverHandler, getOnMouseUpHandler, getParent, getStyle, getStyleSheetClass, getTagName, getTitle, getWritePermission, hasAttribute, init, initAttributes, isChildOf, isChildOf, isWritable, isWritable, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setContainer, setContent, setOnDBLClickHandler, setOnKeyDownHandler, setOnKeyPressHandler, setOnKeyUpHandler, setOnMouseDownHandler, setOnMouseOutHandler, setOnMouseOverHandler, setOnMouseUpHandler, setParent, setStyle, setStyleSheetClass, setTagName, setTitle, setWritable, setWriteAttributes, setWriteEndTag, setWritelnAfter, setWritelnAfterContent, setWritelnBefore, setWritelnBeforeContent, setWritePermission, toString, writeContent
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.pajes.html.InputValidation
getDOMReference, getName, isRequiringValidation, setOnBlurValidation
 

Constructor Detail

InputDateTimeString

public InputDateTimeString(Form form,
                           java.lang.String name,
                           java.text.SimpleDateFormat format)
Creates a named input field with the specified format mask.

Parameters:
form - the form on which this input field will appear. Note that the element must still be added to the form - this reference is used by the getDOMReference() method to determine the fully qualified element name.
name - the name to apply to the input object, so that it may be manipulated using client-side JavaScript.
format - a format string that complies with the requirements ofIsDateTime.

InputDateTimeString

public InputDateTimeString(Form form,
                           java.lang.String name,
                           java.text.SimpleDateFormat format,
                           java.lang.String value)
Creates a named input field with the specified format mask and default value.

Parameters:
form - the form on which this input field will appear. Note that the element must still be added to the form - this reference is used by the getDOMReference() method to determine the fully qualified element name.
name - the name to apply to the input object, so that it may be manipulated using client-side JavaScript.
format - a format string that complies with the requirements ofIsDateTime.
value - the default value to assign.

InputDateTimeString

public InputDateTimeString(InputField source,
                           java.text.SimpleDateFormat format)
Creates a named input field.

Parameters:
source - the input field from which this input field will be created.
format - a format string that complies with the requirements ofIsDateTime.

InputDateTimeString

protected InputDateTimeString()
Creates a new InputFormattedString object.

Method Detail

getDateValue

public java.util.Date getDateValue()
Returns the value as a Date object.

Returns:
the Date.

getFormat

public java.text.SimpleDateFormat getFormat()
Returns the validation format mask assigned to this field.

Returns:
the validation format mask assigned to this field.

setFormat

public InputDateTimeString setFormat(java.text.SimpleDateFormat format)
Sets the validation format for this field. The field size and maximum input length is set to the size of the specified format.

Parameters:
format - a DateFormat that complies with the requirements ofIsDateTime. Note that the object may be modified as necessary!
Returns:
the modified InputFormattedString object.

setValue

public Input setValue(java.util.Date value)
Sets the value attribute of this INPUT tag.

Parameters:
value - the value to assign.
Returns:
the modified Input object.

setValue

public Input setValue(java.lang.String value)
Sets the value attribute of this INPUT tag.

Overrides:
setValue in class Input
Parameters:
value - the value to assign.
Returns:
the modified Input object.
Throws:
TagException - if the specified value cannot be parsed into a date.

PAJES 3.0.21

Copyright © 1998-2007 Viridian Pty Limited. All Rights Reserved.