Class PTPortlet

Object
   |
   +--PTPortlet

class PTPortlet


A client-side object wrapper for a Portlet. Contains methods for accessing portlet attributes, in-place-refresh of portlet content, firing and listening for portlet events, and the getting/setting of session preferences.

Usage:	
 	var myportlet = PTPortlet.getPortletByID(227);
	myportlet.setSessionPref('mypref', 'myprefvalue');
	myportlet.refresh('nextpage.jsp');
 
VU: adding special constructor for Runner and future apps takes an extra parameter to indicate what application is calling this 1=Portal 2=Runner 3=?
Defined in PTPortlet.js


Field Summary
<private>  Object _eventListeners
          A hash of namespaces containing eventListener handlers and eventListenerIDs
<private>  Object _refreshTimeout
          The window.setTimeout key of the last window.setTimeout set for this portlet.
 Object callingApplication
          
<private>  Object className
          Class Name.
 String containerID
          The id attribute of the portlet's corresponding HTML element
 String gatewayPrefixURL
          The URL of the gateway prefix
 String guid
          The portlet object's global unique id
 String id
          The portlet object's id
 Boolean isCollapsed
          Whether or not the portlet is currently collapsed (optional)
 String name
          The portlet's internationalized name
 Number refreshInterval
          The portlet's refresh interval, in milliseconds (optional)
 String refreshURL
          The URL to use for refreshing the portlet (optional)
 String remoteBaseURL
          The base URL of the portlet's remote server
 String remoteRequestURL
          The fully qualified URL of the portlet's web service
 Object responseErrorHandler
          The handler to call when a response error occurs, if the default behavior is undesirable (string or function reference, optional)
 Array responseErrors
          An array of response error objects.
 Object responsePostProcHandler
          The handler to call after calling the response handler (string or function reference, optional)
 Object responsePreProcHandler
          The handler to call before calling the response handler.
 String secureGatewayPrefixURL
          The secure URL of the gateway prefix
<private> <static>  Object SESSION_PREF_NAME_PREFIX
          Prefix appended to session pref names for http transmission (string)
<static>  <final> Object VERSION
          
 
Constructor Summary
PTPortlet (id, guid, name, containerID, remoteRequestURL, remoteBaseURL, gatewayPrefixURL, secureGatewayPrefixURL, isCollapsed, refreshURL, refreshInterval, callingApplication)
            PTPortlet object constructor
 
Method Summary
 <private>  void _clearRefreshTimer()
           Clears the refresh timer
 <private>  Object _createGetRefreshRequest(url,form,requestHeaders,type)
           Create and invoke a request or refresh request to the server using GET
 <private>  Object _createPostRefreshRequest(url,form,requestHeaders)
           Create and invoke a refresh request to the server using POST
 <private>  void _handleResponseErrorXML(xmlDoc,response)
           Process error XML returned by the portal
 <private>  Object _refreshErrorHandler(response)
           Handles responses to refresh requests by examining them for errors
 <private>  void _startRefreshTimer()
           Starts the refresh timer, first clearing out any previously set refresh timer for this portlet.
 void clearEvent(eventName,eventNamespace)
           Clears the event listener for an event
 void clearRefreshInterval()
           Sets the refreshInterval of the portlet to 0 and clears any current refresh timers.
 PTHTTPPOSTRequest deleteSessionPref(name)
           Deletes a single session pref
 PTHTTPPOSTRequest deleteSessionPrefs(array)
           Deletes multiple session prefs
 void formGetRefresh(form,requestHeaders)
           Requests updated content from the server by submitting a form GET request
 void formPostRefresh(form,requestHeaders)
           Requests updated content from the server by submitting a form POST request
 Object formRefresh(form,requestHeaders)
           Requests updated content from the server by submitting a form
 Number getRefreshInterval()
           Returns the refreshInterval of the portlet, in milliseconds.
 String getRefreshURL()
           Returns the refresh URL of the portlet
 String makeAbsoluteURL(url)
           Make a URL into an absolute URL
 void raiseEvent(eventName,eventArgs,eventNamespace)
           Raise an new event
 Object refresh(url,requestHeaders)
           Refresh the portlet content from the server.
 void refreshOnEvent(eventName,eventNamespace)
           Associate portlet refresh action with a specific event
 void registerForEvent(eventName,eventCallback,eventNamespace)
           Register to be notified of an event
 Object request(url,requestHeaders)
           Replace the portlet content with new content from the server.
 void setInnerHTML(html)
           Sets the innerHTML of the portlet from a string
 void setRefreshInterval(refreshInterval)
           Sets the refreshInterval of the portlet (in milliseconds) and resets the refresh counter to zero.
 String setRefreshURL(url)
           Sets the refresh URL of the portlet
 String transformURL(url)
           Transform a URL to be gatewayed VU: Switch transformation types according to what the calling application is
