com.plumtree.uiinfrastructure.pagecontrols.jsdatetimepicker
Class JSDateTimePicker

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.jsdatepicker.JSDatePicker
              extended by com.plumtree.uiinfrastructure.pagecontrols.jsdatetimepicker.JSDateTimePicker
All Implemented Interfaces:
IManagedObject, IMVCObject, IPageControl

public class JSDateTimePicker
extends JSDatePicker
implements IPageControl

This class defines the JSDateTimePicker control.

Author:
John Osborne, Caius van Nouhuys

Field Summary
static java.lang.String STR_MVC_CLASS_NAME
           
 
Fields inherited from class com.plumtree.uiinfrastructure.pagecontrols.jsdatepicker.JSDatePicker
m_oUSLocale, m_strDatePickerMgrID, STR_DP_DATE_INPUT_NAME
 
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
JSDateTimePicker()
          Default empty constructor.
 
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 _strDateInputName, XPLocale _xpLocale, XPTimeZone _xpTimeZone)
          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 a new JSDateTimePicker.
 void Init(java.lang.String _strFormName, java.lang.String _strDefaultDate, PageMgr _ptPageMgr, java.lang.String _strUniqueInstanceID)
          Initialize a new JSDateTimePicker.
 int StoreUserInput(XPHashtable _htRequestParameters)
          Stores the user input after the request is sent back.
 
Methods inherited from class com.plumtree.uiinfrastructure.pagecontrols.jsdatepicker.JSDatePicker
GetComponentHTML, GetComponentMgr, GetComponentMgrName, GetDateAsDateTime, GetDateInputName, GetPTDatepickerVarName, GetSelectedDateAsString, GetValidators, SetDatePickerMgrID, Validate
 
Methods inherited from class com.plumtree.uiinfrastructure.pagecontrols.datepicker.ADatePickerComponent
GetDateTime, SetBlankDate, 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
GetComponentMgr, GetComponentMgrName, GetUniqueInstanceID
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
See Also:
Constant Field Values
Constructor Detail

JSDateTimePicker

public JSDateTimePicker()
Default empty constructor.

Method Detail

Init

public void Init(java.lang.String _strFormName,
                 java.lang.String _strDefaultDate,
                 PageMgr _ptPageMgr,
                 java.lang.String _strUniqueInstanceID)
Initialize a new JSDateTimePicker.

Overrides:
Init in class JSDatePicker
Parameters:
_strFormName - The name of the form in which the datepicker resides
_strDefaultDate - The initial date selected
_ptPageMgr - The datepicker page manager for this instance of the datepicker
_strUniqueInstanceID - The string that will be appended to variables to make them unique

Init

public void Init(java.lang.String _strFormName,
                 PageMgr _ptPageMgr,
                 java.lang.String _strUniqueInstanceID)
Initialize a new JSDateTimePicker.

Overrides:
Init in class JSDatePicker
Parameters:
_strFormName - The name of the form in which the datepicker resides
_ptPageMgr - The datepicker page manager for this instance of the datepicker
_strUniqueInstanceID - The string that will be appended to variables to make them unique

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. This allows for using javascript to programmatically set input values, for example.

Returns:
String

GetComponentHTML

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

Specified by:
GetComponentHTML in interface IPageControl
Overrides:
GetComponentHTML in class JSDatePicker
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. This allows for using javascript to programmatically set input values, for example.

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. This allows for using javascript to programmatically set input values, for example.

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 JSDatePicker
Parameters:
_htRequestParameters - The XPHashtable of request name/value pairs.

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 JSDatePicker
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 JSDatePicker
Returns:
the name of the object.

GetDateTime

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

Parameters:
_htRequestParameters - The XPHashtable of request name/value pairs.
_strDateInputName - unique instance name for this control
_xpLocale - XPLocale for this control
_xpTimeZone - XPTimeZone for this control
Returns:
XPDateTime the XPDateTime derived from the request and various parameters passed in



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