Package org.zkoss.xel

Examples of org.zkoss.xel.FunctionMapper


    private static final long serialVersionUID = 1L;

    public Collection getClassNames() {
      final Page page = getPage();
      if (page != null) {
        final FunctionMapper mapper = page.getFunctionMapper();
        if (mapper != null) {
          return new ArrayList<String>(0);
        }
      }
      return null;
View Full Code Here


    }

    public Class resolveClass(String name) throws XelException {
      final Page page = getPage();
      if (page != null) {
        final FunctionMapper mapper = page.getFunctionMapper();
        if (mapper != null) {
          return null;
        }
      }
      return null;
View Full Code Here

    public Function resolveFunction(String prefix, String name)
        throws XelException {
      final Page page = getPage();
      if (page != null) {
        final FunctionMapper mapper = page.getFunctionMapper();
        if (mapper != null) {
          return mapper.resolveFunction(prefix, name);
        }
      }
      return null;
    }
View Full Code Here

  public static CellValue evaluate(Book book, Cell cell) {
    final XelContext old = XelContextHolder.getXelContext();
    try {
      final VariableResolver resolver = BookHelper.getVariableResolver(book);
      final FunctionMapper mapper = BookHelper.getFunctionMapper(book);
      final XelContext ctx = new SimpleXelContext(resolver, mapper);
      ctx.setAttribute("zkoss.zss.CellType", Object.class);
      XelContextHolder.setXelContext(ctx);
      final CellValue cv = book.getFormulaEvaluator().evaluate(cell);
      //set back into Cell formula record(update value and cachedFormulaResultType)
View Full Code Here

 
  private static CellValue evaluateFormula(Book book, int sheetIndex, String formula) {
    final XelContext old = XelContextHolder.getXelContext();
    try {
      final VariableResolver resolver = BookHelper.getVariableResolver(book);
      final FunctionMapper mapper = BookHelper.getFunctionMapper(book);
      final XelContext ctx = new SimpleXelContext(resolver, mapper);
      ctx.setAttribute("zkoss.zss.CellType", Object.class);
      XelContextHolder.setXelContext(ctx);
      final CellValue cv = book.getFormulaEvaluator().evaluateFormula(sheetIndex, formula);
      return cv;
View Full Code Here

  private static ValueEval evaluateFormulaValueEval(Book book, int sheetIndex, String formula, boolean ignoreDereference) {
    final XelContext old = XelContextHolder.getXelContext();
    try {
      final VariableResolver resolver = BookHelper.getVariableResolver(book);
      final FunctionMapper mapper = BookHelper.getFunctionMapper(book);
      final XelContext ctx = new SimpleXelContext(resolver, mapper);
      ctx.setAttribute("zkoss.zss.CellType", Object.class);
      XelContextHolder.setXelContext(ctx);
      return book.getFormulaEvaluator().evaluateFormulaValueEval(sheetIndex, formula, ignoreDereference);
    } finally {
View Full Code Here

TOP

Related Classes of org.zkoss.xel.FunctionMapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.