Provides the core functionality for the Tapestry javascript package libraries.
Most of the functions in here are related to initiating and parsing IO requests.
tapestry | Provides the core functionality for the Tapestry javascript package libraries. |
Properties | |
version | The current client side library version, usually matching the current java library version. |
Functions | |
bind | Core XHR bind function for tapestry internals. |
error | Global error handling function for dojo.io.bind requests. |
load | Global load handling function for dojo.io.bind requests. |
loadContent | Used by tapestry.load when handling xml responses to iterate over the tapestry specific xml response and appropriately load all content types / perform animations / execute scripts in the proper order / etc.. |
loadScriptContent | Manages loading javascript content for a specific incoming xml element. |
loadScriptFromUrl | Takes a url string and loads the javascript it points to as a normal document head script include section. |
presentException | When remote exceptions are caught on the server special xml blocks are returned to the client when the requests are initiated via async IO. |
cleanConnect | Utility used to disconnect a previously connected event/function. |
The current client side library version, usually matching the current java library version. (ie 4.1, etc..)
bind:function( url, content, json )
Core XHR bind function for tapestry internals. The error/load functions defined in this package are used to handle load/error of dojo.io.bind.
url | The url to bind the request to. |
content | A properties map of optional extra content to send. |
json | Boolean, optional parameter specifying whether or not to create a json request. If not specified the default is to use XHR. |
error:function( type, exception, http, kwArgs )
Global error handling function for dojo.io.bind requests. This function is mapped as the “error:functionName” part of a request in the dojo.io.bind arguments in tapestry.bind calls.
load:function( type, data, http, kwArgs )
Global load handling function for dojo.io.bind requests. This isn’t typically called directly by anything, but passed in as the “load” argument to dojo.io.bind when making IO requests as the function that will handle the return response.
type | Type of request. |
data | The data returned, depending on the request type might be an xml document / plaintext / json / etc. |
http | The http object used in request, like XmlHttpRequest. |
kwArgs | The original set of arguments passed into dojo.io.bind({arg:val,arg1:val2}). |
loadContent:function( id, node, element )
Used by tapestry.load when handling xml responses to iterate over the tapestry specific xml response and appropriately load all content types / perform animations / execute scripts in the proper order / etc..
id | The element id that this content should be applied to in the existing document. |
node | The node that this new content will be applied to. |
element | The incoming xml node containing rules/content to apply to this node. |
loadScriptContent:function( element, async )
Manages loading javascript content for a specific incoming xml element.
element | The element to parse javascript statements from and execute. |
async | Whether or not to process the script content asynchronously, meaning whether or not to execute the script in a block done in a setTimeout call so as to avoid IE specific issues. |
loadScriptFromUrl:function( url )
Takes a url string and loads the javascript it points to as a normal document head script include section. ie:
<script type="text/javascript" src="http://localhost/js/foo.js"></script>
url | The url to the script to load into this documents head. |
presentException:function( node, kwArgs )
When remote exceptions are caught on the server special xml blocks are returned to the client when the requests are initiated via async IO. This function takes the incoming Tapestry exception page content and dumps it into a modal dialog that is presented to the user.
node | The incoming xml exception node. |
kwArgs | The kwArfs used to initiate the original IO request. |
Core XHR bind function for tapestry internals.
bind:function( url, content, json )
Global error handling function for dojo.io.bind requests.
error:function( type, exception, http, kwArgs )
Global load handling function for dojo.io.bind requests.
load:function( type, data, http, kwArgs )
Used by <tapestry.load> when handling xml responses to iterate over the tapestry specific xml response and appropriately load all content types / perform animations / execute scripts in the proper order / etc..
loadContent:function( id, node, element )
Manages loading javascript content for a specific incoming xml element.
loadScriptContent:function( element, async )
Takes a url string and loads the javascript it points to as a normal document head script include section.
loadScriptFromUrl:function( url )
When remote exceptions are caught on the server special xml blocks are returned to the client when the requests are initiated via async IO.
presentException:function( node, kwArgs )
Utility used to disconnect a previously connected event/function.
cleanConnect:function( target, event, funcName )