Examples of LayoutStaticText


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

  LayoutDefinition layoutDefinition = new LayoutDefinition(key);
  NodeList nodeList = document.getChildNodes();
  boolean abortProcessing = false;
    DocumentType docType = document.getDoctype();
    if (docType != null) {
        LayoutStaticText stDocType = new LayoutStaticText(layoutDefinition, "",
            "<!DOCTYPE " + docType.getName() + " PUBLIC \"" + docType.getPublicId() + "\" \"" + docType.getSystemId() + "\">");
        layoutDefinition.addChildLayoutElement(stDocType);
    }
    for (int i = 0; i < nodeList.getLength() && (abortProcessing != true); i++) {
      abortProcessing = process(layoutDefinition, nodeList.item(i), false);
View Full Code Here

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

  String value = node.getNodeValue();
//  TODO:  find out what "name" should be in the ctors
  switch (node.getNodeType()) {
  case Node.TEXT_NODE :
      if (!value.trim().equals("")) {
    element = new LayoutStaticText(parent,
      LayoutElementUtil.getGeneratedId(node.getNodeName(), getNextIdNumber()),
      value);
      }
      break;
  case Node.ELEMENT_NODE:
      element = createComponent(parent, node, nested);
      if (element instanceof LayoutStaticText) {
    // We have a element node that needs to be static text
    endElement = true;
      } else if (element instanceof LayoutForEach) {
    newParent = element;
      } else if (element instanceof LayoutIf) {
    newParent = element;
      } else if (element instanceof LayoutComponent) {
    nested = true;
    newParent = element;
      } else if (element instanceof LayoutComposition) {
    abortProcessing = ((LayoutComposition)element).isTrimming();
    newParent = element;
      } else if (element instanceof LayoutDefine) {
    newParent = element;
      } else if (element instanceof LayoutFacet) {
    newParent = element;
      } else if (element instanceof LayoutInsert) {
    newParent = element;
      }
//      FIXME: Jason, this code may need to be refactored.  I think almost
//      FIXME: everything should have newParent = element.  The problem comes when
//      FIXME: you are turning <html> and </html> into 2 separate staticText
//      FIXME: components.  This should be a single component, then it could contain
//      FIXME: children also.  You may want a to create a component like Woodstock's
//      FIXME: "markup" component to do this.
      break;
  default:
      // just because... :P
  }

  if (element != null) {
      parent.addChildLayoutElement(element);

      NodeList nodeList = node.getChildNodes();
      boolean abortChildProcessing = false;
      for (int i = 0; i < nodeList.getLength() && (abortChildProcessing != true); i++) {
    abortChildProcessing = process(newParent, nodeList.item(i), nested);
      }
      if (abortChildProcessing == true) {
    abortProcessing = abortChildProcessing;
      }else {

    if (endElement) {
        String nodeName = node.getNodeName();
        element = new LayoutStaticText(parent, LayoutElementUtil.getGeneratedId(nodeName, getNextIdNumber()), "</" + nodeName + ">");
        parent.addChildLayoutElement(element);
    }
      }
  }
View Full Code Here

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

    String value = node.getNodeValue();
    if (value == null) {
        value = "";
    }
//    FIXME: This needs to account for beginning and ending tags....
    lc = new LayoutStaticText(parent, id,
      "<" + nodeName + buildAttributeList(node) + ">");
      } else {
    lc = new LayoutComponent(parent, id, componentType);
    addAttributesToComponent(lc, node);
      }
View Full Code Here

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

     */
    public void staticText(ProcessingContextEnvironment env, String content) throws IOException {
  LayoutElement parent = env.getParent();

  // Create a LayoutStaticText
  LayoutComponent child = new LayoutStaticText(
      parent,
      LayoutElementUtil.getGeneratedId(
    "txt", env.getReader().getNextIdNumber()),
      content);
  child.addOption("value", content);
  child.setNested(env.isNested());

  parent.addChildLayoutElement(child);
    }
View Full Code Here

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

     *      information from when creating the
     *      {@link LayoutStaticText}.
     */
    private LayoutElement createLayoutStaticText(LayoutElement parent, Node node) {
  // Create new LayoutComponent
  LayoutStaticText text =
      new LayoutStaticText(parent, "", getTextNodesAsString(node));

  // Add all the attributes from the static text as options
//  component.addOptions(getAttributes(node));

  // Add escape... FIXME
View Full Code Here

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

    columnComp.getChildren().add((UIComponent) eventVal);
      } else {
    // Create the column (value) child
    // The child of each TableColumn will be a LayoutStaticText for now...
    compUtil.createChildComponent(ctx,
      new LayoutStaticText(columnDesc,
          columnDesc.getUnevaluatedId() + CHILD_SUFFIX, value),
      columnComp);
      }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.