Provides the outer 'shell' of a page, including the <html>, <head> and <title> tags, but not the <body> tag (which is typically provided by a Body component).

Most Tapestry pages will include a Shell component enclosing a Body component. The Shell is used to resolve the page's HTML stylesheet and the Body component manages dynamically generated JavaScript.

When designing the look and feel of a Tapestry page, include the normal HTML elements before the Shell component, including a <link rel="stylesheet"> element, so that the page will render normally in a web browser, but use a <span jwcid="$content$"> around the actual content.

See also: org.apache.tapestry.html.Shell , Body , PageLink


Name Type Required Default Description
title String yes The title for the page, used to render the <title> tag.
raw boolean no false If false (the default), then HTML characters in the title are escaped. If true, then value is emitted exactly as is.
stylesheet IAsset no If provided, then a <link> to the stylesheet is generated.
stylesheets Array or collection of IAsset no If provided, then <link> elements are created for each stylesheet asset.
doctype String no HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "" Used to specify the full definition of the DOCTYPE element in the response page.
renderContentType boolean no true If true (the default), then a <meta> tag will be written to set the content type of the page.
refresh int no If provided, then a <meta> tag will be written to cause a page refresh. The parameter value is the number of seconds before the refresh.
disableCaching boolean no false If provided, then a <meta> tag will be written setting the content="nocache" value to try and prevent browser caching of page.
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.
renderBaseTag boolean no false Specifies whether or not to render the html BASE tag element in the document HEAD.
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"Doing some operation"); in javascript and have them appropriately filtered based on the log level used.

debugEnabled boolean no true 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 debug 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: allowed

Informal parameters: forbidden

Reserved parameters: none


The Shell component is used here to provide the page's stylesheet and title.

In this example, the Login.html template is in the login subdirectory of the root application context. The stylesheet is within the styles directory, below the root application context.


 <link rel="stylesheet" type="text/css" href="../styles/style.css"/>
 <title>MyCorp Customer Login</title>

<span jwcid="$content$">
<span jwcid="@Shell" stylesheet="asset:stylesheet" title="MyCorp Customer Login">
<body jwcid="@Body">

<h1>Customer Login</h1>
Welcome to MyCorp's Customer Portal secure login page.

. . .



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE page-specification PUBLIC 
  "-//Apache Software Foundation//Tapestry Specification 4.0//EN" 

  . . .
  <asset name="stylesheet" path="styles/style.css"/>

Note that for page and component specifications stored in the web application context (even under WEB-INF), relative asset paths are computed from the root application context directory .