|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--PTPortletServices
Also known as the PCC, this is a utility class for event-handling multiplexing,
and session variable storage. Allows multiple portlets to share the same global event-handlers
and session variables.
Usage:
document.PCC.RaiseEvent('mynamespace', 'submitsurvey');
document.PCC.GetSessionState('mysessionstate');
document.PCC.RegisterForEvent('mynamespace', 'submitsurvey', 'handleSubmitSurvey');
Field Summary | |
<private> Object |
_portletID
|
<private> Object |
func
|
<private> Object |
id
|
<private> Object |
regEvents
Create an array to hold the registered events. |
<private> Object |
WindowEventURN
WindowEventURN |
<private> <static> Object |
_eventListenerCount
_eventListenerCount |
<private> <static> Object |
_SESSION_STATE_COOKIE
_SESSION_STATE_COOKIE |
<private> <static> Object |
initialized
|
<static> <final> Object |
VERSION
|
Constructor Summary | |
PTPortletServices
()
PTPortletServices object constructor |
Method Summary | |
<private> void
|
_eventListener(func)
|
void
|
ClearSessionState(sNamespaceURN, sName)
Clear name/value pair from session state |
Boolean
|
ClearWindowEvent(eventListenerID)
Clears a window event |
Object
|
GetSessionState(sNamespaceURN, sName)
Retrieve name/value pair from session state |
<private> void
|
InitializeEvents()
Iterates over common window and document event handlers and registers them with the PCC if they are defined and aren't already registered with the PCC. |
Boolean
|
IsEventRegistered(namespaceURN, eventName, sFunction, _portletID)
Checks to see if a given function signature has already been registered as a callback for a given namespace and event |
void
|
PutSessionState(sNamespaceURN, sName, objValue)
Store name/value pair in session state |
void
|
RaiseEvent(sNamespaceURN, eventName, objEventArgs)
Raise event, notifying PCC that an event occurred |
void
|
RaiseWindowEvent(objEventArgs)
Raise window event |
Number
|
RegisterForEvent(namespaceURN, eventName, sFunction, _portletID)
Register an event with PCC |
Number
|
RegisterForWindowEvent(eventName, sFunction)
Register for window event |
Number
|
RegisterOnceForEvent(namespaceURN, eventName, sFunction, _portletID)
Register an event with PCC, if and only if an identical event function has not already been registered for a given namespace and event |
Number
|
RegisterOnceForWindowEvent(eventName, sFunction)
Register a window event with PCC, if and only if an identical event function has not already been registered for a given namespace and event |
Field Detail |
<private> Object _portletID
<private> Object func
<private> Object id
<private> Object regEvents
<private> Object WindowEventURN
<private> <static> Object _eventListenerCount
<private> <static> Object _SESSION_STATE_COOKIE
<private> <static> Object initialized
<static> <final> Object VERSION
Constructor Detail |
PTPortletServices()
Method Detail |
<private> void _eventListener(func)
void ClearSessionState(sNamespaceURN, sName)
sNamespaceURN
- Page URN
sName
- Name of state variable
Boolean ClearWindowEvent(eventListenerID)
eventListenerID
- The opaque id of the event, as initially assigned and returned by the RegisterForEvent / RegisterForWindowEvent methods (integer)
Object GetSessionState(sNamespaceURN, sName)
sNamespaceURN
- Page URN
sName
- Name of state variable
<private> void InitializeEvents()
Boolean IsEventRegistered(namespaceURN, eventName, sFunction, _portletID)
namespaceURN
- Namespace URN
eventName
- Name of event type to call
sFunction
- Name of function, or reference to function
void PutSessionState(sNamespaceURN, sName, objValue)
sNamespaceURN
- Page URN
sName
- Name of state variable
objValue
- Value of state variable
void RaiseEvent(sNamespaceURN, eventName, objEventArgs)
sNamespaceURN
- Page URN
eventName
- Name of event type to call
objEventArgs
- Arguments to pass to event function, optional
void RaiseWindowEvent(objEventArgs)
objEventArgs
- Arguments to pass to event function, optional
Number RegisterForEvent(namespaceURN, eventName, sFunction, _portletID)
namespaceURN
- Namespace URN
eventName
- Name of event type to call
sFunction
- Name of function, or reference to function, to be called
Number RegisterForWindowEvent(eventName, sFunction)
eventName
- Name of event type to call
sFunction
- Name of function, or reference to function, to be called
Number RegisterOnceForEvent(namespaceURN, eventName, sFunction, _portletID)
namespaceURN
- Namespace URN
eventName
- Name of event type to call
sFunction
- Name of function, or reference to function, to be called
Number RegisterOnceForWindowEvent(eventName, sFunction)
eventName
- Name of event type to call
sFunction
- Name of function, or reference to function, to be called
namespaceURN
- Namespace URN
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |