ScriptIncludes

Manages writing out and configuring the necessary javascript includes for Tapestry when not using the Shell component to do it. Both Shell and this component defer the actual functionality of rendering script includes to the delegate class AjaxShellDelegate.

Sample Output

<script type="text/javascript" src="http://localhost:8080/assets/static/dojo/dojo.js"></script>
<script type="text/javascript" src="http://localhost:8080/assets/static/tapestry/core.js"></script>
<script type="text/javascript">
dojo.require("dojo.debug.console");
dojo.log.setLevel(dojo.log.getLevel("DEBUG"));
dojo.require("tapestry.namespace");
</script>

See also: org.apache.tapestry.dojo.AjaxShellDelegate , Shell

Parameters

Name Type Required Default Description
delegate IRender no If specified, the delegate is rendered before the close of the <head> tag. Typically, this is used to provide additional <meta> tags.
ajaxDelegate IRender no AjaxShellDelegate If specified, allows for the default ajaxDelegate that renders the dojo script includes to be overriden.
browserLogLevel String - One of [DEBUG,INFO,WARNING,ERROR,CRITICAL] no WARNING Sets the default browser based javascript log level to use to debug client side interactions. If you specify an html element id to place the debug content it will be written there. Otherwise, the default is to write to an element with id "debug", or append to the document body if none exists.

See the dojo docs for more information about logging, but the basic idea is that you can write statements like dojo.log.info("Doing some operation"); in javascript and have them appropriately filtered based on the log level used.

debugEnabled boolean no false Turns browser level logging completely on/off.
debugAtAllCosts boolean no false Turns off deep context level javascript debugging mode for dojo. This means that exceptions/debug statements will show you line numbers from the actual javascript file that generated them instead of the normal default which is usually bootstrap.js .

People should be wary of turning this on as it may cause problems under certain conditions, and you definitely don't ever want this on in production.

debugContainerId String no Sets the html element node id of the element you would like all browser debug content to go to, if you have logging turned on.

For example, if you had an element on your html page with id="myElement" you would set the debugContainerId to "myElement".

consoleEnabled boolean no false Enables/disables the dojo.debug.console functionality which should redirect most logging messages to your browsers javascript console. (if it supports one).

The debug console is disabled by default. Currently known supported browsers are FireFox(having FireBug extension helps a great deal)/Opera/Safari.

preventBackButtonFix boolean no false Sets the dojo preventBackButtonFix djConfig configuration. This should typically be avoided but is provided for flexibility.
parseWidgets boolean no false Tells dojo whether or not to parse widgets by traversing the entire dom node of your document. It is highly reccomended that you keep this at its default value of false.
tapestrySource IAsset false classpath:/tapestry/core.js Controls what the root source inclusion is for tapestry javascript packages. Override if you want to replace the built in defaults with a version of your own.
dojoSource IAsset false classpath:/dojo/dojo.js Controls what the root source inclusion is for the dojo javascript packages. Override if you want to replace the built in defaults with a version of your own.
dojoPath IAsset false classpath:/dojo/ Specifies the default path to the root dojo folder, not the dojo.js file itself. This is used by the djConfig.baseRelativePath javascript configuration property in dojo to resolve relative resource includes - like widgets/images/js/css/etc..

Body: not allowed

Informal parameters: forbidden

Reserved parameters: none

Examples

TODO..