/** Returns the expression factory. */ protected ExpressionFactory getExpressionFactory() { if (_expf == null) _expf = Expressions.newExpressionFactory(_expfcls); return _expf; }
private ExpressionFactory getExpressionFactory() { if (_expf == null) _expf = Expressions.newExpressionFactory(); //TODO: expfcls return _expf; } }
private ExpressionFactory getExpressionFactory() { //TODO: how to make it depends on page's expf return Expressions.newExpressionFactory(); }
/** Instantiates an instance of {@link ExpressionFactory}. * * <p>The default class is {@link org.zkoss.xel.el.ELFactory}, * which supports EL 2.0. * If you run under JVM 1.5 or later and deploy * <a href="http://code.google.com/p/zel/">zel.jar</a> in your class * path, the default class is then {@link org.zkoss.xel.zel.ELFactory} * which supports EL 2.2. * To override it, you can specify the class by calling * {@link #setExpressionFactoryClass}, or use * {@link #newExpressionFactory(Class)} instead. * * <p>For the ZK user, you can override it with zk.xml * or org.zkoss.zk.ui.util.Configuration. * * @exception XelException if the specified class failed to load, * or instantiate. */ public static final ExpressionFactory newExpressionFactory() throws XelException { return newExpressionFactory(_expfcls); } /** Instantiates an instance of {@link ExpressionFactory}.
/** Evaluates an expression. * * @param ctx the context information to evaluate the expression * It can be null, in which case no functions are supported for this * invocation. * @param expression the expression to be evaluated. * Note: the expression is enclosed * with ${ and }, regardless of what implementation is used. * @param expectedType the expected type of the result of the evaluation */ public static final Object evaluate(XelContext ctx, String expression, Class<?> expectedType) throws XelException { return newExpressionFactory().evaluate(ctx, expression, expectedType); }
private Context(String content, XelContext xelc, Locator loc) { this.content = content; _resolver = xelc != null ? xelc.getVariableResolver() : null; _mapper = new SimpleMapper(xelc != null ? xelc.getFunctionMapper() : null); _xelf = Expressions.newExpressionFactory(); _locator = loc; this.nLines = 1; }
public LabelLoaderImpl() { _fmfilter = new FilterMap.Filter() { public Object filter(Object key, Object value) { Object o = value instanceof ExValue ? ((ExValue)value).getValue(): value; if (o == null) { // it's possible like missing a label. o = handleMissingLabel(key); } return o; } }; _expf = Expressions.newExpressionFactory(); _xelc = new SimpleXelContext(new Resolver(), null); }