Here are the callback registration function that ICEfaces bridge is currently exposing:
----------------------------------------------------------------------------------------------------------------------------------------------
ice.onServerError(callback-function)
The registered callback function will be invoked when a server error is received by the browser either on the JSF form submit. The callback function receives the following set of parameters when invoked:
function callback(statusCode, responseText, responseDOM)
{
//statusCode - the HTTP status code
//responseText - the body of the HTTP response in text format
//responseDOM - the XML parsed body of the HTTP response (parameter present only when response is in XML/HTML format)
}
----------------------------------------------------------------------------------------------------------------------------------------------
ice.onBlockingConnectionServerError(callback-function)
The registered callback function will be invoked when a server error is received on the blocking connection. The callback function receives the following set of parameters when invoked:
function callback(statusCode, responseText, responseDOM) {
//statusCode - the HTTP status code
//responseText - the body of the HTTP response in text format
//responseDOM - the XML parsed body of the HTTP response (parameter present only when response is in XML/HTML format)
}
----------------------------------------------------------------------------------------------------------------------------------------------
ice.onBlockingConnectionUnstable(callback-function)
The registered callback function will be invoked when bridge's hearbeat detects that the server doesn't responds in a timely fashion. The callback function does not receive any parameters when invoked:
function callback()
{
//no parameters are passed in
}
----------------------------------------------------------------------------------------------------------------------------------------------
ice.onBlockingConnectionLost(callback-function)
The registered callback function will be invoked when the blocking connection is lost to the server. The callback function receives the following set of parameters when invoked:
function callback(reconnectAttempts)
{
//reconnectAttempts - the number of reconnect attempts made by the bridge to re-establish the connection before giving up
}
----------------------------------------------------------------------------------------------------------------------------------------------
ice.onViewDisposal(callback-function)
The registered callback function will be invoked when a view within the page is disposed, the view could be a portlet, an include or the whole page. The callback function receives the following set of parameters when invoked:
function callback(viewID)
{
//viewID - the view ID
}
----------------------------------------------------------------------------------------------------------------------------------------------
ice.onSubmitSend(callback-function)
The registered callback function will be invoked when the form submit request is issued. The callback function receives the following set of parameters when invoked:
function callback(queryParameters)
{
//queryParameters - the query parameters of the request
}
----------------------------------------------------------------------------------------------------------------------------------------------
ice.onSubmitResponse(callback-function)
The registered callback function will be invoked when the response corresponding to the form submit is received. The callback function receives the following set of parameters when invoked:
function callback(statusCode, responseText, responseDOM)
{
//statusCode - the HTTP status code
//responseText - the body of the HTTP response in text format
//responseDOM - the XML parsed body of the HTTP response (parameter present only when response is in XML/HTML format)
}
----------------------------------------------------------------------------------------------------------------------------------------------
ice.onBeforeUpdate(callback-function)
The registered callback function will be invoked before the updates are to be applied to the DOM. The callback function receives the following set of parameters when invoked:
function callback(updates)
{
//updates - the updates as defined in the JSF 2.0 javascript specification (see the attached document)
}
----------------------------------------------------------------------------------------------------------------------------------------------
ice.onAfterUpdate(callback-function)
The registered callback function will be invoked before the updates are to be applied to the DOM. The callback function receives the following set of parameters when invoked:
function callback(updates) {
//updates - the updates as defined in the JSF 2.0 javascript specification (see the attached document)
}
----------------------------------------------------------------------------------------------------------------------------------------------
Assign to Deryk for Core team consideration.