Class PTHTTPRequest

Object
   |
   +--PTHTTPRequest
Direct Known Subclasses:
PTHTTPPOSTRequest, PTHTTPGETRequest

class PTHTTPRequest


Abstract superclass for PTHTTPGETRequest and PTHTTPPOSTRequest. Invoking a PTHTTPRequest will cause a background HTTP request to be sent to the server without reloading the contents of the browser. PTHTTPRequests can be set to automatically refresh the inner HTML of an element on the page, or to have the HTTP response that they generate be handled by a JavaScript function. Note that this class should not be used or instantiated directly.
Defined in PTHTTPRequest.js


Field Summary
<private>  Object _requestForm
          
<private>  Object callback
          The function to call when the response comes back (string or function ref).
<private>  String concurrencyMode
          Specifies how to handle concurrent requests.
<private>  Object formDataSet
          
<private>  Hash properties
          Associative array of key/value pairs available for arbitrary use.
<private>  Hash requestHeaders
          Associative array of http client request headers to set on the request.
 Function responsePostProcHandler
          A reference to a function that will be called (and passed a PTHTTPResponse object) after either the callback is invoked or the targetElement's innerHTML is set.
 Function responsePreProcHandler
          A reference to a function that will be called (and passed a PTHTTPResponse object) before either the callback is invoked or the targetElement's innerHTML is set.
<private>  Element targetElement
          The element whose innerHTML property will be set to the response text.
<private>  String type
          The request type.
<private>  String url
          The request URL.
<static>  <final> String CONTENT_TYPE_HEADER
          Request Header containing content type
<static>  <final> Object REQUEST_TYPE_CLIENT_SIDE
          Enumerated Request type for client side requests
<static>  <final> String REQUEST_TYPE_HEADER
          Request Header containing the type of request being generated
<static>  <final> Object REQUEST_TYPE_PORTLET_REFRESH
          Enumerated Request type for portlet refresh requests
<static>  <final> Object VERSION
          
 
Constructor Summary
PTHTTPRequest ()
            Abstract superclass for PTHTTPGETRequest and PTHTTPPOSTRequest.
 
Method Summary
 <private>  Object _setFormURLEncodedDataFromForm(formRef)
           Generates URL encoded form data from a form
 <private>  Object _setFormURLEncodedDataFromNVPairs(nvPairs)
           Generates URL encoded form data from an associative array of name/value pairs
 Object invoke(loadMessageCommand)
           Invoke the HTTP request, sending the request to a server and executing any actions required by the response.
 <private>  void setFormContent(formContent)
           Sets the form content for the request.
 void setRequestHeader(header, value)
           Sets a client http request header for the request.
 void setResponseHandler(responseHandler)
           Sets the appropriate response handler for the request
<static> <private>  Object _resolveFormReference(formRef)
           Finds a valid form element object from a form reference

Field Detail

_requestForm

<private> Object _requestForm

callback

<private> Object callback

concurrencyMode

<private> String concurrencyMode

formDataSet

<private> Object formDataSet

properties

<private> Hash properties

requestHeaders

<private> Hash requestHeaders

responsePostProcHandler

Function responsePostProcHandler

responsePreProcHandler

Function responsePreProcHandler

targetElement

<private> Element targetElement

type

<private> String type

url

<private> String url

CONTENT_TYPE_HEADER

<static> <final> String CONTENT_TYPE_HEADER

REQUEST_TYPE_CLIENT_SIDE

<static> <final> Object REQUEST_TYPE_CLIENT_SIDE

REQUEST_TYPE_HEADER

<static> <final> String REQUEST_TYPE_HEADER

REQUEST_TYPE_PORTLET_REFRESH

<static> <final> Object REQUEST_TYPE_PORTLET_REFRESH

VERSION

<static> <final> Object VERSION

Constructor Detail

PTHTTPRequest

PTHTTPRequest()

Method Detail

_setFormURLEncodedDataFromForm

 <private> Object _setFormURLEncodedDataFromForm(formRef)

_setFormURLEncodedDataFromNVPairs

 <private> Object _setFormURLEncodedDataFromNVPairs(nvPairs)

invoke

Object invoke(loadMessageCommand)

setFormContent

 <private> void setFormContent(formContent)

setRequestHeader

void setRequestHeader(header, value)

setResponseHandler

void setResponseHandler(responseHandler)

_resolveFormReference

<static>  <private> Object _resolveFormReference(formRef)


Documentation generated by JSDoc on Tue Sep 21 02:04:06 2010