|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.zkoss.xel.Expressions
public class Expressions
Utilities to use XEL.
Field Summary | |
---|---|
static Expression |
DUMMY_EXPRESSION
An dummy expression that does nothing. |
static FunctionMapper |
EMPTY_MAPPER
An empty function mapper, i.e., it has no function defined at all. |
static VariableResolver |
EMPTY_RESOLVER
An empty variable resolver, i.e., it has no variable defined at all. |
Constructor Summary | |
---|---|
Expressions()
|
Method Summary | |
---|---|
static java.lang.Object |
evaluate(XelContext ctx,
java.lang.String expression,
java.lang.Class expectedType)
Evaluates an expression. |
static java.lang.Class |
getExpressionFactoryClass()
Returns the implementation of the expression factory that is used by the whole system, or null to use the system default. |
static ExpressionFactory |
newExpressionFactory()
Instantiates an instance of ExpressionFactory . |
static ExpressionFactory |
newExpressionFactory(java.lang.Class expfcls)
Instantiates an instance of ExpressionFactory . |
static void |
setExpressionFactoryClass(java.lang.Class expfcls)
Sets the implementation of the expression factory that shall be used by the whole system, or null to use the system default. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final FunctionMapper EMPTY_MAPPER
public static final VariableResolver EMPTY_RESOLVER
public static final Expression DUMMY_EXPRESSION
Constructor Detail |
---|
public Expressions()
Method Detail |
---|
public static final ExpressionFactory newExpressionFactory() throws XelException
ExpressionFactory
.
The default class is ELFactory
.
To override it, you can specify the class by calling
setExpressionFactoryClass(java.lang.Class)
.
For the ZK user, you can override it with zk.xml or org.zkoss.zk.ui.util.Configuration.
XelException
- if the specified class failed to load,
or instantiate.public static final ExpressionFactory newExpressionFactory(java.lang.Class expfcls)
ExpressionFactory
.
The default class is ELFactory
.
To override it, you can specify the class by calling
setExpressionFactoryClass(java.lang.Class)
.
For the ZK user, you can override it with zk.xml or org.zkoss.zk.ui.util.Configuration.
expfcls
- the class that implements ExpressionFactory
,
or null to use the default.
XelException
- if the specified class failed to load,
or instantiate.public static final java.lang.Object evaluate(XelContext ctx, java.lang.String expression, java.lang.Class expectedType) throws XelException
ctx
- the context information to evaluate the expression
It can be null, in which case no functions are supported for this
invocation.expression
- the expression to be evaluated.
Note: the expression is enclosed
with ${ and }, regardingless what implemetnation is used.expectedType
- the expected type of the result of the evaluation
XelException
public static final void setExpressionFactoryClass(java.lang.Class expfcls)
Default: null - it means ELFactory
.
Note: you can only specify an implementation that is compatible with JSP EL here, since all builtin pages depend on it.
expfcls
- the implemtation class, or null to use the default.
Note: expfcls must implement ExpressionFactory
.
If null, the system default is used.public static final java.lang.Class getExpressionFactoryClass()
setExpressionFactoryClass(java.lang.Class)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |