Package com.sun.jsftemplating.layout.descriptors

Examples of com.sun.jsftemplating.layout.descriptors.ComponentType


        String content = new String(FileUtil.readFromURL(contentURL));

        // Create a StaticText component and add it under the
        // "root" component.
        LayoutComponent stDesc = new LayoutComponent(null,
      "externalContent", new ComponentType("tmpTextCT",
      "com.sun.jsftemplating.component.factory.basic.StaticTextFactory"));
        stDesc.addOption("value", content);
        ComponentUtil.getInstance(ctx).createChildComponent(ctx, stDesc, root);
    } else {
        // Include the first one...
View Full Code Here


        String content = new String(FileUtil.readFromURL(contentURL));

        // Create a StaticText component and add it under the
        // "root" component.
        LayoutComponent stDesc = new LayoutComponent(null,
      "externalContent", new ComponentType("tmpTextCT",
      "com.sun.jsftemplating.component.factory.basic.StaticTextFactory"));
        stDesc.addOption("value", content);
        ComponentUtil.getInstance(ctx).createChildComponent(ctx, stDesc, root);
    } else {
        // Include the first one...
View Full Code Here

        String content = new String(FileUtil.readFromURL(contentURL));

        // Create a StaticText component and add it under the
        // "root" component.
        LayoutComponent stDesc = new LayoutComponent(null,
      "externalContent", new ComponentType("tmpTextCT",
      "com.sun.jsftemplating.component.factory.basic.StaticTextFactory"));
        stDesc.addOption("value", content);
        ComponentUtil.getInstance(ctx).createChildComponent(ctx, stDesc, root);
    } else {
        // Include the first one...
View Full Code Here

    !LayoutElementUtil.isNestedLayoutComponent(facetElt);
      facetElt.setRendered(isRendered);
      element = facetElt;
  } else {
      LayoutComponent lc = null;
      ComponentType componentType = null;
      String nsURI = node.getNamespaceURI();
      if (nsURI != null) {
    // Do lookup using namespace...
    componentType = LayoutDefinitionManager.getGlobalComponentType(
      null, nsURI + ':' + node.getLocalName());
View Full Code Here

        + FACTORY_CLASS_ATTRIBUTE + "' are required attributes of '"
        + COMPONENT_TYPE_ELEMENT + "' Element!");
  }

  // Create the new ComponentType
  return new ComponentType(id, factoryClass);
    }
View Full Code Here

  // use a LayoutComponent for it to get rendered
  LayoutElement markupElt = null;
  if ((parent instanceof LayoutComponent)
    || LayoutElementUtil.isNestedLayoutComponent(parent)) {
      // Make a "markup" LayoutComponent..
      ComponentType type = ensureMarkupType(parent);
      markupElt = new LayoutComponent(
        parent, MARKUP_ELEMENT + _markupCount++, type);
      LayoutComponent markupComp = ((LayoutComponent) markupElt);
      markupComp.addOption("tag", tag);
      markupComp.setNested(true);
View Full Code Here

  // Pull off attributes...
  Map<String, String> attributes = getAttributes(node);
  String id = attributes.get(ID_ATTRIBUTE);

  // Create the LayoutComponent
  ComponentType type = ensureEditAreaType(parent);
  LayoutComponent component =
      new LayoutComponent(parent, EDITABLE + id, type);
  parent.addChildLayoutElement(component);

  // Configure it...
View Full Code Here

  // Pull off attributes...
  Map<String, String> attributes = getAttributes(node);
  String id = attributes.get(ID_ATTRIBUTE);

  // Create the LayoutComponent
  ComponentType type = ensurePopupMenuType(parent);
  LayoutComponent popupMenu =
      new LayoutComponent(parent, EDIT_MENU + id, type);

  // Configure it...
  popupMenu.setNested(
View Full Code Here

     *      been defined so that it can be used implicitly.</p>
     */
    private ComponentType ensurePopupMenuType(LayoutElement elt) {
  // See if it is defined
  LayoutDefinition ld = elt.getLayoutDefinition();
  ComponentType type = null;
  try {
      type = getComponentType(elt, POPUP_MENU_TYPE);
  } catch (IllegalArgumentException ex) {
      // Nope, define it...
      type = new ComponentType(POPUP_MENU_TYPE, POPUP_MENU_TYPE_CLASS);
      ld.addComponentType(type);
  }

  // Return the type
  return type;
View Full Code Here

     *      been defined so that it can be used implicitly.</p>
     */
    private ComponentType ensureEditAreaType(LayoutElement elt) {
  // See if it is defined
  LayoutDefinition ld = elt.getLayoutDefinition();
  ComponentType type = null;
  try {
      type = getComponentType(elt, EDIT_AREA_TYPE);
  } catch (IllegalArgumentException ex) {
      // Nope, define it...
      type = new ComponentType(EDIT_AREA_TYPE, EDIT_AREA_TYPE_CLASS);
      ld.addComponentType(type);
  }

  // Return the type
  return type;
View Full Code Here

TOP

Related Classes of com.sun.jsftemplating.layout.descriptors.ComponentType

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.