|
|
|
Description
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 followed by 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
Body,
Script
|
Parameters
Name |
Type |
Direction |
Required |
Default |
Description |
title |
String |
in |
yes |
|
Used to provide the window title for the page. |
stylesheet |
IAsset |
in |
no |
|
Creates a <link rel="stylesheet"> element. |
stylesheets |
Array or collection of IAsset |
in |
no |
|
Creates a series of <link rel="stylesheet"> element, one for each asset. |
refresh |
int |
in |
no |
|
If provided (and non-zero), then a <meta http-equiv="Refresh"> element
is included in the header. The refresh interval is the value provided
(which is the time to display the page, in seconds).
The refresh will be the same page (not necessarily the same URL as that
which initially presented the page, since the page will often be initially
displayed because of a link or form submission).
Note that to the tag, a refresh of zero means refresh
immediately. For this component, a refresh of zero is the same
as unspecified: no automatic refresh.
|
DTD |
String |
in |
no |
-//W3C//DTD HTML 4.0 Transitional//EN |
Used to specify the DOCTYPE of the generate HTML document. If the DTD is
explicity set to null, then no DOCTYPE is generated, otherwise the default
value is generated.
|
delegate |
IRender |
in |
no |
|
If specified, the delegate is invoked just before the </head> tag.
This allows the delegate to write additional tags, often meta tags of
various types.
|
Body: rendered Informal parameters:
forbidden
Reserved parameters: none
|
Examples
The Shell component is used here to provide the page's stylesheet and title.
Note in this example a common stylesheet file style.css is located in
the class path directory /com/mycorp/pages/ while the page's class is
in /com/mycorp/pages/customer/login/. The HTML header uses a relative
path to resolve the stylesheet.
Customer Login
Welcome to MyCorp's Customer Portal secure login page.
Please call 1800 230 187 for TR-2 recall information.
| |
<html>
<head>
<link rel="stylesheet" type="text/css" href="../../style.css" title="style">
<title>MyCorp Customer Login</title>
</head>
<span jwcid="$content$">
<span jwcid="@Shell" stylesheet="ognl:assets.stylesheet" title="MyCorp Customer Login">
<body jwcid="@Body">
<h1>Customer Login</h1>
Welcome to MyCorp's Customer Portal secure login page.
<p>
<span jwcid="@Insert" value="ognl:dailyMessage" class="ognl:messageClass"/>
</body>
</span>
</span>
</html>
<private-asset name="stylesheet" resource-path="/com/mycorp/pages/style.css"/>
package com.mycorp.pages.customer.login;
public class CustomerLoginPage extends BasePage {
private String dailyMessage;
private String messageClass;
public String getDailyMessage() { return dailyMessage; }
public String getMessageClass() { return messageClass; }
protected void initialize() {
dailyMessage = null;
messageClass = null;
}
}
|
|