## org.apache.taglibs.standard.tag.common.core
Class ChooseTag

    java.lang.Object
      javax.servlet.jsp.tagext.TagSupport
          org.apache.taglibs.standard.tag.common.core.ChooseTag

All Implemented Interfaces:
  Serializable, IterationTag, JspTag, Tag

    public class ChooseTag

extends TagSupport

Tag handler for <choose> in JSTL.

<choose> is a very simple tag that acts primarily as a container; it always includes its body and allows exactly one of its child <when> tags to run. Since this tag handler doesn't have any attributes, it is common.core to both the rtexprvalue and expression- evaluating versions of the JSTL library.

Author:
  Shawn Bayern
See Also:
  Serialized Form

Field Summary

Fields inherited from class javax.servlet.jsp.tagext.TagSupport
`id, pageContext`

Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
`EVAL_BODY_AGAIN`

Fields inherited from interface javax.servlet.jsp.tagext.Tag
`EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE`

Constructor Summary
`ChooseTag()`

Method Summary
`int` `doStartTag()` Default processing of the start tag, returning SKIP_BODY.
`boolean` `gainPermission()` Returns status indicating whether a subtag should run or not.
`void` `release()` Release state.
`void` `subtagSucceeded()` Called by a subtag to indicate that it plans to evaluate its body.

Methods inherited from class javax.servlet.jsp.tagext.TagSupport
`doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ChooseTag

    public ChooseTag()

Method Detail

### release

    public void release()

  Description copied from class: `TagSupport`
  Release state.

  Specified by:
    `release` in interface `Tag`
  Overrides:
    `release` in class `TagSupport`
  See Also:
    `Tag.release()`

### gainPermission

    public boolean gainPermission()

  Returns status indicating whether a subtag should run or not.

  Returns:
    `true` if the subtag should evaluate its condition and decide whether to run, `false` otherwise.

### subtagSucceeded

    public void subtagSucceeded()

  Called by a subtag to indicate that it plans to evaluate its body.

### doStartTag

    public int doStartTag()
                   throws JspException

  Description copied from class: `TagSupport`
  Default processing of the start tag, returning SKIP_BODY.

  Specified by:
    `doStartTag` in interface `Tag`
  Overrides:
    `doStartTag` in class `TagSupport`
  Returns:
    SKIP_BODY
  Throws:
    `JspException` - if an error occurs while processing this tag
  See Also:
    `Tag.doStartTag()`

Copyright © 2007 Mort Bay Consulting. All Rights Reserved.