|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--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 |
<private> Object _requestForm
<private> Object callback
<private> String concurrencyMode
<private> Object formDataSet
<private> Hash properties
<private> Hash requestHeaders
Function responsePostProcHandler
Function responsePreProcHandler
<private> Element targetElement
<private> String type
<private> String url
<static> <final> String CONTENT_TYPE_HEADER
<static> <final> Object REQUEST_TYPE_CLIENT_SIDE
<static> <final> String REQUEST_TYPE_HEADER
<static> <final> Object REQUEST_TYPE_PORTLET_REFRESH
<static> <final> Object VERSION
Constructor Detail |
PTHTTPRequest()
Method Detail |
<private> Object _setFormURLEncodedDataFromForm(formRef)
formRef
- a reference to the form (form element ref, form id, or form name)
<private> Object _setFormURLEncodedDataFromNVPairs(nvPairs)
Object invoke(loadMessageCommand)
loadMessageCommand
- A JavaScript string to be evaluated when a response is being loaded as content
<private> void setFormContent(formContent)
formContent
- a element of Object representing a form
void setRequestHeader(header, value)
header
- the request header name
value
- the request header value
void setResponseHandler(responseHandler)
responseHandler
- This can be either a callback function to call and pass back results of the request (string or Function) or it can be a target HTML element, whose innerHTML property will be set from the response text
<static> <private> Object _resolveFormReference(formRef)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |