public class ScriptParser extends java.lang.Object
-//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).
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SCRIPT_DTD_1_0_PUBLIC_ID |
static java.lang.String |
SCRIPT_DTD_1_1_PUBLIC_ID |
static java.lang.String |
SCRIPT_DTD_1_2_PUBLIC_ID |
static java.lang.String |
SCRIPT_DTD_3_0_PUBLIC_ID |
Constructor and Description |
---|
ScriptParser(org.apache.hivemind.ClassResolver resolver,
ExpressionEvaluator evaluator,
ValueConverter valueConverter) |
public static final java.lang.String SCRIPT_DTD_1_0_PUBLIC_ID
public static final java.lang.String SCRIPT_DTD_1_1_PUBLIC_ID
public static final java.lang.String SCRIPT_DTD_1_2_PUBLIC_ID
public static final java.lang.String SCRIPT_DTD_3_0_PUBLIC_ID
public ScriptParser(org.apache.hivemind.ClassResolver resolver, ExpressionEvaluator evaluator, ValueConverter valueConverter)
public IScript parse(org.apache.hivemind.Resource resourceLocation) throws DocumentParseException
DocumentParseException