org.apache.tapestry.script
Class ScriptParser

java.lang.Object
  extended by 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:

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 Bodyand/or Scriptcomponents, 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).

Author:
Howard Lewis Ship

Field Summary
static String SCRIPT_DTD_1_0_PUBLIC_ID
           
static String SCRIPT_DTD_1_1_PUBLIC_ID
           
static String SCRIPT_DTD_1_2_PUBLIC_ID
           
static String SCRIPT_DTD_3_0_PUBLIC_ID
           
static String SCRIPT_DTD_4_0_PUBLIC_ID
           
 
Constructor Summary
ScriptParser(org.apache.hivemind.ClassResolver resolver, ExpressionEvaluator evaluator, ValueConverter valueConverter)
           
 
Method Summary
 IScript parse(org.apache.hivemind.Resource resourceLocation)
          Parses the given input stream to produce a parsed script, ready to execute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

SCRIPT_DTD_4_0_PUBLIC_ID

public static final String SCRIPT_DTD_4_0_PUBLIC_ID
Since:
4.1
See Also:
Constant Field Values
Constructor Detail

ScriptParser

public ScriptParser(org.apache.hivemind.ClassResolver resolver,
                    ExpressionEvaluator evaluator,
                    ValueConverter valueConverter)
Method Detail

parse

public IScript parse(org.apache.hivemind.Resource resourceLocation)
Parses the given input stream to produce a parsed script, ready to execute.



Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.