Class Templates

java.lang.Object
org.zkoss.zk.ui.Templates

public class Templates extends Object
Utils for looking up template.
Since:
8.0.0
Author:
chunfu
  • Constructor Details

    • Templates

      public Templates()
  • Method Details

    • lookup

      public static Template lookup(Component comp, String name)
      A shortcut of lookup(comp, comp, name, null, false)
    • lookup

      public static Template lookup(Component comp, Component base, String name)
      A shortcut of lookup(comp, base, name, null, false)
    • lookup

      public static Template lookup(Component comp, Component base, String name, Component compBase)
      A shortcut of lookup(comp, base, name, compBase, false)
    • lookup

      public static Template lookup(Component comp, Component base, String name, Component compBase, boolean excludeBase)
      Lookup the template with some information. Note: if not sure the meaning of those arguments, please use lookup(Component, String) directly.
      Parameters:
      comp - It is the component to start looking for, and is necessary.
      base - To avoid redundant finding, usually it is the same with comp.
      name - The template's name, and is necessary.
      compBase - Special usage. Those templates defined inside a ShadowElement have higher priority when compBase is distributed child of the specific ShadowElement. Usually, it is null.
      excludeBase - It is a boolean to indicate whether to skip base component or not. Usually, it is false.
      Returns:
      Template