|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.uiinfrastructure.pagecontrols.framework.AComponent
public abstract class AComponent
This is the abstract class for all page controls. A page control is a single input/output component on an web page. One example of a control is the datepicker. For each instance of the datepicker on a single page, you need an instance of an AComponent. Components of like controls are managed through a single component manger. So, on a single page you might have 3 datepickers (3 instances of AComponent) all managed by a single datepicker manager. If you were to have other types of controls on that same page, you would need an instance of the appropriate componetent manager for those controls. The Page manager aggregates all instances of component mangers and provides access to page specific information that might be relevant to controls (i.e. locale and timezone). In summary: Component - Might have many on a page (i.e. datepicker). Note: There is really no difference between a "component" and a "control." Component Manager - One per type of component on a page. Page Manager - Only one per page. Aggregates all the component managers. How is the component manager differnt from the page manager? Why have both? The component manager serves two funtions. First, it aggregates like components. Second, it handles the printing of page-level content (contrast with component-level content.) Consider the datepicker example again. If you have 2 datepickers on one page, there is data that needs to be outputted once (page-level) and data that needs to be outputted once for each datepicker (component-level). One special note about the page-controls framework... It assumes that the client will be using the HTTP Session for state management. Given this, the client needs to have implemented a good HTTP Session mangment strategy that will release old or unused objects. See the documentation on Activity Spaces for such a framework.
Field Summary | |
---|---|
protected PageMgr |
m_ptPageMgr
The page manager associated with this component. |
Constructor Summary | |
---|---|
AComponent()
Creates a new AComponent |
Method Summary | |
---|---|
protected java.lang.String |
AppendUniqueIDToElementName(java.lang.String _strElementName)
This method should be used to add the unique identifier to HTML inputs related to this component. |
abstract java.lang.Object |
Create()
Create method for the object returns an instance of the object. |
HTMLElementCollection |
GetComponentHeadContent()
This method returns script that needs to be printed within the HTML head tag. |
abstract HTMLElementCollection |
GetComponentHTML()
This method serves as a getter for component HTML. |
HTMLElementCollection |
GetComponentPostContent()
This method returns script that needs to be printed after the component itself has been printed. |
HTMLElementCollection |
GetComponentPreContent()
This method returns script that needs to be printed before the component itself has been printed. |
HTMLElementCollection |
GetComponentPreFormContent()
This method returns script that needs to be printed before the form in which this component is embedded. |
abstract java.lang.String |
GetName()
Return the name or this component. |
PageMgr |
GetPageMgr()
This method returns the page manager that houses this component manager. |
HTMLElementCollection |
GetSubComponentHTMLByIndex(int _nSubComponentIndex)
This method serves as a getter for "sub-component" HTML. |
java.lang.String |
GetUniqueInstanceID()
This method returns the string used to uniquely idenify this component on a page. |
abstract XPArrayList |
GetValidators()
Return an Arraylist of validators associated with this object. |
void |
Init(PageMgr _ptPageMgr,
java.lang.String _strUniqueInstanceID)
Initializes a new AComponent() |
abstract int |
StoreUserInput(XPHashtable _htRequestParameters)
This abstract method stores the input submitted by the user. |
abstract XPArrayList |
Validate()
For every Validator associated with this object execute it's Validate method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PageMgr m_ptPageMgr
Constructor Detail |
---|
public AComponent()
Method Detail |
---|
public void Init(PageMgr _ptPageMgr, java.lang.String _strUniqueInstanceID)
_ptComponentMgr
- The component manager for this component._strUniqueInstanceID
- The unique ID for this component.public abstract HTMLElementCollection GetComponentHTML()
public PageMgr GetPageMgr()
public HTMLElementCollection GetSubComponentHTMLByIndex(int _nSubComponentIndex)
_nSubComponentIndex
- The sub-component index specified in the the
componet file itself.
public abstract int StoreUserInput(XPHashtable _htRequestParameters)
_htRequestParameters
- A hashtable containing the request's name-
value pairs.public HTMLElementCollection GetComponentHeadContent()
public HTMLElementCollection GetComponentPostContent()
public HTMLElementCollection GetComponentPreContent()
public HTMLElementCollection GetComponentPreFormContent()
public java.lang.String GetUniqueInstanceID()
protected final java.lang.String AppendUniqueIDToElementName(java.lang.String _strElementName)
_strElementName
- The name of the element that needs to have the
unique ID appended to it.
public abstract java.lang.String GetName()
public abstract java.lang.Object Create()
public abstract XPArrayList Validate()
public abstract XPArrayList GetValidators()
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |