Package net.l3x.faces.freeway.templating.jsf

Examples of net.l3x.faces.freeway.templating.jsf.TemplateComponent


  public String getFamily() {
    return COMPONENT_FAMILY;
  }
 
  public void initialize() {
    TemplateComponent parent = findParentTemplate();
    if (parent == null) {
      TemplateUtils.addTopLevelTemplateComponent(getName(), this);
      findParentActivate().registerForRemoval(this);
    } else {
      parent.registerChild(this, false);
    }
  }
View Full Code Here


  @SuppressWarnings("unchecked")
  private void copyChildComponents(UIComponent component, List<UIComponent> destination) {
    for (UIComponent child : (List<UIComponent>) component.getChildren()) {
      List<JsfTemplate> spotTemplates = children.getSpotTemplates(child.getId());
      TemplateComponent hiddenTemplateComponent = hiddenTemplateComponentById.get(child.getId());
      if (spotTemplates != null) {
        for (JsfTemplate template : spotTemplates) {
          destination.addAll(template.process());
        }
      } else if (hiddenTemplateComponent != null) {
        destination.addAll(hiddenTemplateComponent.makeTemplate(variables).process());
      } else {
        destination.add(deepCloneComponent(child));
      }
    }
  }
View Full Code Here

  public static void addTopLevelTemplateComponent(String name, TemplateComponent component) {
    getTemplateComponents().put(name, component);
  }
 
  public static TemplateComponent getTopLevelTemplateComponent(String name) {
    TemplateComponent component = getTemplateComponents().get(name);
    if (component == null) {
      throw new IllegalArgumentException("No top-level template with name '"+name+"' found");
    }
    return component;
  }
View Full Code Here

TOP

Related Classes of net.l3x.faces.freeway.templating.jsf.TemplateComponent

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.