Class myfaces._impl.xhrCore._AjaxResponse
Extends
myfaces._impl.core.Object.
Defined in: _AjaxResponse.js.
Constructor Attributes | Constructor Name and Description |
---|---|
This singleton is responsible for handling the standardized xml ajax response
Note: since the semantic processing can be handled about 90% in a functional
style we make this class stateless.
|
Method Attributes | Method Name and Description |
---|---|
fixViewStates(context)
fixes the viewstates in the current page
|
|
processChanges(request, context, node)
main entry point for processing the changes
it deals with the <changes> node of the
response
|
|
processError(request, context, node)
processes an incoming error from the response
which is hosted under the <error> tag
|
|
processInsert(request, context, node)
xml insert command handler
|
|
processRedirect(request, context, node)
processes an incoming xml redirect directive from the ajax response
|
|
processResponse(request, context)
uses response to start Html element replacement
|
|
processUpdate(request, context, node)
First sub-step process a pending update tag
|
|
replaceHtmlItem(request, context, itemIdToReplace, markup)
Replaces HTML elements through others and handle errors if the occur in the replacement part
|
Class Detail
myfaces._impl.xhrCore._AjaxResponse()
This singleton is responsible for handling the standardized xml ajax response
Note: since the semantic processing can be handled about 90% in a functional
style we make this class stateless. Every state information is stored
temporarily in the context.
The singleton approach also improves performance
due to less object gc compared to the old instance approach.
Method Detail
fixViewStates(context)
fixes the viewstates in the current page
- Parameters:
- context
processChanges(request, context, node)
main entry point for processing the changes
it deals with the <changes> node of the
response
- Parameters:
- request
- the xhr request object
- context
- the context map
- node
- the changes node to be processed
processError(request, context, node)
processes an incoming error from the response
which is hosted under the <error> tag
- Parameters:
- request
- the current request
- context
- the contect object
- node
- the node in the xml hosting the error message
processInsert(request, context, node)
xml insert command handler
- Parameters:
- request
- the ajax request element
- context
- the context element holding the data
- node
- the xml node holding the insert data
- Returns:
- true upon successful completion, false otherwise
processRedirect(request, context, node)
processes an incoming xml redirect directive from the ajax response
- Parameters:
- request
- the request object
- context
- the context
- node
- the node hosting the redirect data
processResponse(request, context)
uses response to start Html element replacement
- Parameters:
- {Object} request
- (xhrRequest) - xhr request object
- {Object} context
- (Map) - AJAX context A special handling has to be added to the update cycle according to the JSDoc specs if the CDATA block contains html tags the outer rim must be stripped if the CDATA block contains a head section the document head must be replaced and if the CDATA block contains a body section the document body must be replaced!
processUpdate(request, context, node)
First sub-step process a pending update tag
- Parameters:
- request
- the xhr request object
- context
- the context map
- node
- the changes node to be processed
replaceHtmlItem(request, context, itemIdToReplace, markup)
Replaces HTML elements through others and handle errors if the occur in the replacement part
- Parameters:
- {Object} request
- (xhrRequest)
- {Object} context
- (Map)
- {Object} itemIdToReplace
- (String|Node) - ID of the element to replace
- {String} markup
- - the new tag