gpt4 book ai didi

org.zkoss.xel.XelContext.getFunctionMapper()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 06:06:40 26 4
gpt4 key购买 nike

本文整理了Java中org.zkoss.xel.XelContext.getFunctionMapper()方法的一些代码示例,展示了XelContext.getFunctionMapper()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XelContext.getFunctionMapper()方法的具体详情如下:
包路径:org.zkoss.xel.XelContext
类名称:XelContext
方法名:getFunctionMapper

XelContext.getFunctionMapper介绍

[英]Returns the function mapper, or null if not available.
[中]返回函数映射器,如果不可用,则返回null。

代码示例

代码示例来源:origin: org.zkoss.common/zcommon

public FunctionMapper getFunctionMapper() {
  return _bMapper ? _mapper: _ctx.getFunctionMapper();
}
public Object getAttribute(String name) {

代码示例来源:origin: org.zkoss.zk/zkmax

public javax.el.FunctionMapper getFunctionMapper() {
  return _xelc != null ?
    new XelELMapper(_xelc.getFunctionMapper()): null;
}
public VariableMapper getVariableMapper() {

代码示例来源:origin: org.zkoss.common/zcommon

public org.zkoss.zel.FunctionMapper getFunctionMapper() {
  return _xelc != null ?
    new XelELMapper(_xelc.getFunctionMapper()): null;
}
public VariableMapper getVariableMapper() {

代码示例来源:origin: org.zkoss.zk/zkplus

public javax.el.FunctionMapper getFunctionMapper() {
  return _xelc != null ? new XelELMapper(_xelc.getFunctionMapper()) : null;
}

代码示例来源:origin: org.zkoss.common/zcommon

public Object evaluate(XelContext ctx) {
  //Test case: B30-1957661.zul where a function mapper is created
  //by zscript so it is different from one page to page
  return _expr.evaluate(ctx.getVariableResolver(), ctx.getFunctionMapper());
}

代码示例来源:origin: org.zkoss.common/zcommon

public Object evaluate(XelContext xelc, String expression,
Class expectedType)
throws XelException {
  return _eval.evaluate(expression, expectedType,
    xelc != null ? xelc.getVariableResolver(): null,
    xelc != null ? xelc.getFunctionMapper(): null);
}

代码示例来源:origin: org.zkoss.zk/zkmax

/**	Returns an OGNL context for the specified XEL context.
 */
public static Map getContext(XelContext ctx) {
  final FunctionMapper mapper = ctx.getFunctionMapper();
  return Ognl.addDefaultContext(null,
    mapper != null ? new MapperClassResolver(mapper): null,
    Collections.EMPTY_MAP);
    //Note: we always pass null as the context, since
    //we use ResolverAccessor as the root
}
/** Returns the root object.

代码示例来源:origin: org.zkoss.zk/zkmax

private ParserContext getParserContext(XelContext ctx) {
    if (ctx != null) {
      final FunctionMapper mapper = ctx.getFunctionMapper();
      if (mapper != null) {
        final Collection c = mapper.getClassNames();
        if (c != null && !c.isEmpty()) {
          final ParserContext pctx = new ParserContext();
          for (Iterator it = c.iterator(); it.hasNext();) {
            final String nm = (String)it.next();
            pctx.addImport(nm, mapper.resolveClass(nm));
          }
          return pctx;
        }
      }
    }
    return null;
  }
}

代码示例来源:origin: org.zkoss.common/zweb

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;
}

代码示例来源:origin: org.zkoss.zkforge.el/zcommons-el

FunctionMapper functions = ctx.getFunctionMapper();
if (functions == null)
 pLogger.logError(Constants.UNKNOWN_FUNCTION, functionName);

代码示例来源:origin: org.zkoss.common/zcommon

public Object evaluate(XelContext ctx) {
  //Test case: B30-1957661.zul where a function mapper is created
  //by zscript so it is different from one page to page
  //In this case, we cannot reuse parsed expression.
  final FunctionMapper nfm = ctx.getFunctionMapper();
  if (!Objects.equals(_mapper, nfm))
    return new ELFactory().evaluate(ctx, _rawexpr, _expected);
  return _expr.evaluate(ctx.getVariableResolver());
}

代码示例来源:origin: org.zkoss.zk/zkmax

public Object evaluate(XelContext xelc, String expression,
Class expectedType)
throws XelException {
  try {
    return _eval.evaluate(expression, expectedType,
      xelc != null ?
        new XelELResolver(xelc.getVariableResolver()): null,
      xelc != null ?
        new XelELMapper(xelc.getFunctionMapper()): null);
  } catch (ELException ex) {
    throw new XelException("Failed to evaluate "+expression, ex);
  }
}

代码示例来源:origin: org.zkoss.zk/zkmax

public Expression parseExpression(XelContext xelc, String expression,
Class expectedType)
throws XelException {
  FunctionMapper mapper = xelc != null ? xelc.getFunctionMapper(): null;
  try {
    return new ELXelExpression(
      _eval.parseExpression(expression, expectedType,
        mapper != null ? new XelELMapper(mapper): null),
        expression, mapper, expectedType);
  } catch (ELException ex) {
    throw new XelException("Failed to parse "+expression, ex);
  }
}
public Object evaluate(XelContext xelc, String expression,

代码示例来源:origin: org.zkoss.common/zcommon

public Expression parseExpression(XelContext xelc, String expression,
Class expectedType)
throws XelException {
  if (_v103)
    return new ELXelExpression(
      _eval.parseExpression(expression, expectedType));
  if (_v102)
    return new ELXelExpression102(
      _eval.parseExpression(expression, expectedType));
  FunctionMapper mapper = xelc != null ? xelc.getFunctionMapper(): null;
  return new ELXelExpression100(
    _eval.parseExpression(expression, expectedType, mapper),
    expression, mapper, expectedType);
}
public Object evaluate(XelContext xelc, String expression,

代码示例来源:origin: org.zkoss.zk/zkmax

public Object evaluate(XelContext ctx) {
  //Test case: B30-1957661.zul where a function mapper is created
  //by zscript so it is different from one page to page
  //In this case, we cannot reuse parsed expression.
  //
  //Note: if nfm is null, we consider it as not-change since DSP
  //doesn't save function mapper when evaluating
  try {
    final FunctionMapper nfm = ctx.getFunctionMapper();
    if (nfm != null && _mapper != nfm)
      return new ApacheELFactory().evaluate(ctx, _rawexpr, _expected);
    final VariableResolver resolver = ctx.getVariableResolver();
    return _expr.evaluate(
      resolver != null ? new XelELResolver(resolver): null);
  } catch (ELException ex) {
    throw new XelException(ex);
  }
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com