com.plumtree.uiinfrastructure.pagecontrols.datepicker
Class DatePicker

java.lang.Object
  extended by com.plumtree.uiinfrastructure.pagecontrols.framework.AComponent
      extended by com.plumtree.uiinfrastructure.pagecontrols.datepicker.ADatePickerComponent
          extended by com.plumtree.uiinfrastructure.pagecontrols.datepicker.DatePicker
All Implemented Interfaces:
IManagedObject, IMVCObject, IPageControl
Direct Known Subclasses:
HTMLDateTimePicker

public class DatePicker
extends ADatePickerComponent
implements IPageControl

Page Control for HTML Date Picker.

Author:
Doris Lin

Field Summary
static int BLANK
          Constant for Month Names
static java.lang.String DAY_DROP_DOWN
          String constant for day select drop down component
static java.lang.String DELIMETERS
          Delimeters in the date pattern
protected  java.lang.String m_strDay
           
protected  java.lang.String m_strMonth
          Variables to save the month, day, and year
protected  java.lang.String m_strYear
           
static int MAX_DAY
           
static int MIN_DAY
           
static int MIN_YEAR
          String constant for min year, max year, min num of days, max num of days
static java.lang.String MONTH_DROP_DOWN
          String constant for month select drop down component
static int NUM_OF_MONTHS
           
static int NUM_OF_YEARS
           
static java.lang.String REG_EXP_DELEMETERS
          Reg.
static java.lang.String STR_BLANK
          Constant String for BLANK
static java.lang.String STR_COMP_BASE_NAME
          component's base name
static java.lang.String STR_MVC_CLASS_NAME
          mvc class name for datepicker component
static java.lang.String YEAR_DROP_DOWN
          String constant for year select drop down component
 
Fields inherited from class com.plumtree.uiinfrastructure.pagecontrols.datepicker.ADatePickerComponent
AM, EMPTY, H, OPTION_TEXT, OPTION_VALUE, PM
 
Fields inherited from class com.plumtree.uiinfrastructure.pagecontrols.framework.AComponent
m_ptPageMgr
 
Constructor Summary
DatePicker()
          Creates a new DatePicker for 508 mode
 
Method Summary
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 HTMLElementCollection GetComponentHTML()
          Returns the HTML for this component.
 ComponentMgr GetComponentMgr(PageMgr _ptPageMgr)
          Return a ComponentMgr of the type responsisble for this PageControl.
 java.lang.String GetComponentMgrName()
          Return the name of the component manager responsible for this page control
 XPDateTime GetDateAsDateTime()
          This function returns an XPDateTime object that represents the date and the user has chosen using the HTMLDatePicker.
 java.lang.String GetDateInputName()
          Returns the name of the date input.
protected  java.lang.String GetHTMLComponentBaseName()
          Returns the base name of this HTML OpenComponent.
 java.lang.String GetName()
          Return the name of the MVC object.
 java.lang.String GetPTDatepickerVarName()
          Returns the name of the PTDatepicker JavaScript variable name.
 java.lang.String GetSelectedDateAsString()
          Returns the date as a String in the pattern format specified by the locale, null values in memeber variables, m_strYear, m_strMonth, or m_strDay indicate an invalid date so return the default, and empty String.
 XPArrayList GetValidators()
          Currently validation on the date/time picker page controls is not implemented.
 void Init(java.lang.String _strFormName, PageMgr _ptPageMgr, java.lang.String _strUniqueInstanceID)
          initializes a new HTMLDatePicker object with the month, day and year blank
 void Init(java.lang.String _strFormName, XPDateTime _xpDateTime, PageMgr _ptPageMgr, java.lang.String _strUniqueInstanceID)
          Initializes a new DatePicker Page Control with the given datetime as the preset value.
 void SetBlankDate()
          Sets the month, day, and year of drop down menus to blank
 int StoreUserInput(XPHashtable _htRequestParameters)
          Store the new value of this HTML component.
 XPArrayList Validate()
          Currently validation on the date/time picker page controls is not implemented.
 
Methods inherited from class com.plumtree.uiinfrastructure.pagecontrols.datepicker.ADatePickerComponent
GetDateTime, GetDateTimeAsDateTime, SetDefaultDate
 
Methods inherited from class com.plumtree.uiinfrastructure.pagecontrols.framework.AComponent
AppendUniqueIDToElementName, GetComponentHeadContent, GetComponentPostContent, GetComponentPreContent, GetComponentPreFormContent, GetPageMgr, GetSubComponentHTMLByIndex, GetUniqueInstanceID, Init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.plumtree.uiinfrastructure.activityspace.IPageControl
GetUniqueInstanceID
 

Field Detail

MONTH_DROP_DOWN

public static final java.lang.String MONTH_DROP_DOWN
String constant for month select drop down component

See Also:
Constant Field Values

DAY_DROP_DOWN

public static final java.lang.String DAY_DROP_DOWN
String constant for day select drop down component

See Also:
Constant Field Values

YEAR_DROP_DOWN

public static final java.lang.String YEAR_DROP_DOWN
String constant for year select drop down component

See Also:
Constant Field Values

MIN_YEAR

public static final int MIN_YEAR
String constant for min year, max year, min num of days, max num of days

See Also:
Constant Field Values

NUM_OF_YEARS

public static final int NUM_OF_YEARS
See Also:
Constant Field Values

MIN_DAY

public static final int MIN_DAY
See Also:
Constant Field Values

MAX_DAY

public static final int MAX_DAY
See Also:
Constant Field Values

NUM_OF_MONTHS

public static final int NUM_OF_MONTHS
See Also:
Constant Field Values

BLANK

public static final int BLANK
Constant for Month Names

See Also:
Constant Field Values

STR_BLANK

public static final java.lang.String STR_BLANK
Constant String for BLANK

See Also:
Constant Field Values

DELIMETERS

public static final java.lang.String DELIMETERS
Delimeters in the date pattern

See Also:
Constant Field Values

REG_EXP_DELEMETERS

public static final java.lang.String REG_EXP_DELEMETERS
Reg. expression for delimeters in date pattern

See Also:
Constant Field Values

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
mvc class name for datepicker component

See Also:
Constant Field Values

STR_COMP_BASE_NAME

public static final java.lang.String STR_COMP_BASE_NAME
component's base name

See Also:
Constant Field Values

m_strMonth

protected java.lang.String m_strMonth
Variables to save the month, day, and year


m_strDay

protected java.lang.String m_strDay

m_strYear

protected java.lang.String m_strYear
Constructor Detail

DatePicker

public DatePicker()
Creates a new DatePicker for 508 mode

Method Detail

Init

public void Init(java.lang.String _strFormName,
                 PageMgr _ptPageMgr,
                 java.lang.String _strUniqueInstanceID)
initializes a new HTMLDatePicker object with the month, day and year blank

Specified by:
Init in class ADatePickerComponent
Parameters:
_strFormName - Name of the form where this DatePicker appears
_ptPageMgr - the PageMgr responsible for this control
_strUniqueInstanceID - unique id for this instance

Init

public void Init(java.lang.String _strFormName,
                 XPDateTime _xpDateTime,
                 PageMgr _ptPageMgr,
                 java.lang.String _strUniqueInstanceID)
Initializes a new DatePicker Page Control with the given datetime as the preset value.

Specified by:
Init in class ADatePickerComponent
Parameters:
_strFormName - Name of the form where this DatePicker appears
_xpDateTime - Preset DateTime
_ptPageMgr - the PageMgr responsible for this control
_strUniqueInstanceID - unique id for this instance

SetBlankDate

public void SetBlankDate()
Sets the month, day, and year of drop down menus to blank

Overrides:
SetBlankDate in class ADatePickerComponent

GetHTMLComponentBaseName

protected java.lang.String GetHTMLComponentBaseName()
Returns the base name of this HTML OpenComponent.

Returns:
String

GetSelectedDateAsString

public java.lang.String GetSelectedDateAsString()
Returns the date as a String in the pattern format specified by the locale, null values in memeber variables, m_strYear, m_strMonth, or m_strDay indicate an invalid date so return the default, and empty String.

Specified by:
GetSelectedDateAsString in class ADatePickerComponent
Returns:
String the date as a String

GetDateAsDateTime

public XPDateTime GetDateAsDateTime()
This function returns an XPDateTime object that represents the date and the user has chosen using the HTMLDatePicker.

Overrides:
GetDateAsDateTime in class ADatePickerComponent
Returns:
XPDateTime

GetComponentHTML

public HTMLElementCollection GetComponentHTML()
Returns the HTML for this component.

Specified by:
GetComponentHTML in interface IPageControl
Specified by:
GetComponentHTML in class AComponent
Returns:
HTMLElementCollection the HTML to display this control

StoreUserInput

public int StoreUserInput(XPHashtable _htRequestParameters)
Store the new value of this HTML component.

Specified by:
StoreUserInput in interface IPageControl
Specified by:
StoreUserInput in class AComponent
Parameters:
_htRequestParameters - name/value pairs for the request
Returns:
int - the status of the page

Create

public java.lang.Object Create()
This method is used by the ASManager to return new instances of managed objects.

Specified by:
Create in interface IManagedObject
Specified by:
Create in class AComponent
Returns:
A new instance of the managed class (i.e. return new Foo();)

GetName

public java.lang.String GetName()
Return the name of the MVC object.

Specified by:
GetName in interface IMVCObject
Specified by:
GetName in class AComponent
Returns:
the name of the object.

GetPTDatepickerVarName

public java.lang.String GetPTDatepickerVarName()
Returns the name of the PTDatepicker JavaScript variable name. In this case there isn't one so return null;

Specified by:
GetPTDatepickerVarName in class ADatePickerComponent
Returns:
the name of the object.

GetDateInputName

public java.lang.String GetDateInputName()
Returns the name of the date input. In this case there isn't one so return null;

Specified by:
GetDateInputName in class ADatePickerComponent
Returns:
the name of the object.

GetComponentMgr

public ComponentMgr GetComponentMgr(PageMgr _ptPageMgr)
Description copied from interface: IPageControl
Return a ComponentMgr of the type responsisble for this PageControl.

Specified by:
GetComponentMgr in interface IPageControl
Parameters:
_ptPageMgr - this PageMgr
Returns:
a ComponentMgr

GetComponentMgrName

public java.lang.String GetComponentMgrName()
Return the name of the component manager responsible for this page control

Specified by:
GetComponentMgrName in interface IPageControl
Returns:
the name of the ComponentMgr for this class

Validate

public XPArrayList Validate()
Currently validation on the date/time picker page controls is not implemented. This method returns null.

Specified by:
Validate in class AComponent
Returns:
Arraylist of UIErrors.

GetValidators

public XPArrayList GetValidators()
Currently validation on the date/time picker page controls is not implemented. This method returns null.

Specified by:
GetValidators in class AComponent
Returns:



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.