Examples of TagInstance


Examples of com.caucho.jsp.TagInstance

    if (parent == null)
      return _gen.getRootTag();
    else if (parent instanceof CustomSimpleTag ||
             parent instanceof TagFileTag) {
      if (_tag == null)
        _tag = new TagInstance(_gen.getTagManager());

      return _tag;
    }
    else
      return parent.getTag();
View Full Code Here

Examples of com.caucho.jsp.TagInstance

      return;
    }
   
    super.generatePrologue(out);

    TagInstance parentTag = getParent().getTag();
    boolean isSimple = false;

    if (parentTag == null || parentTag.isTop()) {
    }
    else if (! getTag().isTop()) {
    }
    else if (parentTag.isSimpleTag()) {
      getTag().setId(TagInstance.FRAGMENT_WITH_SIMPLE_PARENT);
    }
    else
      getTag().setId(TagInstance.FRAGMENT_WITH_TAG_PARENT);
  }
View Full Code Here

Examples of com.caucho.jsp.TagInstance

   * @param out the output stream
   */
  private void generateTagInit(JspJavaWriter out)
    throws Exception
  {
    TagInstance parent = _tag.getParent();

    String var = _tag.getId();
    String className = _tag.getTagClass().getName();
   
    if (_tag.getAnalyzedTag().getHasInjection()) {
View Full Code Here

Examples of com.caucho.jsp.TagInstance

      return ((JspExpression) node).generateValue();
    }

    _gen.addFragment(this);
   
    TagInstance parent = getParent().getTag();

    CharBuffer cb = new CharBuffer();

    // cb.append("_CauchoFragment.");
    cb.append(_fragmentName + "(pageContext, ");

    for (;
         parent != null && parent.isTagFileTag();
         parent = parent.getParent()) {
    }

    if (parent == null || parent.getId() == TagInstance.TOP_TAG)
      cb.append("null");
    else if (parent.getId().startsWith("top_"))
      cb.append("_jsp_parent_tag");
    else if (! hasCustomTag())
      cb.append(parent.getId());
    else if (parent.isSimpleTag())
      cb.append(parent.getId() + "_adapter");
    else
      cb.append(parent.getId());

    if (_gen instanceof JavaTagGenerator) {
      JavaTagGenerator tagGen = (JavaTagGenerator) _gen;

      if (tagGen.isStaticDoTag())
View Full Code Here

Examples of com.caucho.jsp.TagInstance

   * Generates the prologue for the c:forEach tag.
   */
  public void generatePrologue(JspJavaWriter out)
    throws Exception
  {
    TagInstance parent = getParent().getTag();

    _tag = parent.findTag(getQName(), _attributeNames, false);

    if (_tag != null) {
      _tagVar = _tag.getId();
    }
    else {
      _isDeclaration = true;

      TagInfo tagInfo = _gen.getTag(getQName());

      _tag = parent.addTag(_gen, getQName(), tagInfo, null,
                           _attributeNames, _attributeValues, false);

      String id = "_jsp_loop_" + _gen.uniqueId();

      _tag.setId(id);
View Full Code Here

Examples of com.caucho.jsp.TagInstance

      if (isFragment)
        frag.generateFragmentPrologue(out);
    }
     
    TagInstance parent = getParent().getTag();

    boolean isBodyTag = BodyTag.class.isAssignableFrom(_tagClass);
    boolean isEmpty = isEmpty();
    boolean hasBodyContent = isBodyTag && ! isEmpty;

    _tag = parent.findTag(getQName(), _attributeNames,
                          hasBodyContent);

    if (_tag == null || ! _parseState.isRecycleTags()) {
      _tag = parent.addTag(_gen, getQName(), _tagInfo, _tagClass,
                           _attributeNames, _attributeValues,
                           hasBodyContent);

      if (! JspTagFileSupport.class.isAssignableFrom(_tagClass)) {
        out.printClass(_tagClass);
View Full Code Here

Examples of com.caucho.jsp.TagInstance

   * Returns the root tag instance of the root.
   */
  public TagInstance getTag()
  {
    if (_tag == null)
      _tag = new TagInstance(_gen.getTagManager());

    return _tag;
  }
View Full Code Here

Examples of com.caucho.jsp.TagInstance

    if (! isJspFragment()) {
      generatePrologueChildren(out);
      return;
    }
   
    TagInstance parentTag = getParent().getTag();

    if (parentTag == null || parentTag.getId() == null) {
    }
    else if (parentTag.isSimpleTag())
      getTag().setId(TagInstance.FRAGMENT_WITH_SIMPLE_PARENT);
    else
      getTag().setId(TagInstance.FRAGMENT_WITH_TAG_PARENT);

    super.generatePrologue(out);
View Full Code Here

Examples of com.caucho.jsp.TagInstance

  {
    _elContext = new JspGenELContext(this);

    _tagManager = tagManager;

    _topTag = new TagInstance(tagManager);
  }
View Full Code Here

Examples of com.caucho.jsp.TagInstance

    if (_topTag == null || ! _topTag.hasChildren())
      return;

    Iterator<TagInstance> iter = _topTag.iterator();
    while (iter.hasNext()) {
      TagInstance tag = iter.next();

      if (tag != null)
      generateTagInjectDecl(out, tag);
    }

    out.println();
    out.println("static {");
    out.pushDepth();
    out.println("try {");
    out.pushDepth();

    iter = _topTag.iterator();
    while (iter.hasNext()) {
      TagInstance tag = iter.next();

      if (tag != null)
        generateTagInject(out, tag);
    }
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.