📄 funcmapper.java
字号:
/* FuncMapper.java{{IS_NOTE Purpose: Description: History: Mon May 5 15:57:33 2008, Created by tomyeh}}IS_NOTECopyright (C) 2008 Potix Corporation. All Rights Reserved.{{IS_RIGHT This program is distributed under GPL Version 2.0 in the hope that it will be useful, but WITHOUT ANY WARRANTY.}}IS_RIGHT*/package org.zkoss.zkdemo.test2;import org.zkoss.xel.Function;import org.zkoss.xel.XelException;import org.zkoss.xel.util.MethodFunction;import org.zkoss.xel.util.SimpleMapper;/** * Used to test with test2/Z31-funcmap.zul * * @author tomyeh */public class FuncMapper extends SimpleMapper { public Function resolveFunction(String prefix, String name) throws XelException { if ("quote".equals(name)) { try { return new MethodFunction( FuncMapper.class.getMethod("quote", new Class[] {String.class})); } catch (Exception ex) { throw XelException.Aide.wrap(ex); } } return null; } public static String quote(String s){ return "'" + s +"'"; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -