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');
 

Defined in PTPortletServices.js


Field Summary
 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
<static>  <final> Object VERSION
          
 
Constructor Summary
PTPortlet (id, guid, name, containerID, remoteRequestURL, remoteBaseURL, gatewayPrefixURL, secureGatewayPrefixURL, isCollapsed, refreshURL, refreshInterval)
            PTPortlet object constructor
 
Method Summary
 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
 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
 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
<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

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

VERSION

<static> <final> Object VERSION

Constructor Detail

PTPortlet

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

Method Detail

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()

raiseEvent

void raiseEvent(eventName,eventArgs,eventNamespace)

refresh

Object refresh(url,requestHeaders)

refreshOnEvent

void refreshOnEvent(eventName,eventNamespace)

registerForEvent

void registerForEvent(eventName,eventCallback,eventNamespace)

setInnerHTML

void setInnerHTML(html)

setRefreshInterval

void setRefreshInterval(refreshInterval)

setRefreshURL

String setRefreshURL(url)

transformURL

String transformURL(url)

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 Wed Aug 24 10:17:38 2005