|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--PTPortlet
PTPortlet object constructor
Defined in PTPortlet.js
Field Summary |
|
public
var
|
containerID
The id attribute of the portlet's corresponding HTML element (string) |
public
var
|
gatewayPrefixURL
The URL of the gateway prefix (string) |
public
var
|
guid
The portlet object's global unique id (string) |
public
var
|
id
The portlet object's id (string) |
public
var
|
isCollapsed
Whether or not the portlet is currently collapsed (boolean, optional) |
public
var
|
name
The portlet's internationalized name (string) |
public
var
|
refreshInterval
The portlet's refresh interval, in milliseconds (integer, optional) |
public
var
|
refreshURL
The URL to use for refreshing the portlet (string, optional) |
public
var
|
remoteBaseURL
The base URL of the portlet's remote server (string) |
public
var
|
remoteRequestURL
The fully qualified URL of the portlet's web service (string) |
public
var
|
responseErrorHandler
The handler to call when a response error occurs, if the default behavior is undesirable (string or function reference, optional) |
public
var
|
responseErrors
An array of response error objects. |
public
var
|
responsePostProcHandler
The handler to call after calling the response handler (string or function reference, optional) |
public
var
|
responsePreProcHandler
The handler to call before calling the response handler. |
public
var
|
secureGatewayPrefixURL
The secure URL of the gateway prefix (string) |
private
var
|
_eventListeners
A hash of namespaces containing eventListener handlers and eventListenerIDs |
private
var
|
_refreshTimeout
The window.setTimeout key of the last window.setTimeout set for this portlet. |
public
static
var
|
VERSION
Version number (integer) |
private
static
var
|
SESSION_PREF_NAME_PREFIX
Prefix appended to session pref names for http transmission (string) |
Constructor Summary |
|
PTPortlet
(id, guid, name, containerID, remoteRequestURL, remoteBaseURL, gatewayPrefixURL, secureGatewayPrefixURL, isCollapsed, refreshURL, refreshInterval)
|
Method Summary |
|
public
static
function
|
getPortletByGUID(guid)
Returns a single portlet, given an GUID |
public
static
function
|
getPortletByID(id)
Returns a single portlet, given an ID |
public
static
function
|
getPortletByName(name)
Returns a single portlet, given a name NOTE: There is no restriction against having multiple portlets on the same page which have the same name, so portlet lookup by name in these cases is not guaranteed. |
public
static
function
|
getSessionPref(name)
Get a single session pref |
public
static
function
|
getSessionPrefs(names)
Get multiple session prefs |
public
static
function
|
setSessionPref(name,value)
Set a single session pref |
public
static
function
|
setSessionPrefs(hash)
Set multiple session prefs |
private
static
function
|
_getSessionPrefsFromXML(xmlDoc)
Returns a hash of name/value pairs when passed a valid session prefs XML Document. |
private
static
function
|
_postSetSessionPrefs(postContent)
Posts request to set session prefs on server |
private
static
function
|
_processGetSessionPrefs(postContent)
Posts request to get session prefs from server and returns session prefs as a hash |
public
function
|
clearEvent(eventName,eventNamespace)
Clears the event listener for an event |
public
function
|
clearRefreshInterval()
Sets the refreshInterval of the portlet to 0 and clears any current refresh timers.
|
public
function
|
deleteSessionPref(name)
Deletes a single session pref |
public
function
|
deleteSessionPrefs(array)
Deletes multiple session prefs |
public
function
|
formGetRefresh(form)
Requests updated content from the server by submitting a form GET request |
public
function
|
formPostRefresh(form)
Requests updated content from the server by submitting a form POST request |
public
function
|
formRefresh(form)
Requests updated content from the server by submitting a form |
public
function
|
getRefreshInterval()
Returns the refreshInterval of the portlet
|
public
function
|
getRefreshURL()
Returns the refresh URL of the portlet |
public
function
|
raiseEvent(eventName,eventArgs,eventNamespace)
Raise an new event |
public
function
|
refresh(url)
Refresh the portlet content from the server, using URL if provided |
public
function
|
refreshOnEvent(eventName,eventNamespace)
Associate portlet refresh action with a specific event |
public
function
|
registerForEvent(eventName,eventCallback,eventNamespace)
Register to be notified of an event |
public
function
|
setInnerHTML(html)
Sets the innerHTML of the portlet from a string
|
public
function
|
setRefreshInterval(refreshInterval,startNewRefreshTimer)
Sets the refreshInterval of the portlet
|
public
function
|
setRefreshURL(url)
Sets the refresh URL of the portlet |
private
function
|
_clearRefreshTimer()
Clears the refresh timer |
private
function
|
_createGetRefreshRequest(url,form)
Create and invoke a refresh request to the server using GET |
private
function
|
_createPostRefreshRequest(url,form)
Create and invoke a refresh request to the server using POST |
private
function
|
_handleResponseErrorXML(xmlDoc,response)
Process error XML returned by the portal |
private
function
|
_refreshErrorHandler(response)
Handles responses to refresh requests by examining them for errors |
private
function
|
_startRefreshTimer()
Starts the refresh timer, first clearing out any previously set refresh timer for this portlet. |
private
function
|
transformURL(url)
Transform a URL to be gatewayed |
Field Detail |
public
var containerID
public
var gatewayPrefixURL
public
var guid
public
var id
public
var isCollapsed
public
var name
public
var refreshInterval
public
var refreshURL
public
var remoteBaseURL
public
var remoteRequestURL
public
var responseErrorHandler
public
var responseErrors
public
var responsePostProcHandler
public
var responsePreProcHandler
public
var secureGatewayPrefixURL
private
var _eventListeners
private
var _refreshTimeout
public
static
var VERSION
private
static
var SESSION_PREF_NAME_PREFIX
Constructor Detail |
function PTPortlet(id, guid, name, containerID, remoteRequestURL, remoteBaseURL, gatewayPrefixURL, secureGatewayPrefixURL, isCollapsed, refreshURL, refreshInterval)
id
- The portlet object's id (string)
guid
- The portlet object's global unique id (string)
name
- The portlet's internationalized name (string)
containerID
- The id attribute of the portlet's corresponding HTML element (string)
remoteRequestURL
- The fully qualified URL of the portlet's web service (string)
remoteBaseURL
- The base URL of the portlet's remote server (string)
gatewayPrefixURL
- The URL of the gateway prefix (string)
secureGatewayPrefixURL
- The secure URL of the gateway prefix (string)
isCollapsed
- Whether or not the portlet is currently collapsed (boolean, optional)
refreshURL
- The URL to use for refreshing the portlet (string, optional)
refreshInterval
- The portlet's refresh interval, in milliseconds (integer, optional)
responsePreProcHandler
- The handler to call before calling the response handler. Returning false from this handler cancels the call to the response handler. (string or function reference, optional)
responsePostProcHandler
- The handler to call after calling the response handler (string or function reference, optional)
Method Detail |
public
static
function
getPortletByGUID(guid)
guid
- GUID of Portlet being requested (string)
public
static
function
getPortletByID(id)
guid
- ID of Portlet being requested (string)
public
static
function
getPortletByName(name)
name
- Name of Portlet being requested (string)
public
static
function
getSessionPref(name)
name
- The name of the pref to be retrieved (string)
public
static
function
getSessionPrefs(names)
names
- The names of the prefs to be retrieved (Array of strings)
public
static
function
setSessionPref(name,value)
name
- The name of the pref to be set (string)
value
- The value of the pref to be set (string)
public
static
function
setSessionPrefs(hash)
hash
- Associative array of name/value pairs to be set (string)
private
static
function
_getSessionPrefsFromXML(xmlDoc)
private
static
function
_postSetSessionPrefs(postContent)
private
static
function
_processGetSessionPrefs(postContent)
public
function
clearEvent(eventName,eventNamespace)
eventName
- The name of the event to clear (string)
eventNamespace
- The namespace for the event (string, optional)
public
function
clearRefreshInterval()
refreshInterval
of the portlet to 0 and clears any current refresh timers.
public
function
deleteSessionPref(name)
name
- The name of the pref to be deleted (string)
public
function
deleteSessionPrefs(array)
array
- Array of named values to be deleted (Array)
public
function
formGetRefresh(form)
form
- Specifies the form to submit via GET. This method will accept a form name, a form id, or a reference to the form object. Note that form elements of type FILE, IMAGE, and SUBMIT are ignored. If you need the value for a SUBMIT element to be passed to the server, you should create a HIDDEN element whose name and value are equivalent to the SUBMIT element, and the HIDDEN element will be passed through in its place.
public
function
formPostRefresh(form)
form
- Specifies the form to submit via POST. This method will accept a form name, a form id, or a reference to the form object. Note that form elements of type FILE, IMAGE, and SUBMIT are ignored. If you need the value for a SUBMIT element to be passed to the server, you should create a HIDDEN element whose name and value are equivalent to the SUBMIT element, and the HIDDEN element will be passed through in its place.
public
function
formRefresh(form)
form
- Specifies the form to submit. This method will accept a form name, a form id, or a reference to the form object. Note that form elements of type FILE, IMAGE, and SUBMIT are ignored. If you need the value for a SUBMIT element to be passed to the server, you should create a HIDDEN element whose name and value are equivalent to the SUBMIT element, and the HIDDEN element will be passed through in its place.
public
function
getRefreshInterval()
refreshInterval
of the portlet
public
function
getRefreshURL()
public
function
raiseEvent(eventName,eventArgs,eventNamespace)
eventName
- The name of the event to be raised (string)
eventArgs
- A hash of arguments to be passed with the event (object, optional)
eventNamespace
- The namespace for the event (string, optional)
public
function
refresh(url)
url
- URL to use for refreshing content (string, optional)
public
function
refreshOnEvent(eventName,eventNamespace)
eventName
- The name of the event which triggers refresh action (string)
eventNamespace
- The namespace for the event (string, optional)
public
function
registerForEvent(eventName,eventCallback,eventNamespace)
eventName
- The name of the event (string)
eventCallback
- The name of a function or a reference to a function which serves as a callback when the event is triggered (string or function)
eventNamespace
- The namespace for the event (string, optional)
public
function
setInnerHTML(html)
innerHTML
of the portlet from a string
html
- The html to be rendered (string)
public
function
setRefreshInterval(refreshInterval,startNewRefreshTimer)
refreshInterval
of the portlet
refreshInterval
- (integer)
public
function
setRefreshURL(url)
url
- to set as refreshURL (string)
private
function
_clearRefreshTimer()
private
function
_createGetRefreshRequest(url,form)
private
function
_createPostRefreshRequest(url,form)
private
function
_handleResponseErrorXML(xmlDoc,response)
private
function
_refreshErrorHandler(response)
private
function
_startRefreshTimer()
interval
- Interval to set for new refresh timer, in milliseconds (integer, optional)
private
function
transformURL(url)
url
- The URL to be gatewayed (string)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |