Package org.zkoss.xel.util

Examples of org.zkoss.xel.util.SimpleResolver


    assertEquals("=ivnulla", sheet1.getCell(2,0).getEditText());
   
    assertEquals("#NAME?", sheet1.getCell(0,0).getText());
   
    Map map = new HashMap();
    SimpleResolver resolver = new SimpleResolver(map);
    map.put("ABCD", new VarObject("Hello ZK"));
    book.addVariableResolver(resolver);
   
    SimpleSSDataListener listener = new SimpleSSDataListener();
    book.addSSDataListener(listener);
View Full Code Here


    Book book = new ExcelImporter().imports(getClass().getResource("/"+nm));
    Sheet sheet1 = (Sheet) book.getSheets().get(0);
    assertEquals("#NAME?", sheet1.getCell(0,0).getText());

    Map map = new HashMap();
    SimpleResolver resolver = new SimpleResolver(map);
    map.put("DEF", "Hello ZK");
    book.addVariableResolver(resolver);

    FunctionMapper mapper = new MyMapper();
    book.addFunctionMapper(mapper);
View Full Code Here

    Cell cellC1 = _sheet1.setCellEditText(0, 2, "=bankAccount3"); //C1
    Cell cellD1 = _sheet1.setCellEditText(0, 3, "=SUM(A1:C1)"); //D1
    Cell cellE1 = _sheet1.setCellEditText(0, 4, "=bankAccount1 + bankAccount2 + bankAccount3"); //E1
   
    Map varmap = new HashMap();
    VariableResolver resolver = new SimpleResolver(varmap);
    _book.addVariableResolver(resolver);

    varmap.put("bankAccount1", new Double(1d));
    varmap.put("bankAccount2", new Double(10d));
    varmap.put("bankAccount3", new Double(100d));
View Full Code Here

    Cell cellC1 = _sheet1.setCellEditText(0, 2, "=account.acc3"); //C1
    Cell cellD1 = _sheet1.setCellEditText(0, 3, "=SUM(A1:C1)"); //D1
    Cell cellE1 = _sheet1.setCellEditText(0, 4, "=account.acc1 + account.acc2 + account.acc3"); //E1
   
    Map varmap = new HashMap();
    VariableResolver resolver = new SimpleResolver(varmap);
    _book.addVariableResolver(resolver);

    varmap.put("account", new MyAccount());
   
    assertValue(2d, ((Number)cellA1.getResult()).doubleValue(), 0d);
View Full Code Here

TOP

Related Classes of org.zkoss.xel.util.SimpleResolver

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.