|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry.script.ParsedScript
public class ParsedScript
A top level container for a number of script tokens.
| Constructor Summary | |
|---|---|
ParsedScript(ExpressionEvaluator evaluator,
ValueConverter valueConverter,
org.apache.hivemind.Location location)
|
|
| Method Summary | |
|---|---|
void |
addToken(IScriptToken token)
Invoked during parsing to add the token parameter as a child of this token. |
protected Object |
evaluate(String expression,
ScriptSession session)
Evaluates the expression against the session's symbols, using ExpressionEvaluator.read(Object, String) and returns the result. |
protected boolean |
evaluateBoolean(String expression,
ScriptSession session)
Evaluates an expression and coerces the result to a boolean. |
void |
execute(IComponent target,
IRequestCycle cycle,
IScriptProcessor processor,
Map symbols)
Executes the script, which will read and modify the symbols Map. |
void |
execute(IRequestCycle cycle,
IScriptProcessor processor,
Map symbols)
Creates the ScriptSessionImpland invokes
AbstractToken.writeChildren(java.lang.StringBuffer, org.apache.tapestry.script.ScriptSession). |
org.apache.hivemind.Location |
getLocation()
|
org.apache.hivemind.Resource |
getScriptResource()
Returns the location from which the script was loaded. |
void |
write(StringBuffer buffer,
ScriptSession session)
Does nothing; never invoked. |
protected void |
writeChildren(StringBuffer buffer,
ScriptSession session)
Invokes IScriptToken.write(StringBuffer,ScriptSession)on each child token (if there
are any). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ParsedScript(ExpressionEvaluator evaluator,
ValueConverter valueConverter,
org.apache.hivemind.Location location)
| Method Detail |
|---|
public org.apache.hivemind.Resource getScriptResource()
IScript
getScriptResource in interface IScript
public void execute(IRequestCycle cycle,
IScriptProcessor processor,
Map symbols)
ScriptSessionImpland invokes
AbstractToken.writeChildren(java.lang.StringBuffer, org.apache.tapestry.script.ScriptSession).
execute in interface IScriptcycle - the current request cycleprocessor - an object that processes the results of the script, typically
an instance of Bodysymbols - Map of input symbols; execution of the script may modify the map,
creating new output symbolsTapestryUtils.getPageRenderSupport(IRequestCycle, IComponent)
public void execute(IComponent target,
IRequestCycle cycle,
IScriptProcessor processor,
Map symbols)
Map. The
script works with the IScriptProcessor to get the generated JavaScript
included on the page.
execute in interface IScripttarget - The component this script is being executed by/forcycle - the current request cycleprocessor - an object that processes the results of the script, typically
an instance of Bodysymbols - Map of input symbols; execution of the script may modify the map,
creating new output symbolsTapestryUtils.getPageRenderSupport(IRequestCycle, IComponent)
public void write(StringBuffer buffer,
ScriptSession session)
write in interface IScriptTokenpublic org.apache.hivemind.Location getLocation()
getLocation in interface org.apache.hivemind.Locatablepublic void addToken(IScriptToken token)
IScriptToken
addToken in interface IScriptToken
protected void writeChildren(StringBuffer buffer,
ScriptSession session)
IScriptToken.write(StringBuffer,ScriptSession)on each child token (if there
are any).
protected Object evaluate(String expression,
ScriptSession session)
ExpressionEvaluator.read(Object, String) and returns the result.
protected boolean evaluateBoolean(String expression,
ScriptSession session)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||