<static> <private>  Hash _getSessionPrefsFromXML(xmlDoc)
           Returns a hash of name/value pairs when passed a valid session prefs XML Document.
<static> <private>  PTHTTPPOSTRequest _postSetSessionPrefs(postContent,invokerPortlet)
           Posts request to set session prefs on server
<static> <private>  Hash _processGetSessionPrefs(postContent,invokerPortlet)
           Posts request to get session prefs from server and returns session prefs as a hash
<static> PTPortlet getPortletByGUID(guid)
           Returns a single portlet, given an GUID
<static> PTPortlet getPortletByID(id)
           Returns a single portlet, given an ID
<static> PTPortlet 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.
<static> String getSessionPref(name)
           Get a single session pref Undefined pref returns empty string.
<static> Hash getSessionPrefs(names)
           Get multiple session prefs Undefined prefs return empty string.
<static> PTHTTPPOSTRequest setSessionPref(name,value)
           Set a single session pref
<static> PTHTTPPOSTRequest setSessionPrefs(hash)
           Set multiple session prefs

Field Detail

_eventListeners

<private> Object _eventListeners

_refreshTimeout

<private> Object _refreshTimeout

callingApplication

Object callingApplication

className

<private> Object className

containerID

String containerID

gatewayPrefixURL

String gatewayPrefixURL

guid

String guid

id

String id

isCollapsed

Boolean isCollapsed

name

String name

refreshInterval

Number refreshInterval

refreshURL

String refreshURL

remoteBaseURL

String remoteBaseURL

remoteRequestURL

String remoteRequestURL

responseErrorHandler

Object responseErrorHandler

responseErrors

Array responseErrors

responsePostProcHandler

Object responsePostProcHandler

responsePreProcHandler

Object responsePreProcHandler

secureGatewayPrefixURL

String secureGatewayPrefixURL

SESSION_PREF_NAME_PREFIX

<private> <static> Object SESSION_PREF_NAME_PREFIX

VERSION

<static> <final> Object VERSION

Constructor Detail

PTPortlet

PTPortlet(id, guid, name, containerID, remoteRequestURL, remoteBaseURL, gatewayPrefixURL, secureGatewayPrefixURL, isCollapsed, refreshURL, refreshInterval, callingApplication)

Method Detail

_clearRefreshTimer

 <private> void _clearRefreshTimer()

_createGetRefreshRequest

 <private> Object _createGetRefreshRequest(url,form,requestHeaders,type)

_createPostRefreshRequest

 <private> Object _createPostRefreshRequest(url,form,requestHeaders)

_handleResponseErrorXML

 <private> void _handleResponseErrorXML(xmlDoc,response)

_refreshErrorHandler

 <private> Object _refreshErrorHandler(response)

_startRefreshTimer

 <private> void _startRefreshTimer()

clearEvent

void clearEvent(eventName,eventNamespace)

clearRefreshInterval

void clearRefreshInterval()

deleteSessionPref

PTHTTPPOSTRequest deleteSessionPref(name)

deleteSessionPrefs

PTHTTPPOSTRequest deleteSessionPrefs(array)

formGetRefresh

void formGetRefresh(form,requestHeaders)

formPostRefresh

void formPostRefresh(form,requestHeaders)

formRefresh

Object formRefresh(form,requestHeaders)

getRefreshInterval

Number getRefreshInterval()

getRefreshURL

String getRefreshURL()

makeAbsoluteURL

String makeAbsoluteURL(url)

raiseEvent

void raiseEvent(eventName,eventArgs,eventNamespace)

refresh

Object refresh(url,requestHeaders)

refreshOnEvent

void refreshOnEvent(eventName,eventNamespace)

registerForEvent

void registerForEvent(eventName,eventCallback,eventNamespace)

request

Object request(url,requestHeaders)

setInnerHTML

void setInnerHTML(html)

setRefreshInterval

void setRefreshInterval(refreshInterval)

setRefreshURL

String setRefreshURL(url)

transformURL

String transformURL(url)

_getSessionPrefsFromXML

<static>  <private> Hash _getSessionPrefsFromXML(xmlDoc)

_postSetSessionPrefs

<static>  <private> PTHTTPPOSTRequest _postSetSessionPrefs(postContent,invokerPortlet)

_processGetSessionPrefs

<static>  <private> Hash _processGetSessionPrefs(postContent,invokerPortlet)

getPortletByGUID

<static> PTPortlet getPortletByGUID(guid)

getPortletByID

<static> PTPortlet getPortletByID(id)

getPortletByName

<static> PTPortlet getPortletByName(name)

getSessionPref

<static> String getSessionPref(name)

getSessionPrefs

<static> Hash getSessionPrefs(names)

setSessionPref

<static> PTHTTPPOSTRequest setSessionPref(name,value)

setSessionPrefs

<static> PTHTTPPOSTRequest setSessionPrefs(hash)


Documentation generated by JSDoc on Tue Sep 21 02:03:57 2010