org.apache.tapestry
Interface IScriptProcessor

All Known Implementing Classes:
Body

public interface IScriptProcessor

Defines methods needed by a IScript to execute.

Since:
3.0
Version:
$Id: IScriptProcessor.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship
See Also:
Body

Method Summary
 void addBodyScript(String script)
          Adds scripting code to the main body.
 void addExternalScript(IResourceLocation location)
          Adds an external script.
 void addInitializationScript(String script)
          Adds initialization script.
 String getUniqueString(String baseValue)
          Ensures that the given string is unique.
 

Method Detail

addBodyScript

void addBodyScript(String script)
Adds scripting code to the main body. During the render, multiple scripts may render multiple bodies; all are concatinated together to form a single block.


addInitializationScript

void addInitializationScript(String script)
Adds initialization script. Initialization script is executed once, when the containing page loads. Effectively, this means that initialization script is stored inside the HTML <body> element's onload event handler.


addExternalScript

void addExternalScript(IResourceLocation location)
Adds an external script. The processor is expected to ensure that external scripts are only loaded a single time per page.


getUniqueString

String getUniqueString(String baseValue)
Ensures that the given string is unique. The string is either returned unchanged, or a suffix is appended to ensure uniqueness.