01: /* XelELMapper.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Fri Aug 31 16:01:10 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 java.lang.reflect.Method;
22:
23: import org.zkoss.xel.Function;
24: import org.zkoss.xel.FunctionMapper;
25:
26: /**
27: * An EL function mapper that is based on a XEL function mapper.
28: *
29: * @author tomyeh
30: * @since 3.0.0
31: */
32: public class XelELMapper extends javax.el.FunctionMapper {
33: private FunctionMapper _mapper;
34:
35: public XelELMapper(FunctionMapper mapper) {
36: _mapper = mapper;
37: }
38:
39: public Method resolveFunction(String prefix, String name) {
40: if (_mapper != null) {
41: final Function f = _mapper.resolveFunction(prefix, name);
42: if (f != null)
43: return f.toMethod();
44: }
45: return null;
46: }
47: }
|