com.plumtree.uiinfrastructure.pagecontrols.htmldatetimepicker
Class HTMLDateTimePicker

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
              extended by com.plumtree.uiinfrastructure.pagecontrols.htmldatetimepicker.HTMLDateTimePicker
All Implemented Interfaces:
IManagedObject, IMVCObject, IPageControl

public class HTMLDateTimePicker
extends DatePicker

Author:
DorisL

Field Summary
 java.lang.String STR_MVC_CLASS_NAME
           
 
Fields inherited from class com.plumtree.uiinfrastructure.pagecontrols.datepicker.DatePicker
BLANK, DAY_DROP_DOWN, DELIMETERS, m_strDay, m_strMonth, m_strYear, MAX_DAY, MIN_DAY, MIN_YEAR, MONTH_DROP_DOWN, NUM_OF_MONTHS, NUM_OF_YEARS, REG_EXP_DELEMETERS, STR_BLANK, STR_COMP_BASE_NAME, YEAR_DROP_DOWN
 
Fields inherited from class com.plumtree.uiinfrastructure.pagecontrols.datepicker.ADatePickerComponent
AM, H, OPTION_TEXT, OPTION_VALUE, PM
 
Fields inherited from class com.plumtree.uiinfrastructure.pagecontrols.framework.AComponent
m_ptPageMgr
 
Constructor Summary
HTMLDateTimePicker()
          Empty constructor Creates a new HTMLDateTimePicker
 
Method Summary
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 java.lang.String GetAMPM()
          This method returns the AM/PM part of the time.
 java.lang.String GetAMPMInputName()
          Provides a means of retrieving the HTML Input name for the AMPM portion of the date picker.
 HTMLElementCollection GetComponentHTML()
          This method returns the date/time-picker HTML.
static XPDateTime GetDateTime(XPHashtable _htRequestParameters, java.lang.String _strUniqueInstanceID, XPLocale _xpLocale, XPTimeZone _xpTimeZone, boolean _bDoValidation)
          Return the XPDateTime for the specific date picker
 XPDateTime GetDateTimeAsDateTime()
          This function returns an XPDateTime object that represents the date and time the user has chosen using the date/time-picker HTML control.
 java.lang.String GetDateTimeAsString()
          This method returns the date and time as a String.
 java.lang.String GetHours()
          This method returns the hours part of the time as a String.
 java.lang.String GetHoursInputName()
          Provides a means of retrieving the HTML Input name for the hours portion of the date picker.
 java.lang.String GetMinutes()
          This method returns the minutes part of the time as a String.
 java.lang.String GetMinutesInputName()
          Provides a means of retrieving the HTML Input name for the minutes portion of the date picker.
 java.lang.String GetName()
          Return the name of the MVC object.
 HTMLElementCollection GetSubComponentHTMLByIndex(int _nSubComponentIndex)
          This method serves as a getter for "sub-component" HTML.
 java.lang.String GetTimeAsString()
          This method returns just the time part of the String.
 void Init(java.lang.String _strFormName, PageMgr _ptPageMgr, java.lang.String _strUniqueInstanceID)
          Initialize this HTMLDateTimePicker
 void Init(java.lang.String _strFormName, XPDateTime _dtDefaultDateTime, PageMgr _ptPageMgr, java.lang.String _strUniqueInstanceID)
          Initialize this HTMLDateTimePicker and set it to the default datetime if that datetime isn't null.
 int StoreUserInput(XPHashtable _htRequestParameters)
          Stores the user input after the request is sent back.
 
Methods inherited from class com.plumtree.uiinfrastructure.pagecontrols.datepicker.DatePicker
GetComponentMgr, GetComponentMgrName, GetDateAsDateTime, GetDateInputName, GetHTMLComponentBaseName, GetPTDatepickerVarName, GetSelectedDateAsString, GetValidators, SetBlankDate, Validate
 
Methods inherited from class com.plumtree.uiinfrastructure.pagecontrols.datepicker.ADatePickerComponent
GetDateTime, SetDefaultDate
 
Methods inherited from class com.plumtree.uiinfrastructure.pagecontrols.framework.AComponent
AppendUniqueIDToElementName, GetComponentHeadContent, GetComponentPostContent, GetComponentPreContent, GetComponentPreFormContent, GetPageMgr, 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

STR_MVC_CLASS_NAME

public java.lang.String STR_MVC_CLASS_NAME
Constructor Detail

HTMLDateTimePicker

public HTMLDateTimePicker()
Empty constructor Creates a new HTMLDateTimePicker

Method Detail

Init

public void Init(java.lang.String _strFormName,
                 PageMgr _ptPageMgr,
                 java.lang.String _strUniqueInstanceID)
Initialize this HTMLDateTimePicker

Overrides:
Init in class DatePicker
Parameters:
_strFormName - the name of the form where this HTMLDateTimePicker appears
_ptPageMgr - the PageMgr that owns this HTMLDateTimePicker
_strUniqueInstanceID - a unique id for the HTMLDateTimePicker

Init

public void Init(java.lang.String _strFormName,
                 XPDateTime _dtDefaultDateTime,
                 PageMgr _ptPageMgr,
                 java.lang.String _strUniqueInstanceID)
Initialize this HTMLDateTimePicker and set it to the default datetime if that datetime isn't null.

Overrides:
Init in class DatePicker
Parameters:
_strFormName - the name of the form where this HTMLDateTimePicker appears
_dtDefaultDateTime - to set the HTMLDateTimePicker to
_ptPageMgr - the PageMgr that owns this HTMLDateTimePicker
_strUniqueInstanceID - a unique id for the HTMLDateTimePicker

GetAMPM

public java.lang.String GetAMPM()
This method returns the AM/PM part of the time. If we are using 24-hour time this method returns null.

Returns:
The AM/PM part of the time String.

GetAMPMInputName

public java.lang.String GetAMPMInputName()
Provides a means of retrieving the HTML Input name for the AMPM portion of the date picker.

Returns:
String

GetComponentHTML

public HTMLElementCollection GetComponentHTML()
This method returns the date/time-picker HTML.

Specified by:
GetComponentHTML in interface IPageControl
Overrides:
GetComponentHTML in class DatePicker
Returns:
The HTMLElementCollection that is the date and time picker.

GetDateTimeAsDateTime

public XPDateTime GetDateTimeAsDateTime()
This function returns an XPDateTime object that represents the date and time the user has chosen using the date/time-picker HTML control.

Overrides:
GetDateTimeAsDateTime in class ADatePickerComponent
Returns:
XPDateTime

GetDateTimeAsString

public java.lang.String GetDateTimeAsString()
This method returns the date and time as a String.

Returns:
The date/time string.

GetHours

public java.lang.String GetHours()
This method returns the hours part of the time as a String.

Returns:
The hours.

GetHoursInputName

public java.lang.String GetHoursInputName()
Provides a means of retrieving the HTML Input name for the hours portion of the date picker.

Returns:
String

GetMinutes

public java.lang.String GetMinutes()
This method returns the minutes part of the time as a String.

Returns:
The minutes.

GetMinutesInputName

public java.lang.String GetMinutesInputName()
Provides a means of retrieving the HTML Input name for the minutes portion of the date picker.

Returns:
String

GetSubComponentHTMLByIndex

public HTMLElementCollection GetSubComponentHTMLByIndex(int _nSubComponentIndex)
This method serves as a getter for "sub-component" HTML. The date/time-picker is made up of two sub-components: the date-picker and the time-picker. The constants for component sub-index should be specified in the component file.

Overrides:
GetSubComponentHTMLByIndex in class AComponent
Parameters:
_nSubComponentIndex - The sub-component index (N_SUB_COMPONENT_INDEX_DATE_PICKER or N_SUB_COMPONENT_INDEX_TIME_PICKER).
Returns:
The HTML for the sub-component requested.

GetTimeAsString

public java.lang.String GetTimeAsString()
This method returns just the time part of the String.

Returns:
The time String.

StoreUserInput

public int StoreUserInput(XPHashtable _htRequestParameters)
Stores the user input after the request is sent back.

Specified by:
StoreUserInput in interface IPageControl
Overrides:
StoreUserInput in class DatePicker
Parameters:
_htRequestParameters - The XPHashtable of request name/value pairs.
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
Overrides:
Create in class DatePicker
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
Overrides:
GetName in class DatePicker
Returns:
the name of the object.

GetDateTime

public static XPDateTime GetDateTime(XPHashtable _htRequestParameters,
                                     java.lang.String _strUniqueInstanceID,
                                     XPLocale _xpLocale,
                                     XPTimeZone _xpTimeZone,
                                     boolean _bDoValidation)
Return the XPDateTime for the specific date picker

Parameters:
_htRequestParameters -
_strUniqueInstanceID -
_xpLocale -
_xpTimeZone -
boolean - _bDoValidation , set to true if date must be set (pulldowns cannot be empty)
Returns:
XPDateTime



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