Class Index | File Index

Classes


Class SweetDevRia.ComHelper

Communication class between browser and server. Singleton
Defined in: ComHelper.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<private> <static>  
SweetDevRia.ComHelper._instance
Unique instance of the ComHelper
 
Callback repository
<static>  
SweetDevRia.ComHelper.EVENT_XML_PARAM
JavaScript post var containing the params.
<static>  
SweetDevRia.ComHelper.ID_PAGE
JavaScript var containing the page id.
<private> <static>  
SweetDevRia.ComHelper.JSF_VIEW_ID
JSF page marker
<private> <static>  
SweetDevRia.ComHelper.PROXY_URL
SweetDEV RIA server entry point.
Method Summary
Method Attributes Method Name and Description
<static>  
SweetDevRia.ComHelper.call(url, args, callback)
Call a specific URL, through Ajax, and return the instance used
<private> <static>  
SweetDevRia.ComHelper.callAction(id, action, params, contextId)
Call an action on the server.
<private> <static>  
SweetDevRia.ComHelper.callback(json)
Generic ComHelper callback function
<static>  
SweetDevRia.ComHelper.fireEvent(evt, synchroCall, callback)
Fires an event to a server model, and flush the stack If no event are given as parameter, the stack of waiting events is flushed.
<private> <static>  
SweetDevRia.ComHelper.fireEvents(json)
Fires a bunch of events described into a jsonString
<static>  
SweetDevRia.ComHelper.flushEvents()
Flush the events stack.
<static>  
SweetDevRia.ComHelper.genericCall(url, args, callback, prepare)
Call a specific URL, through Ajax, and return the instance used.
<private> <static>  
SweetDevRia.ComHelper.getInstance()
Return the instance of the ComHelper
<private> <static>  
SweetDevRia.ComHelper.isJsfPage()
Return true if we are in a JSF context.
<static>  
SweetDevRia.ComHelper.parseXml(xmlStr)
Parses an XML String, cross browser.
<private> <static>  
SweetDevRia.ComHelper.stackEvent(evt, skipsend)
Stacks an event for the server
Class Detail
SweetDevRia.ComHelper()
Field Detail
<private> <static> {ComHelper} SweetDevRia.ComHelper._instance
Unique instance of the ComHelper

callbackRepository
Callback repository

<static> {String} SweetDevRia.ComHelper.EVENT_XML_PARAM
JavaScript post var containing the params.

<static> {String} SweetDevRia.ComHelper.ID_PAGE
JavaScript var containing the page id.

<private> <static> {String} SweetDevRia.ComHelper.JSF_VIEW_ID
JSF page marker

<private> <static> {String} SweetDevRia.ComHelper.PROXY_URL
SweetDEV RIA server entry point.
Method Detail
<static> {XMLHttpRequest} SweetDevRia.ComHelper.call(url, args, callback)
Call a specific URL, through Ajax, and return the instance used
Parameters:
{String} url
Url to call
{Object} args
Object which contains parameter to send
{Function} callback
the callback function
Returns:
the instance used

<private> <static> SweetDevRia.ComHelper.callAction(id, action, params, contextId)
Call an action on the server. This action implements com.ideo.sweetdevria.servlet.IAction
Parameters:
{String} id
the id the action is related to
{String} action
the name of the action
{Map} params
a map of parameters
contextId

<private> <static> SweetDevRia.ComHelper.callback(json)
Generic ComHelper callback function
Parameters:
json

<static> SweetDevRia.ComHelper.fireEvent(evt, synchroCall, callback)
Fires an event to a server model, and flush the stack If no event are given as parameter, the stack of waiting events is flushed.
Parameters:
{RiaEvent} evt
Optional. the event to send
{boolean} synchroCall
Optional. true for a sycnhro call, false otherwise
{Function} callback
Optional. a callback function to execute on server response

<private> <static> SweetDevRia.ComHelper.fireEvents(json)
Fires a bunch of events described into a jsonString
Parameters:
{String} json
a Json String containing the events

<static> SweetDevRia.ComHelper.flushEvents()
Flush the events stack. Force the server call.

<static> {XMLHttpRequest} SweetDevRia.ComHelper.genericCall(url, args, callback, prepare)
Call a specific URL, through Ajax, and return the instance used. Do NOT require a JSON response.
Parameters:
{String} url
Url to call
{Object} args
Object which contains parameter to send
{Function} callback
the callback function
{formMode} prepare
parameter for a formular not JSON Communication
Returns:
the instance used

<private> <static> {ComHelper} SweetDevRia.ComHelper.getInstance()
Return the instance of the ComHelper
Returns:
the instance of the ComHelper

<private> <static> {boolean} SweetDevRia.ComHelper.isJsfPage()
Return true if we are in a JSF context. //TODO next version.
Returns:
true if we are in a JSF context, false otherwise

<static> {DOMObject} SweetDevRia.ComHelper.parseXml(xmlStr)
Parses an XML String, cross browser.
Parameters:
{String} xmlStr
the String to parse
Returns:
a DOMObject resulting of the xml string parsed

<private> <static> SweetDevRia.ComHelper.stackEvent(evt, skipsend)
Stacks an event for the server
Parameters:
{RiaEvent} evt
the event to stack, waiting for a send
{boolean} skipsend
boolean to set to true to skip the sending if some requirements are fulfilled

Documentation generated by JsDoc Toolkit 2.0.0 on Thu May 05 2011 12:20:29 GMT+0200 (CEST)