org.apache.shale.dialog.scxml
Class ShaleDialogELEvaluator

java.lang.Object
  extended by org.apache.commons.scxml.env.jsp.ELEvaluator
      extended by org.apache.shale.dialog.scxml.ShaleDialogELEvaluator
All Implemented Interfaces:
Serializable, org.apache.commons.scxml.Evaluator

public class ShaleDialogELEvaluator
extends org.apache.commons.scxml.env.jsp.ELEvaluator

EL evaluator, for evaluating the expressions in SCXML documents used to specify Shale dialogs.

This evaluator uses the following premises for evaluation:

  1. JSF method binding expressions will take the form: #{...} These will return a java.lang.String object as required by the methods associated with org.apache.shale.dialog.ActionState
  2. JSP 2.0 EL expressions will take the form: ${...}

This evaluator delegates to the following expression evaluators:

  1. JSF method binding expressions get delegated to the JSF implementation (Ex: Apache MyFaces).
  2. JSP expressions get delegated to the Apache Jakarta Commons EL ExpressionEvaluator implementation. This evaluator adds ability to evaluate special predicates defined by SCXML.

Since:
1.0.4 $Id: ShaleDialogELEvaluator.java 481499 2006-12-02 03:47:39Z rahul $
See Also:
Serialized Form

Constructor Summary
ShaleDialogELEvaluator()
          Constructor.
 
Method Summary
 Object eval(org.apache.commons.scxml.Context ctx, String expr)
          Evaluate an expression.
 void setFacesContext(javax.faces.context.FacesContext context)
          Set per request context.
 
Methods inherited from class org.apache.commons.scxml.env.jsp.ELEvaluator
evalCond, evalLocation, getBuiltinFnMapper, getLog, newContext, setLog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShaleDialogELEvaluator

public ShaleDialogELEvaluator()
Constructor.

Method Detail

setFacesContext

public void setFacesContext(javax.faces.context.FacesContext context)
Set per request context.

Parameters:
context - The FacesContext for this request.

eval

public Object eval(org.apache.commons.scxml.Context ctx,
                   String expr)
            throws org.apache.commons.scxml.SCXMLExpressionException
Evaluate an expression.

Specified by:
eval in interface org.apache.commons.scxml.Evaluator
Overrides:
eval in class org.apache.commons.scxml.env.jsp.ELEvaluator
Parameters:
ctx - variable context
expr - expression
Returns:
Object The result of the evaluation
Throws:
org.apache.commons.scxml.SCXMLExpressionException - For a malformed expression
See Also:
ELEvaluator.eval(Context, String)


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.