org.makumba.list.functions
Class ValueFunction
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.makumba.analyser.AnalysableElement
org.makumba.analyser.AnalysableExpression
org.makumba.list.functions.GenericListValueFunction
org.makumba.list.functions.ValueFunction
- All Implemented Interfaces:
- Serializable, IterationTag, JspTag, Tag
public class ValueFunction
- extends GenericListValueFunction
Implements a mak:value() function, similar to the mak:value tag (ValueTag
). The advantage of the function is
that it can be used inside JSTL/EL statements, e.g. a c:if. The function provides just basic value computing, but not
the advanced formatting that the ValueTag
provides.
- Version:
- $Id: ValueFunction.java 5117 2010-05-18 17:18:03Z rosso_nero $
- Author:
- Rudolf Mayer
- See Also:
- Serialized Form
Methods inherited from class org.makumba.analyser.AnalysableElement |
checkTagFound, discardJSPParsingData, getAnalyzedElementData, getCurrentBodyTagData, getElementAfter, getElementBefore, getPageCache, getPageCache, getRunningElementData, getTagByAttribute, getTagById, getThreadElementStack, initializeThread, keepAnalysisState, setAnalyzedElementData, setRunningElementData |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValueFunction
public ValueFunction()
analyze
public void analyze(PageCache pageCache)
- Description copied from class:
AnalysableExpression
- Performs analysis-time operations
- Specified by:
analyze
in class AnalysableExpression
getPrefix
public String getPrefix()
- Description copied from class:
AnalysableExpression
- Gets the prefix of the makumba EL expression, e.g. Value
- Specified by:
getPrefix
in class AnalysableExpression
- Returns:
- the prefix of this EL expression
resolve
public Object resolve(PageContext pc,
PageCache pageCache)
throws LogicException
- Description copied from class:
AnalysableExpression
- Resolves the expression at runtime
- Specified by:
resolve
in class AnalysableExpression
- Throws:
LogicException
treatExpressionAtAnalysis
public String treatExpressionAtAnalysis(String expression)
- Description copied from class:
AnalysableExpression
- Modifies the expression before analysis. This is necessary because the expression that comes from page analysis
is not tailored to the specific expression we want to handle
- Specified by:
treatExpressionAtAnalysis
in class AnalysableExpression
- Returns:
- the expression value, trimmed down to what is necessary for this kind of EL expression evaluator
value
public static Object value(String expr)