01: /* ELXelExpression.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Fri Aug 31 15:27:59 2007, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2007 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.zkmax.xel.el21;
20:
21: import javax.el.ValueExpression;
22:
23: import org.zkoss.xel.XelContext;
24: import org.zkoss.xel.Expression;
25: import org.zkoss.xel.XelException;
26:
27: /**
28: * A XEL expression that is based on EL expression.
29: *
30: * @author tomyeh
31: * @since 3.0.0
32: */
33: /*package*/class ELXelExpression implements Expression,
34: java.io.Serializable {
35: private final ValueExpression _expr;
36:
37: /*package*/ELXelExpression(ValueExpression expr) {
38: _expr = expr;
39: }
40:
41: public Object evaluate(XelContext xelc) throws XelException {
42: return _expr.getValue(new XelELContext(xelc));
43: }
44: }
|