com.primix.tapestry.html
Class Script
java.lang.Object
|
+--com.primix.tapestry.AbstractComponent
|
+--com.primix.tapestry.html.Script
- All Implemented Interfaces:
- IComponent, IRender
- public class Script
- extends AbstractComponent
Works with the Body
component to add a script (and perhaps some initialization)
to the HTML response.
Property |
Type |
Read / Write |
Required |
Default |
Description |
script |
String |
R |
yes |
|
The path of a resource (on the classpath) containing the script. |
symbols |
Map |
R |
no |
|
The base set of symbols to be provided to the IScript .
To this is added (in a copy of the Map ) any informal parameters.
|
Allows informal parameters (which become symbols visible to the script), but
does not allow a body.
- Version:
- $Id: Script.java,v 1.3 2001/09/04 01:27:47 hship Exp $
- Author:
- Howard Ship
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 |
Script
public Script()
setScriptBinding
public void setScriptBinding(IBinding value)
getScriptBinding
public IBinding getScriptBinding()
setCautiousBinding
public void setCautiousBinding(IBinding value)
getCautiousBinding
public IBinding getCautiousBinding()
setSymbolsBinding
public void setSymbolsBinding(IBinding value)
getSymbolsBinding
public IBinding getSymbolsBinding()
isCautious
public boolean isCautious()
- Returns true if the script is configured cautious (may load
a different script on a subsequent render) or normal
(once a script is loaded, it is "locked in" for all subsequent
request cycles). This is determined by the cautious parameter, which
defaults off.
getSymbols
public java.util.Map getSymbols()
- Constructs the symbols
Map
. This starts with the
contents of the symbols parameter (if specified) to which is added
any informal parameters. If both a symbols parameter and informal
parameters are bound, then a copy of the symbols parameter's value is made
(that is, the Map
provided by the symbols parameter is read, but not modified).
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).