Namespace RapidContext.UI

Provides functions for creating and handling the user interface of an app.

Source code: RapidContext_UI.js

Namespace Summary
 
Method Summary
<static>  
RapidContext.UI.buildUI(node, ids)
Creates a tree of widgets from a parsed XML document.
<static>  
RapidContext.UI.connectProc(proc, loadingIcon, reloadIcon)
Connects the default UI signals for a procedure.
<static>  
RapidContext.UI.showError(args)
Displays an error message for the user.
Namespace Detail
RapidContext.UI
Method Detail
<static> RapidContext.UI.showError(args)
Displays an error message for the user. This operation may or may not block the user interface, while the message is being displayed (depending on implementation). This function can be used as an errback function in deferred calls. All arguments to this function will be concatenated and displayed.
Parameters:
{String/Error} args Optional
the messages or errors to display

<static> {Array/Object} RapidContext.UI.buildUI(node, ids)
Creates a tree of widgets from a parsed XML document. This function will call createWidget() for any XML element node found, performing some basic adjustments on the element attributes before sending them as attributes to the widget constructor. Text nodes with non-whitespace content will be mapped to HTML DOM text nodes.
Parameters:
{Object} node
the XML document or node
{Object} ids Optional
the optional node id mappings
Returns:
{Array/Object} an array or an object with the root widget(s) created

<static> RapidContext.UI.connectProc(proc, loadingIcon, reloadIcon)
Connects the default UI signals for a procedure. This includes a default error handler, a loading icon with cancellation handler and a reload icon with the appropriate click handler.
Parameters:
{Procedure} proc
the RapidContext.Procedure instance
{Icon} loadingIcon Optional
the loading icon, or null
{Icon} reloadIcon Optional
the reload icon, or null