Package org.zkoss.xel.taglib

Examples of org.zkoss.xel.taglib.Taglib


        if (!params.isEmpty())
          log.warning("Ignored unknown attribute: "+params+", "+pi.getLocator());
        if (uri == null || prefix == null)
          throw new UiException("Both uri and prefix attribute are required, "+pi.getLocator());
        if (log.debugable()) log.debug("taglib: prefix="+prefix+" uri="+uri);
        langdef.addTaglib(new Taglib(prefix, uri));
      } else {
        log.warning("Unknown processing instruction: "+target);
      }
    }
  }
View Full Code Here


      if (uri == null || prefix == null)
        throw new UiException("Both uri and prefix attribute are required, "+pi.getLocator());
      //if (D.ON && log.debugable()) log.debug("taglib: prefix="+prefix+" uri="+uri);
      noEL("prefix", prefix, pi);
      noEL("uri", uri, pi); //not support EL (kind of chicken-egg issue)
      pgdef.addTaglib(new Taglib(prefix, toAbsoluteURI(uri, false)));
    } else if ("evaluator".equals(target)) {
      parseEvaluatorDirective(pgdef, pi, params);
    } else if ("xel-method".equals(target)) {
      parseXelMethod(pgdef, pi, params);
    } else if ("link".equals(target) || "meta".equals(target)
View Full Code Here

    Object x = root.evaluate(getXelContext());
    assertEquals(15.0, ((Number)x).doubleValue(), 0);
  }
 
  private XelContext getXelContext() {
    Taglib taglib = new Taglib("", "/web/WEB-INF/tld/zss/function.tld");
    List taglibs = new ArrayList(1);
    taglibs.add(taglib);
    FunctionMapper mapper = Taglibs.getFunctionMapper(taglibs, new ClassLocator());
    return new SimpleXelContext(null, mapper);
  }
View Full Code Here

      } else if ("taglib".equals(elnm)) {
        final String uri = IDOMs.getRequiredAttributeValue(el, "uri");
        noELnorEmpty("uri", uri, el);
        final String prefix = IDOMs.getRequiredAttributeValue(el, "prefix");
        noELnorEmpty("prefix", prefix, el);
        taglibs.add(new Taglib(prefix, uri));
      } else if ("variable-resolver".equals(elnm)) {
        final String clsnm = IDOMs.getRequiredAttributeValue(el, "class");
        noELnorEmpty("class", clsnm, el);
        resolvers.add(0, (VariableResolver)Classes.newInstanceByThread(clsnm)); //FILO
      } else if ("xel-method".equals(elnm)) {
View Full Code Here

TOP

Related Classes of org.zkoss.xel.taglib.Taglib

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.