01: /* DelegatingExpressionEvaluator.java
02: {{IS_NOTE
03: Purpose:
04:
05: Description:
06:
07: History:
08: Jul 25, 2007 10:03:38 AM , Created by Dennis Chen
09: }}IS_NOTE
10:
11: Copyright (C) 2007 Potix Corporation. All Rights Reserved.
12:
13: {{IS_RIGHT
14: This program is distributed under GPL Version 2.0 in the hope that
15: it will be useful, but WITHOUT ANY WARRANTY.
16: }}IS_RIGHT
17: */
18: package org.zkoss.seam;
19:
20: import javax.servlet.jsp.el.ELException;
21: import javax.servlet.jsp.el.Expression;
22: import javax.servlet.jsp.el.ExpressionEvaluator;
23: import javax.servlet.jsp.el.FunctionMapper;
24: import javax.servlet.jsp.el.VariableResolver;
25:
26: import org.apache.commons.el.ExpressionEvaluatorImpl;
27:
28: /**package**/
29: class DelegatingEexpressionEvaluator extends ExpressionEvaluator {
30:
31: ExpressionEvaluator impl;
32:
33: public DelegatingEexpressionEvaluator() {
34: impl = new ExpressionEvaluatorImpl();
35: }
36:
37: @Override
38: public Object evaluate(String expression, Class expectedType,
39: VariableResolver vResolver, FunctionMapper fMapper)
40: throws ELException {
41: //System.out.println("evaluate=====>["+expression+"]");
42: return impl.evaluate(expression, expectedType, vResolver,
43: fMapper);
44: }
45:
46: @Override
47: public Expression parseExpression(String expression,
48: Class expectedType, FunctionMapper fMapper)
49: throws ELException {
50: //System.out.println("parseExpression=====>["+expression+"]");
51: return impl.parseExpression(expression, expectedType, fMapper);
52: }
53:
54: }
|