org.apache.tapestry.script
Class ScriptParser
java.lang.Object
org.apache.tapestry.script.ScriptParser
public class ScriptParser
- extends Object
Parses a Tapestry Script, an XML file defined by one of the following
public identifiers:
-//Primix Solutions//Tapestry Script 1.0//EN
-//Howard Ship//Tapestry Script 1.1//EN
-//Howard Lewis Ship//Tapestry Script 1.2//EN
.
The version 1.1, is largely backwards compatible to the
old script, but adds a number of new features (if, if-not, foreach
and the use of property paths with insert).
Version 1.2 removes the <insert> element, using an Ant-like
syntax (${expression}
). It also replaces
the attribute name property-path
with expression
(because OGNL is used).
A Tapestry Script is used, in association with the
Body
and/or
Script
components,
to generate JavaScript for use with a Tapestry component. Two seperate pieces
of JavaScript can be generated. The body section (associated with the body
element of the XML document) is typically used to define JavaScript functions
(most often, event handlers). The initialization section
(associated with the initialization
element of the XML document)
is used to add JavaScript that will be evaluated when the page finishes loading
(i.e., from the HTML <body> element's onLoad event handler).
- Version:
- $Id: ScriptParser.java 243791 2004-02-19 17:38:13Z hlship $
- Author:
- Howard Lewis Ship
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SCRIPT_DTD_1_0_PUBLIC_ID
public static final String SCRIPT_DTD_1_0_PUBLIC_ID
- See Also:
- Constant Field Values
SCRIPT_DTD_1_1_PUBLIC_ID
public static final String SCRIPT_DTD_1_1_PUBLIC_ID
- See Also:
- Constant Field Values
SCRIPT_DTD_1_2_PUBLIC_ID
public static final String SCRIPT_DTD_1_2_PUBLIC_ID
- See Also:
- Constant Field Values
SCRIPT_DTD_3_0_PUBLIC_ID
public static final String SCRIPT_DTD_3_0_PUBLIC_ID
- Since:
- 3.0
- See Also:
- Constant Field Values
ScriptParser
public ScriptParser(IResourceResolver resolver)
parse
public IScript parse(IResourceLocation resourceLocation)
throws DocumentParseException
- Parses the given input stream to produce a parsed script,
ready to execute.
- Throws:
DocumentParseException