com.plumtree.uiinfrastructure.pagecontrols.jsdatepicker
Class JSDatePicker

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
All Implemented Interfaces:
IManagedObject, IMVCObject, IPageControl
Direct Known Subclasses:
JSDateTimePicker

public class JSDatePicker
extends ADatePickerComponent
implements IPageControl

Author:
John Osborne, John Hogan

Field Summary
protected static XPLocale m_oUSLocale
          Static EN-us locale used for formatting dates exchanged with client side javascript
 java.lang.String m_strDatePickerMgrID
          Variable to store a unique ID for the DatePickMgr associated with this DatePicker
static java.lang.String STR_DP_DATE_INPUT_NAME
          The base name of the date-picker input textbox.
static java.lang.String STR_MVC_CLASS_NAME
          MVC class name for page control
 
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
JSDatePicker()
          Create a new instance of JSDatePicker
 
Method Summary
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 HTMLElementCollection GetComponentHTML()
          This method returns the datepicker HTML.
 HTMLElementCollection GetComponentHTML(java.lang.String _strPickerType)
          This method returns the datepicker HTML.
 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 time the user has chosen using the date/time-picker HTML control.
 java.lang.String GetDateInputName()
          Provides a means of retrieving the HTML Input name for the date portion of the date picker.
 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 selected in the date picker as a 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)
          Initialize the JSDatePicker.
 void Init(java.lang.String _strFormName, java.lang.String _strDefaultDate, PageMgr _ptPageMgr, java.lang.String _strUniqueInstanceID)
          Initialize a new JSDatePicker object.
 void SetDatePickerMgrID(java.lang.String strDatePickerMgrID)
           
 int StoreUserInput(XPHashtable _htRequestParameters)
          Stores the user input after the request is sent back.
 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, SetBlankDate, 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

STR_DP_DATE_INPUT_NAME

public static final java.lang.String STR_DP_DATE_INPUT_NAME
The base name of the date-picker input textbox.

See Also:
Constant Field Values

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
MVC class name for page control

See Also:
Constant Field Values

m_strDatePickerMgrID

public java.lang.String m_strDatePickerMgrID
Variable to store a unique ID for the DatePickMgr associated with this DatePicker


m_oUSLocale

protected static final XPLocale m_oUSLocale
Static EN-us locale used for formatting dates exchanged with client side javascript

Constructor Detail

JSDatePicker

public JSDatePicker()
Create a new instance of JSDatePicker

Method Detail

Init

public void Init(java.lang.String _strFormName,
                 PageMgr _ptPageMgr,
                 java.lang.String _strUniqueInstanceID)
Initialize the JSDatePicker.

Specified by:
Init in class ADatePickerComponent
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

Init

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

Specified by:
Init in class ADatePickerComponent
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

GetComponentHTML

public HTMLElementCollection GetComponentHTML()
This method returns the datepicker HTML.

Specified by:
GetComponentHTML in interface IPageControl
Specified by:
GetComponentHTML in class AComponent
Returns:
The HTMLElementCollection that is the datepicker.

GetComponentHTML

public HTMLElementCollection GetComponentHTML(java.lang.String _strPickerType)
This method returns the datepicker HTML.

Parameters:
_strPickerType - the picker type.
Returns:
The HTMLElementCollection that is the datepicker.

GetDateInputName

public java.lang.String GetDateInputName()
Provides a means of retrieving the HTML Input name for the date portion of the date picker. This allows for using javascript to programmatically set input values, for example.

Specified by:
GetDateInputName in class ADatePickerComponent
Returns:
String

GetPTDatepickerVarName

public java.lang.String GetPTDatepickerVarName()
Returns the name of the PTDatepicker JavaScript variable name

Specified by:
GetPTDatepickerVarName in class ADatePickerComponent
Returns:
String

GetSelectedDateAsString

public java.lang.String GetSelectedDateAsString()
Returns the date selected in the date picker as a string

Specified by:
GetSelectedDateAsString in class ADatePickerComponent
Returns:
String

StoreUserInput

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

Specified by:
StoreUserInput in interface IPageControl
Specified by:
StoreUserInput in class AComponent
Parameters:
_htRequestParameters - The XPHashtable of request name/value pairs.

GetDateAsDateTime

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

Overrides:
GetDateAsDateTime in class ADatePickerComponent
Returns:
XPDateTime

SetDatePickerMgrID

public void SetDatePickerMgrID(java.lang.String strDatePickerMgrID)

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.

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

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.