Package org.zkoss.xel.util

Examples of org.zkoss.xel.util.TaglibMapper


   * @param loc the locator used to load taglib
   * @since 5.0.0
   */
  public static final FunctionMapper getFunctionMapper(Collection taglibs,
  Map imports, Collection funcs, Locator loc) {
    TaglibMapper mapper = null;
    if (taglibs != null && !taglibs.isEmpty()) {
      mapper = new TaglibMapper();
      for (Iterator it = taglibs.iterator(); it.hasNext();)
        mapper.load((Taglib)it.next(), loc);
    }

    if (imports != null && !imports.isEmpty()) {
      if (mapper == null)
        mapper = new TaglibMapper();

      for (Iterator it = imports.entrySet().iterator(); it.hasNext();) {
        final Map.Entry me = (Map.Entry)it.next();
        mapper.addClass((String)me.getKey(), (Class)me.getValue());
      }
    }

    if (funcs != null && !funcs.isEmpty()) {
      if (mapper == null)
        mapper = new TaglibMapper();

      for (Iterator it = funcs.iterator(); it.hasNext();) {
        final Object[] o = (Object[])it.next();
        mapper.addFunction(
          (String)o[0], (String)o[1], (Function)o[2]);
      }
    }
    return mapper;
  }
View Full Code Here

TOP

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

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.