com.primix.tapestry.html
Class Shell

java.lang.Object
  |
  +--com.primix.tapestry.AbstractComponent
        |
        +--com.primix.tapestry.html.Shell
All Implemented Interfaces:
IComponent, IRender

public class Shell
extends AbstractComponent

Component for creating a standard 'shell' for a page, which comprises the <html> and <head> portions of the page.

Specifically does not provide a <body> tag, that is usually accomplished using a Body component.
Parameter Type Read / Write Required Default Description
title String R yes   Used to provide the window title for the page.
stylesheet IAsset R no   If given, creates a <link rel=stylesheet> element.
refresh int R 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 <meta> tag, a refresh of zero means refresh immediately. For this component, a refresh of zero is the same as unspecified: no automatic refresh.

delegate IRender R 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.

Informal parameters are not allowed, but a body is (and is virtually required).

Version:
$Id: Shell.java,v 1.11 2001/09/28 19:42:02 hship Exp $
Author:
Howard Ship

Fields inherited from class com.primix.tapestry.AbstractComponent
id, page, specification, wrapped, wrappedCount
 
Constructor Summary
Shell()
           
 
Method Summary
 IBinding getDelegateBinding()
           
 IBinding getRefreshBinding()
           
 IBinding getStylesheetBinding()
           
 IBinding getTitleBinding()
           
 void render(IResponseWriter writer, IRequestCycle cycle)
          The principal rendering/rewinding method.
 void setDelegateBinding(IBinding value)
           
 void setRefreshBinding(IBinding value)
           
 void setStylesheetBinding(IBinding value)
           
 void setTitleBinding(IBinding value)
           
 
Methods inherited from class com.primix.tapestry.AbstractComponent
addAsset, addComponent, addWrapped, cleanupAfterRender, cleanupComponent, finishLoad, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getPage, getSpecification, prepareForRender, renderWrapped, reset, setBinding, setContainer, setId, setPage, setSpecification, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Shell

public Shell()
Method Detail

setTitleBinding

public void setTitleBinding(IBinding value)

getTitleBinding

public IBinding getTitleBinding()

setStylesheetBinding

public void setStylesheetBinding(IBinding value)

getStylesheetBinding

public IBinding getStylesheetBinding()

getRefreshBinding

public IBinding getRefreshBinding()

setRefreshBinding

public void setRefreshBinding(IBinding value)

getDelegateBinding

public IBinding getDelegateBinding()

setDelegateBinding

public void setDelegateBinding(IBinding value)

render

public void render(IResponseWriter writer,
                   IRequestCycle cycle)
            throws RequestCycleException
Description copied from interface: IRender
The principal rendering/rewinding method. This will cause the receiving component to render its top level elements (HTML text and components).

Renderring and rewinding are the exact same process. The same code that renders must be able to restore state by going through the exact same operations (even though the output is discarded).