com.plumtree.uiinfrastructure.pagecontrols.htmlpagecontrols
Class HTMLDuration

java.lang.Object
  extended by com.plumtree.uiinfrastructure.pagecontrols.framework.AComponent
      extended by com.plumtree.uiinfrastructure.pagecontrols.framework.AHTMLComponent
          extended by com.plumtree.uiinfrastructure.pagecontrols.htmlpagecontrols.HTMLDuration
All Implemented Interfaces:
IManagedObject, IMVCObject, IPageControl

public class HTMLDuration
extends AHTMLComponent
implements IPageControl

HTMLDuration Page Control handles display and values of a page control made up of a text box and a select dropdown. A bitwise operators (with values defined in PTDurationCombo) dictates that time increments to display in the select.

Author:
CaiusV

Field Summary
 HTMLSelectDropDown m_SelectDropDown
          the selectdropdown for this object
 HTMLTextBox m_TextBox
          the textbox for this object
static java.lang.String STR_MVC_CLASS_NAME
          class name constant
 
Fields inherited from class com.plumtree.uiinfrastructure.pagecontrols.framework.AComponent
m_ptPageMgr
 
Constructor Summary
HTMLDuration()
          Default constructor.
 
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.
protected  java.lang.String GetHTMLComponentBaseName()
          Returns the base name of this HTML Component.
 java.lang.String GetHTMLComponentValue()
          Return the component values of the TextBox and SelectDropdown separated by a space.
 java.lang.String GetJSValidationCode()
          Return a string made up of all the JSValidationCode for each of the Validator's associated with this component.
 java.lang.String GetName()
          Return the name of the MVC object.
 java.lang.String GetTextBoxErrorMessage()
           
 int GetValueInSeconds()
          Return the value of this page contrl in seconds.
 void Init(PageMgr _ptPageMgr, java.lang.String _strUniqueInstanceID, int _intDisplayFlags, AActivitySpace _asOwner, java.lang.String _strFormName, java.lang.String _strDefaultValue)
          Initializes a new HTMLTextAndDropDown object.
 void SetTextBoxErrorMessage(java.lang.String textBoxErrorMessage)
           
 XPArrayList Validate()
          For every Validator associated with this object execute it's Validate method.
 
Methods inherited from class com.plumtree.uiinfrastructure.pagecontrols.framework.AHTMLComponent
AddValidator, GetComponentMgr, GetComponentMgrName, GetHTMLComponentName, GetHTMLComponentSize, GetHTMLComponentStyleClass, GetLabel, GetValidators, Init, SetHTMLComponentName, SetHTMLComponentSize, SetHTMLComponentStyleClass, SetHTMLComponentValue, SetLabel, SetParameters, StoreUserInput
 
Methods inherited from class com.plumtree.uiinfrastructure.pagecontrols.framework.AComponent
AppendUniqueIDToElementName, GetComponentHeadContent, GetComponentPostContent, GetComponentPreContent, GetComponentPreFormContent, GetPageMgr, GetSubComponentHTMLByIndex, GetUniqueInstanceID
 
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, StoreUserInput
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
class name constant

See Also:
Constant Field Values

m_TextBox

public HTMLTextBox m_TextBox
the textbox for this object


m_SelectDropDown

public HTMLSelectDropDown m_SelectDropDown
the selectdropdown for this object

Constructor Detail

HTMLDuration

public HTMLDuration()
Default constructor. Creates a new HTMLTextAndDropDown object.

Method Detail

Init

public void Init(PageMgr _ptPageMgr,
                 java.lang.String _strUniqueInstanceID,
                 int _intDisplayFlags,
                 AActivitySpace _asOwner,
                 java.lang.String _strFormName,
                 java.lang.String _strDefaultValue)
Initializes a new HTMLTextAndDropDown object. Creates and initializes the HTMLTextBox and HTMLSelectDropdown objects contained by this object. A bitwise operators (with values defined in PTDurationCombo) dictates that time increments to display in the select.

Parameters:
_ptPageMgr - PageManager
_strUniqueInstanceID - Unique Instance ID
_intDisplayFlags - bitwise operator
_asOwner - AActivitySpace where this appears
_strFormName - name of the form on which this appears
_strDefaultValue - default value for textbox (must be an int)

GetHTMLComponentBaseName

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

Specified by:
GetHTMLComponentBaseName in class AHTMLComponent
Returns:
String

GetComponentHTML

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

Specified by:
GetComponentHTML in interface IPageControl
Specified by:
GetComponentHTML in class AComponent
Returns:
HTML for this object

GetHTMLComponentValue

public java.lang.String GetHTMLComponentValue()
Return the component values of the TextBox and SelectDropdown separated by a space.

Overrides:
GetHTMLComponentValue in class AHTMLComponent
Returns:
String

GetValueInSeconds

public int GetValueInSeconds()
Return the value of this page contrl in seconds. so if the units is set to minutes and the value of the textbox is 5 return 5 * 60 or 300.

Returns:
the value in seconds

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.

Validate

public XPArrayList Validate()
For every Validator associated with this object execute it's Validate method. Return an Arraylist of UIError objects generated from executing the Validators. Return and empty Arraylist if no problems were found.

Overrides:
Validate in class AHTMLComponent
Returns:
Arraylist of UIErrors.

GetJSValidationCode

public java.lang.String GetJSValidationCode()
Return a string made up of all the JSValidationCode for each of the Validator's associated with this component.

Overrides:
GetJSValidationCode in class AHTMLComponent
Returns:
JavaScript validation code

GetTextBoxErrorMessage

public java.lang.String GetTextBoxErrorMessage()
Returns:
Returns the m_sTextBoxErrorMessage.

SetTextBoxErrorMessage

public void SetTextBoxErrorMessage(java.lang.String textBoxErrorMessage)
Parameters:
textBoxErrorMessage - The m_sTextBoxErrorMessage to set.



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