| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <!-- $Id$ --> |
| <html> |
| <head> |
| <title>Shell</title> |
| <link rel="stylesheet" type="text/css" href="Tapestry.css" title="style"> |
| </head> |
| |
| <body> |
| <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| <tr> |
| <td align="left"><A href="ServiceLink.html"><IMG alt=ServiceLink src="common-images/prev.png"></A></td> |
| <td align="middle"><A href="index.html"><IMG alt="Component Index" src="common-images/home.png" ></A></td> |
| <td align="right"><A href="Submit.html"><IMG alt=Submit src="common-images/next.png"></A></td> |
| <tr> |
| <tr> |
| <td colspan="3"><hr></td> |
| </tr> |
| <tr> |
| <td colspan="3"> |
| <table border="0" cellpadding="4" cellspacing="4" width="100%"> |
| |
| <tr valign="top"> |
| <td> |
| <table> |
| <tr> |
| <td><font size="+2"><b>Shell</b></font></td> |
| </tr> |
| <tr> |
| <td> |
| <A href="../api/org/apache/tapestry/html/Shell.html"> |
| org.apache.tapestry.html.Shell</A> |
| </td> |
| </tr> |
| </table> |
| </td> |
| <td> |
| <table align="right" valign="middle" bgcolor="#c0c0c0" cellpadding="8"> |
| <tr> |
| <td>Non Visual Component</td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| |
| <tr valign="center"> |
| <td colspan="2"> </td> |
| </tr> |
| |
| <tr> |
| <td colspan="2"> |
| <b>Description</b> |
| <br> |
| 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 <A href="Body.html">Body</A> component. |
| <p> |
| 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. |
| <p> |
| 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.</p> |
| |
| </td> |
| </tr> |
| |
| <tr> |
| <td colspan="2"> |
| <b>See Also</b> |
| <br> |
| <A href="Body.html">Body</A>, |
| <A href="Script.html">Script</A> |
| </td> |
| </tr> |
| |
| <tr> |
| <td colspan="2"> |
| <b>Parameters</b> |
| <br> |
| <table border="1" cellpadding="4" cellspacing="4" class="parameters"> |
| <tr> |
| <th>Name</th> |
| <th>Type</th> |
| <th>Direction</th> |
| <th>Required</th> |
| <th>Default</th> |
| <th>Description</th> |
| </tr> |
| <tr> |
| <td>title</td> |
| <td>String</td> |
| <td>in</td> |
| <td>yes</td> |
| <td> </td> |
| <td>Used to provide the window title for the page.</td> |
| </tr> |
| <tr> |
| <td>stylesheet</td> |
| <td><A href="../api/org/apache/tapestry/IAsset.html"><tt>IAsset</tt></A></td> |
| <td>in</td> |
| <td>no</td> |
| <td> </td> |
| <td>Creates a <link rel="stylesheet"> element.</td> |
| </tr> |
| |
| <tr> |
| <td>stylesheets</td> |
| <td>Array or collection of <A href="../api/org/apache/tapestry/IAsset.html"><tt>IAsset</tt></A></td> |
| <td>in</td> |
| <td>no</td> |
| <td> </td> |
| <td>Creates a series of <link rel="stylesheet"> element, one for each asset.</td> |
| </tr> |
| <tr> |
| <td>refresh</td> |
| <td>int</td> |
| <td>in</td> |
| <td>no</td> |
| <td> </td> |
| <td> |
| 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). |
| <p> |
| 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). |
| <p> |
| Note that to the <meta> tag, a refresh of zero means refresh |
| immediately. For this component, a refresh of zero is the same |
| as unspecified: no automatic refresh.</p> |
| |
| |
| </td> |
| </tr> |
| <tr> |
| <td>doctype</td> |
| <td>String</td> |
| <td>in</td> |
| <td>no</td> |
| <td style="font-size: xx-small;"> |
| HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" |
| </td> |
| <td> |
| Used to specify the full definition of the DOCTYPE element in the response page. |
| For example, setting this parameter to |
| <pre>math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd"</pre> |
| will make the component generate |
| <pre><!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd"></pre> |
| <p> |
| The list of currently valid DOCTYPE settings can be found here: |
| http://www.w3.org/QA/2002/04/valid-dtd-list.html |
| <p> |
| If the parameter is null or empty, no DOCTYPE tag will be rendered |
| </td> |
| </tr> |
| <tr> |
| <td>DTD</td> |
| <td>String</td> |
| <td>in</td> |
| <td>no</td> |
| <td>null</td> |
| <td> |
| Used to specify the DOCTYPE DTD of the generated HTML document. |
| <p> |
| This parameter is deprecated. Please use the doctype parameter instead. |
| </td> |
| </tr> |
| <tr> |
| <td>delegate</td> |
| <td><A href="../api/org/apache/tapestry/IRender.html"><tt>IRender</tt></A></td> |
| <td>in</td> |
| <td>no</td> |
| <td> </td> |
| <td> |
| 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. |
| </td> |
| </tr> |
| <tr> |
| <td>renderContentType</td> |
| <td>boolean</td> |
| <td>in</td> |
| <td>no</td> |
| <td>true</td> |
| <td>Determines whether the component will render an http-equiv element with |
| the Content Type of this response. It is necessary to render this element to ensure |
| that the browser will encode the POST parameters using the encoding |
| defined in the Content Type. Otherwise the browsers may use the default encoding |
| of the client machine, which cannot be known by the server. |
| If you set this parameter to false, please make sure that you can decode |
| the HTTP request parameters correctly.</td> |
| </tr> |
| |
| </table> |
| <P>Body: <STRONG>rendered<BR></STRONG>Informal parameters: |
| <STRONG>allowed (applied to <html> tag)</STRONG> |
| <br> |
| Reserved parameters: <EM>none</EM> |
| |
| </P> |
| |
| </td> |
| </tr> |
| |
| <tr> |
| <td colspan="2"> |
| <b>Examples</b> |
| <p> |
| The Shell component is used here to provide the page's stylesheet and title. |
| <p> |
| Note in this example a common stylesheet file <tt>style.css</tt> is located in |
| the class path directory <tt>/com/mycorp/pages/</tt> while the page's class is |
| in <tt>/com/mycorp/pages/customer/login/</tt>. The HTML header uses a relative |
| path to resolve the stylesheet. |
| <p> |
| |
| <table class="examples" cellpadding="24"> |
| <tr> |
| <td> |
| <h2><i><font color="navy">Customer Login</font></i></h2> |
| Welcome to MyCorp's Customer Portal secure login page. |
| <p> |
| <font color="red"><i>Please call 1800 230 187 for TR-2 recall information.</i></font></p> |
| <td></td> |
| </tr> |
| </table> |
| |
| <pre> |
| <html> |
| <head> |
| <link rel="stylesheet" type="text/css" <b>href="../../style.css"</b> title="style"> |
| <title>MyCorp Customer Login</title> |
| </head> |
| |
| <span jwcid="$content$"> |
| <span jwcid="<span class="jwcid">@<a href="Shell.html">Shell</a></span>" stylesheet="ognl:assets.stylesheet" title="MyCorp Customer Login"> |
| <body jwcid="@<a href="Body.html">Body</a>"> |
| |
| <h1>Customer Login</h1> |
| Welcome to MyCorp's Customer Portal secure login page. |
| <p> |
| <span jwcid="@<a href="Insert.html">Insert</a>" value="ognl:dailyMessage" class="ognl:messageClass"/> |
| |
| </body> |
| </span> |
| </span> |
| </html> |
| |
| |
| <property-specification name="dailyMessage" type="java.lang.String"/> |
| <property-specification name="messageClass" type="java.lang.String"/> |
| <private-asset name="stylesheet" resource-path="/com/mycorp/pages/style.css"/> |
| |
| |
| package com.mycorp.pages.customer.login; |
| |
| public abstract class CustomerLoginPage extends BasePage { |
| public abstract String getDailyMessage(); |
| |
| public abstract String getMessageClass(); |
| |
| } |
| </pre> |
| </td> |
| </tr></table> |
| </td></tr> |
| <tr> |
| <td colspan="3"><hr></td> |
| </tr> |
| <tr> |
| <td align="left"><A href="ServiceLink.html"><IMG alt=ServiceLink src="common-images/prev.png"></A></td> |
| <td align="middle"><A href="index.html"><IMG alt="Component Index" src="common-images/home.png" ></A></td> |
| <td align="right"><A href="Submit.html"><IMG alt=Submit src="common-images/next.png"></A></td> |
| </tr> |
| </table> |
| |
| </body> |
| </html> |