Package javax.servlet.jsp.tagext

Examples of javax.servlet.jsp.tagext.Tag


    evaluateExpressions();
    return super.doStartTag();
  }

  public int doEndTag() throws JspException {
    Tag t = findAncestorWithClass(this, SelectObjectsTag.class);
    if (t == null)
      throw new JspTagException("Le tag param doit etre dans un tag selectObjects");

    if (_name == null && _name.equals(""))
      return EVAL_PAGE;
View Full Code Here


    _var = var;
  }

  public int doStartTag() throws JspException {

    Tag t = findAncestorWithClass(this, SelectObjectsTag.class);
    if (t == null)
      throw new JspTagException("Le tag iterateOver doit etre dans un tag selectObjects");

    _collection = ((SelectObjectsTag) t).getCollection();
View Full Code Here

   */
  protected final AbstractTag findAncestor(Class type) {
    if (type == null) {
      return null;
    }
    Tag tag = parent;
    while (tag != null) {
      if (tag instanceof AbstractTag) {
        if (type.isAssignableFrom(tag.getClass())) {
          return (AbstractTag)tag;
        }
      }
      tag = tag.getParent();
    }
    return null;
  }
View Full Code Here

    }
   
    public Writer getWriter(Writer out, Map args) throws TemplateModelException
    {
        try {
            Tag tag = (Tag)getTagInstance();
            FreeMarkerPageContext pageContext = PageContextFactory.getCurrentPageContext();
            Tag parentTag = (Tag)pageContext.peekTopTag(Tag.class);
            tag.setParent(parentTag);
            tag.setPageContext(pageContext);
            setupTag(tag, args, pageContext.getObjectWrapper());
            // If the parent of this writer is not a JspWriter itself, use
            // a little Writer-to-JspWriter adapter...
View Full Code Here

      result = new java.sql.Timestamp(time);
    else
      throw new JspException(L.l("sql:dateParam type='{0}' is an unknown type",
                                 _type));

    Tag parent = getParent();
    for (;
         parent != null && ! (parent instanceof SQLExecutionTag);
         parent = parent.getParent()) {
    }

    if (parent == null)
      throw new JspException(L.l("sql:dateParam requires sql:query parent."));
View Full Code Here

      return SKIP_BODY;
   
    if (_value == null)
      return EVAL_BODY_BUFFERED;
   
    Tag parent = getParent();
    for (; parent != null; parent = parent.getParent()) {
      if (parent instanceof NameValueTag) {
        NameValueTag tag = (NameValueTag) parent;

        if (_value == null)
          tag.addParam(_name, "");
View Full Code Here

    PageContextImpl pageContext = (PageContextImpl) this.pageContext;
   
    Object value = _value;

    Tag parent = getParent();
    for (;
         parent != null && ! (parent instanceof SQLExecutionTag);
         parent = parent.getParent()) {
    }

    if (parent == null)
      throw new JspException(L.l("sql:param requires sql:query parent."));
View Full Code Here

    if (bodyContent != null)
      value = bodyContent.getString().trim();
    else
      value = "";

    Tag parent = getParent();
    for (;
         parent != null && ! (parent instanceof SQLExecutionTag);
         parent = parent.getParent()) {
    }

    if (parent == null)
      throw new JspException(L.l("sql:param requires sql:query parent."));
View Full Code Here

   * Process the tag.
   */
  public int doStartTag()
    throws JspException
  {
    Tag parent = getParent();

    if (! (parent instanceof ChooseTag))
      throw new JspException(L.l("c:when tag must be contained in a c:choose tag."));

    ChooseTag chooseTag = (ChooseTag) parent;
View Full Code Here

        result = new java.sql.Date(time);
      else
        result = new java.sql.Timestamp(time);
    }

    Tag parent = getParent();
    for (;
         parent != null && ! (parent instanceof SQLExecutionTag);
         parent = parent.getParent()) {
    }

    if (parent == null)
      throw new JspException(L.l("sql:dateParam requires sql:query parent."));
View Full Code Here

TOP

Related Classes of javax.servlet.jsp.tagext.Tag

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.