org.apache.strutsel.taglib.utils
Class EvalHelper

java.lang.Object
  extended by org.apache.strutsel.taglib.utils.EvalHelper

public final class EvalHelper
extends Object

This class is used in the evaluateExpressions method of each Tag class. It is used to process the original attribute value through the JSTL EL engine to produce an evaluated value. It provides functions to evaluate the expression assuming it is an Object, String, Integer, or Boolean result.


Method Summary
static Object eval(String attrName, String attrValue, Tag tagObject, PageContext pageContext)
          Evaluates the attribute value in the JSTL EL engine, returning the raw Object value of the evaluated expression.
static Boolean evalBoolean(String attrName, String attrValue, Tag tagObject, PageContext pageContext)
          Evaluates the attribute value in the JSTL EL engine, assuming the resulting value is an Boolean object.
static Integer evalInteger(String attrName, String attrValue, Tag tagObject, PageContext pageContext)
          Evaluates the attribute value in the JSTL EL engine, assuming the resulting value is an Integer object.
static String evalString(String attrName, String attrValue, Tag tagObject, PageContext pageContext)
          Evaluates the attribute value in the JSTL EL engine, assuming the resulting value is a String object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

eval

public static Object eval(String attrName,
                          String attrValue,
                          Tag tagObject,
                          PageContext pageContext)
                   throws JspException
Evaluates the attribute value in the JSTL EL engine, returning the raw Object value of the evaluated expression. If the original expression is null, or the resulting value is null, it will return null.

Throws:
JspException

evalString

public static String evalString(String attrName,
                                String attrValue,
                                Tag tagObject,
                                PageContext pageContext)
                         throws JspException
Evaluates the attribute value in the JSTL EL engine, assuming the resulting value is a String object. If the original expression is null, or the resulting value is null, it will return null.

Throws:
JspException

evalInteger

public static Integer evalInteger(String attrName,
                                  String attrValue,
                                  Tag tagObject,
                                  PageContext pageContext)
                           throws JspException
Evaluates the attribute value in the JSTL EL engine, assuming the resulting value is an Integer object. If the original expression is null, or the resulting value is null, it will return null.

Throws:
JspException

evalBoolean

public static Boolean evalBoolean(String attrName,
                                  String attrValue,
                                  Tag tagObject,
                                  PageContext pageContext)
                           throws JspException
Evaluates the attribute value in the JSTL EL engine, assuming the resulting value is an Boolean object. If the original expression is null, or the resulting value is null, it will return null.

Throws:
JspException


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