Package javax.servlet.jsp.tagext

Examples of javax.servlet.jsp.tagext.BodyContent


    }

    @Override
    public int doAfterBody() throws JspException
    {
        BodyContent bodyContent = getBodyContent();
        if (bodyContent != null)
        {
            UIOutput component = (UIOutput)getComponentInstance();
            component.setValue(bodyContent.getString());
            bodyContent.clearBody();
        }
        return super.getDoAfterBodyValue();
    }
View Full Code Here


    /**
     * TODO: Ignore <!-- --> comments
     */
    private boolean isBodyContentEmpty()
    {
        BodyContent bodyContent = getBodyContent();
        if (bodyContent == null)
        {
            return true;
        }
        try
        {
            Reader reader = bodyContent.getReader();
            int c;
            while ((c = reader.read()) != -1)
            {
                if (!Character.isWhitespace((char)c))
                {
View Full Code Here

    LinkTag myparent = (LinkTag)javax.servlet.jsp.tagext.TagSupport.findAncestorWithClass(this, LinkTag.class);

    if (myparent == null)
        throw new JspException("linkparam tag not nested within link tag");
        else {
            BodyContent bodyContent = getBodyContent();
            if (bodyContent != null && !bodyContent.getString().equals("")) {
                setValue(bodyContent.getString());
            }
            else if (getValue() == null) setValue("null");
//                throw new JspException("Unable to assign a value to the parameter: '" + getId() + "'");
        myparent.addRequestParameter(getId(), getValue());
    }
View Full Code Here

        _rendered = rendered;
    }
   
    public int doAfterBody() throws JspException
    {
        BodyContent bodyContent = getBodyContent();
        if (bodyContent != null)
        {
            UIOutput component = (UIOutput)getComponentInstance();
            component.setValue(bodyContent.getString());
            bodyContent.clearBody();
        }
        return super.getDoAfterBodyValue();
    }
View Full Code Here

        int status = this.tag.doStartTag();
        if (this.tag instanceof IterationTag)
        {
            if (status != Tag.SKIP_BODY)
            {
                BodyContent body = null;
                try
                {
                    IterationTag iterationTag = (IterationTag) this.tag;
                    if ((status == BodyTag.EVAL_BODY_BUFFERED)
                        && (this.tag instanceof BodyTag))
                    {
                        BodyTag bodyTag = (BodyTag) this.tag;
                        body = pageContext.pushBody();
                        if (log.isDebugEnabled())
                        {
                            log.debug("Pushed body content ["
                                + body.getString() + "]");
                        }
                        bodyTag.setBodyContent(body);
                        bodyTag.doInitBody();
                    }
                    int iteration = 0;
                    do
                    {
                        fireEvalBody(iteration, body);
                        if (log.isDebugEnabled())
                        {
                            log.debug("Body evaluated for the ["
                                + iteration + "] time");
                        }
                        status = iterationTag.doAfterBody();
                        iteration++;
                    } while (status == IterationTag.EVAL_BODY_AGAIN);
                    if (log.isDebugEnabled())
                    {
                        log.debug("Body skipped");
                    }
                    fireSkipBody();
                }
                finally
                {
                    if (body != null)
                    {
                        if (log.isDebugEnabled())
                        {
                            log.debug("Popping body content ["
                                + body.getString() + "]");
                        }
                        pageContext.popBody();
                        body = null;
                    }
                }
View Full Code Here

  public int doAfterBody()
  {
    try
    {
      BodyContent body = getBodyContent();
      JspWriter out = body.getEnclosingWriter();
      out.println(body.getString());
      body.clearBody();// Set up for next iteration
    }
    catch (IOException ioe)
    {
      Logger.getLogger("IterateTag").error("Error in iterate tag with index " + this.getIterateResultSet().getIndex() + " on result set " + this.getResultSet(), ioe);
    }
View Full Code Here

  public int doAfterBody()
  {
    try
    {
      BodyContent body = getBodyContent();
      JspWriter out = body.getEnclosingWriter();
      out.println(body.getString());
      body.clearBody();// Set up for next iteration
    }
    catch (IOException ioe)
    {
      Logger.getLogger("IterateTag").error("Error in iterate tag with index " + this.getIterateResultSet().getIndex() + " on result set " + this.getResultSet(), ioe);
    }
View Full Code Here

        _rendered = rendered;
    }
   
    public int doAfterBody() throws JspException
    {
        BodyContent bodyContent = getBodyContent();
        if (bodyContent != null)
        {
            UIOutput component = (UIOutput)getComponentInstance();
            component.setValue(bodyContent.getString());
            bodyContent.clearBody();
        }
        return super.getDoAfterBodyValue();
    }
View Full Code Here

        if( t != null )
        {
            String val = m_value;
            if( val == null )
            {
                BodyContent bc = getBodyContent();
                if( bc != null )
                {
                    val = bc.getString();
                }
            }
            if( val != null )
            {
                ((ParamHandler)t).setContainedParameter( m_name, val );
View Full Code Here

    public int doAfterBody()
        throws JspException
    {
        try
        {
            BodyContent bc = getBodyContent();
           
            getPreviousOut().write( executePlugin( m_plugin, m_args, (bc != null) ? bc.getString() : null) );
        }
        catch( Exception e )
        {
            log.error( "Failed to insert plugin", e );
            throw new JspException( "Tag failed, check logs: "+e.getMessage() );
View Full Code Here

TOP

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

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.