Java Code Examples for javax.servlet.jsp.tagext.BodyTagSupport#EVAL_PAGE

The following examples show how to use javax.servlet.jsp.tagext.BodyTagSupport#EVAL_PAGE . 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 {
    if (sortable && attributeName == null && sortAttribute == null) {
        throw new JspException("Sortable columns must use either attr or sortAttr");
    }
    checkForBoundsAndAttrs();
    ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
    if (command.equals(ListCommand.RENDER)) {
        ListTagUtil.write(pageContext, "</td>");
    }
    else if (command.equals(ListCommand.ENUMERATE) &&
                        !StringUtils.isBlank(filterAttr)) {
        setupColumnFilter();
    }

    return BodyTagSupport.EVAL_PAGE;
}
 
Example 2
Source File: SelectableColumnTag.java    From uyuni with GNU General Public License v2.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public int doStartTag() throws JspException {

    ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
    ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
            ListTag.class);
    listName = parent.getUniqueName();
    int retval = BodyTagSupport.SKIP_BODY;
    setupRhnSet();
    if (command.equals(ListCommand.ENUMERATE)) {
        parent.addColumn();
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.COL_HEADER)) {
        renderHeader(parent);
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.RENDER)) {
        renderCheckbox();
    }
    return retval;
}
 
Example 3
Source File: ListTag.java    From uyuni with GNU General Public License v2.0 6 votes vote down vote up
/**
 * ${@inheritDoc}
 */
@Override
public int doEndTag() throws JspException {
    // print the hidden fields after the list widget is printed
    // but before the form of the listset is closed.
    ListTagUtil.write(pageContext, String.format(HIDDEN_TEXT,
            ListTagUtil.makeParentIsAnElementLabel(getUniqueName()),
            parentIsElement));

    // here decorators should insert other e.g hidden input fields
    for (ListDecorator dec : getDecorators()) {
        dec.afterList();
    }

    ListTagUtil.write(pageContext, "<!-- END " + getUniqueName() + " -->");
    release();
    return BodyTagSupport.EVAL_PAGE;
}
 
Example 4
Source File: RadioColumnTag.java    From uyuni with GNU General Public License v2.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public int doStartTag() throws JspException {

    ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
    ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
            ListTag.class);
    listName = parent.getUniqueName();
    int retval = BodyTagSupport.SKIP_BODY;

    if (command.equals(ListCommand.ENUMERATE)) {
        parent.addColumn();
        renderHiddenField();
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.COL_HEADER)) {
        renderHeader(parent);
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.RENDER)) {
        render(valueExpr);
    }
    return retval;
}
 
Example 5
Source File: RadioColumnTag.java    From spacewalk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public int doStartTag() throws JspException {

    ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
    ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
            ListTag.class);
    listName = parent.getUniqueName();
    int retval = BodyTagSupport.SKIP_BODY;

    if (command.equals(ListCommand.ENUMERATE)) {
        parent.addColumn();
        renderHiddenField();
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.COL_HEADER)) {
        renderHeader(parent);
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.RENDER)) {
        render(valueExpr);
    }
    return retval;
}
 
Example 6
Source File: ListTag.java    From spacewalk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * ${@inheritDoc}
 */
@Override
public int doEndTag() throws JspException {
    // print the hidden fields after the list widget is printed
    // but before the form of the listset is closed.
    ListTagUtil.write(pageContext, String.format(HIDDEN_TEXT,
            ListTagUtil.makeParentIsAnElementLabel(getUniqueName()),
            parentIsElement));

    // here decorators should insert other e.g hidden input fields
    for (ListDecorator dec : getDecorators()) {
        dec.afterList();
    }

    ListTagUtil.write(pageContext, "<!-- END " + getUniqueName() + " -->");
    release();
    return BodyTagSupport.EVAL_PAGE;
}
 
Example 7
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 {
    if (sortable && attributeName == null && sortAttribute == null) {
        throw new JspException("Sortable columns must use either attr or sortAttr");
    }
    checkForBoundsAndAttrs();
    ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
    if (command.equals(ListCommand.RENDER)) {
        ListTagUtil.write(pageContext, "</td>");
    }
    else if (command.equals(ListCommand.ENUMERATE) &&
                        !StringUtils.isBlank(filterAttr)) {
        setupColumnFilter();
    }

    return BodyTagSupport.EVAL_PAGE;
}
 
Example 8
Source File: SelectableColumnTag.java    From spacewalk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public int doStartTag() throws JspException {

    ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
    ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
            ListTag.class);
    listName = parent.getUniqueName();
    int retval = BodyTagSupport.SKIP_BODY;
    setupRhnSet();
    if (command.equals(ListCommand.ENUMERATE)) {
        parent.addColumn();
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.COL_HEADER)) {
        renderHeader(parent);
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.RENDER)) {
        renderCheckbox();
    }
    return retval;
}
 
Example 9
Source File: CSVTag.java    From spacewalk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * ${@inheritDoc}
 */
@Override
public int doEndTag() throws JspException {
    setupPageData();
    if ((null != exportColumns) && (null != pageData)) {
        renderExport();
    }
    release();
    return BodyTagSupport.EVAL_PAGE;
}
 
Example 10
Source File: ColumnTag.java    From uyuni with GNU General Public License v2.0 5 votes vote down vote up
/**
 * ${@inheritDoc}
 */
public int doStartTag() throws JspException {
    ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
    ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
            ListTag.class);
    int retval = BodyTagSupport.SKIP_BODY;

    if (command.equals(ListCommand.ENUMERATE)) {
        parent.addColumn();
        retval = BodyTagSupport.EVAL_PAGE;
        if (isSortable()) {
            parent.setSortable(true);
        }
    }
    else if (command.equals(ListCommand.COL_HEADER)) {
        renderHeader();
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.RENDER)) {
        if (isBound) {
            renderBound();
            retval = BodyTagSupport.SKIP_BODY;
        }
        else {
            renderUnbound();
            retval = BodyTagSupport.EVAL_BODY_INCLUDE;
        }
    }
    return retval;
}
 
Example 11
Source File: RadioColumnTag.java    From spacewalk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public int doEndTag() throws JspException {
    ListCommand command = ListTagUtil.
                                        getCurrentCommand(this, pageContext);
    if (command.equals(ListCommand.RENDER)) {
        ListTagUtil.write(pageContext, "</td>");
    }
    release();
    return BodyTagSupport.EVAL_PAGE;
}
 
Example 12
Source File: SelectableColumnTag.java    From spacewalk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public int doEndTag() throws JspException {
    ListCommand command = ListTagUtil.
                                        getCurrentCommand(this, pageContext);
    if (command.equals(ListCommand.RENDER)) {
        ListTagUtil.write(pageContext, "</td>");
    }
    release();
    return BodyTagSupport.EVAL_PAGE;
}
 
Example 13
Source File: ColumnTag.java    From spacewalk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * ${@inheritDoc}
 */
public int doStartTag() throws JspException {
    ListCommand command = ListTagUtil.getCurrentCommand(this, pageContext);
    ListTag parent = (ListTag) BodyTagSupport.findAncestorWithClass(this,
            ListTag.class);
    int retval = BodyTagSupport.SKIP_BODY;
    currentSortDir = fetchSortDir();

    if (command.equals(ListCommand.ENUMERATE)) {
        parent.addColumn();
        retval = BodyTagSupport.EVAL_PAGE;
        if (isSortable()) {
            parent.setSortable(true);
        }
    }
    else if (command.equals(ListCommand.COL_HEADER)) {
        renderHeader();
        retval = BodyTagSupport.EVAL_PAGE;
    }
    else if (command.equals(ListCommand.RENDER)) {
        if (isBound) {
            renderBound();
            retval = BodyTagSupport.SKIP_BODY;
        }
        else {
            renderUnbound();
            retval = BodyTagSupport.EVAL_BODY_INCLUDE;
        }
    }
    return retval;
}
 
Example 14
Source File: CSVTag.java    From uyuni with GNU General Public License v2.0 5 votes vote down vote up
/**
 * ${@inheritDoc}
 */
@Override
public int doEndTag() throws JspException {
    setupPageData();
    if ((null != exportColumns) && (null != pageData)) {
        renderExport();
    }
    release();
    return BodyTagSupport.EVAL_PAGE;
}
 
Example 15
Source File: RadioColumnTag.java    From uyuni with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public int doEndTag() throws JspException {
    ListCommand command = ListTagUtil.
                                        getCurrentCommand(this, pageContext);
    if (command.equals(ListCommand.RENDER)) {
        ListTagUtil.write(pageContext, "</td>");
    }
    release();
    return BodyTagSupport.EVAL_PAGE;
}
 
Example 16
Source File: SelectableColumnTag.java    From uyuni with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public int doEndTag() throws JspException {
    ListCommand command = ListTagUtil.
                                        getCurrentCommand(this, pageContext);
    if (command.equals(ListCommand.RENDER)) {
        ListTagUtil.write(pageContext, "</td>");
    }
    release();
    return BodyTagSupport.EVAL_PAGE;
}
 
Example 17
Source File: ListSetTag.java    From spacewalk with GNU General Public License v2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public int doEndTag() throws JspException {
    endForm();
    return BodyTagSupport.EVAL_PAGE;
}
 
Example 18
Source File: ListSetTag.java    From uyuni with GNU General Public License v2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public int doEndTag() throws JspException {
    endForm();
    return BodyTagSupport.EVAL_PAGE;
}