Java Code Examples for javax.servlet.jsp.tagext.Tag#EVAL_BODY_INCLUDE

The following examples show how to use javax.servlet.jsp.tagext.Tag#EVAL_BODY_INCLUDE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ColumnTag.java    From uyuni with GNU General Public License v2.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
public int doEndTag() throws JspException {
    JspWriter out = null;
    try {
        out = pageContext.getOut();

        if (!showHeader()) {
            if (showUrl()) {
                out.print(href.renderCloseTag());
            }
            out.print(td.renderCloseTag());
        }

        return Tag.EVAL_BODY_INCLUDE;
    }
    catch (IOException ioe) {
        throw new JspException("IO error writing to JSP file:", ioe);
    }
}
 
Example 2
Source File: ColumnTag.java    From spacewalk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
public int doEndTag() throws JspException {
    JspWriter out = null;
    try {
        out = pageContext.getOut();

        if (!showHeader()) {
            if (showUrl()) {
                out.print(href.renderCloseTag());
            }
            out.print(td.renderCloseTag());
        }

        return Tag.EVAL_BODY_INCLUDE;
    }
    catch (IOException ioe) {
        throw new JspException("IO error writing to JSP file:", ioe);
    }
}
 
Example 3
Source File: TableExtenderTag.java    From packagedrone with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public int doStartTag () throws JspException
{
    final TableExtensionManagerRequest mgr = (TableExtensionManagerRequest)this.pageContext.getRequest ().getAttribute ( TableExtensionManagerRequest.PROPERTY_NAME );
    this.extension = mgr.createExtensions ( getId (), getTagSet (), this.context );

    return Tag.EVAL_BODY_INCLUDE;
}
 
Example 4
Source File: TableRowTag.java    From packagedrone with Eclipse Public License 1.0 5 votes vote down vote up
private int pollNext ()
{
    if ( this.providers == null || this.providers.isEmpty () )
    {
        return Tag.SKIP_BODY;
    }

    this.currentProvider = this.providers.pollFirst ();

    return Tag.EVAL_BODY_INCLUDE;
}
 
Example 5
Source File: TableColumnsTag.java    From packagedrone with Eclipse Public License 1.0 5 votes vote down vote up
private int pollNext ()
{
    if ( !this.columns.isEmpty () )
    {
        this.pageContext.setAttribute ( this.var, this.columns.pollFirst () );
        return Tag.EVAL_BODY_INCLUDE;
    }
    else
    {
        return Tag.SKIP_BODY;
    }
}
 
Example 6
Source File: PermissionTag.java    From lemon with Apache License 2.0 5 votes vote down vote up
public int doStartTag() throws JspException {
    boolean authorized = getPermissionChecker().isAuthorized(permission);

    if (!authorized) {
        return Tag.SKIP_BODY;
    }

    return Tag.EVAL_BODY_INCLUDE;
}
 
Example 7
Source File: IfEnabledTag.java    From logging-log4j2 with Apache License 2.0 5 votes vote down vote up
@Override
public int doStartTag() throws JspException {
    final Level level = TagUtils.resolveLevel(this.level);
    if (level == null) {
        throw new JspException("Level must be of type String or org.apache.logging.log4j.Level.");
    }

    return TagUtils.isEnabled(this.getLogger(), level, this.marker) ? Tag.EVAL_BODY_INCLUDE : Tag.SKIP_BODY;
}