# com.bea.wlw.netui.tags.template
Section Class

public class Section
extends `AbstractBaseTag`
implements `TemplateConstants`

Used within a content page to provide content for a placeholder section defined within a template. The body content of the tag is passed to the `IncludeSection` tag in the template providing the content for that section. If the `name` attribute matches a `name` attribute on a `IncludeSection` tag in the template, the body content of this tag will be rendered.

Attribute Descriptions
Attribute | Required | Runtime Expression Evaluation | Data Bindable
--- | --- | --- | ---
name | Yes | No | No
The name of the `IncludeSection` tag in the template that the tags provides content for.
visible | No | No | No
A boolean property indicating if the content is visible or not.
visibility | No | No | Read Only
Sets the visible property through an expression.

Related Topics

<netui-template:...> Tags Sample
``Attribute``
``IncludeSection``
``SetAttribute``
``Template``
``Visible``

Hierarchy
  `Object`
  `TagSupport`
  `BodyTagSupport`
  `AbstractBaseTag`
  `Section`

All Implemented Interfaces
  `BodyTag`, `IterationTag`, `Serializable`, `Tag`, `TemplateConstants`

## Field Summary

Fields from com.bea.wlw.netui.tags`.`AbstractBaseTag``
``ATTR_GENERAL`, `ATTR_GENERAL_EXPRESSION`, `ATTR_JAVASCRIPT`, `ATTR_STYLE`, `CLASS`, `ID`, `JAVASCRIPT_STATUS`, `NAME`, `NETUI_UNIQUE_CNT`, `ONCLICK`, `ONDBLCLICK`, `ONKEYDOWN`, `ONKEYPRESS`, `ONKEYUP`, `ONMOUSEDOWN`, `ONMOUSEMOVE`, `ONMOUSEOUT`, `ONMOUSEOVER`, `ONMOUSEUP`, `STYLE`, `TABINDEX``

Fields from javax.servlet.jsp.tagext`.`BodyTagSupport``
`bodyContent`

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

Fields from interface javax.servlet.jsp.tagext`.`BodyTag``
`EVAL_BODY_BUFFERED, EVAL_BODY_TAG`

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

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

Fields from interface com.bea.wlw.netui.tags.template`.`TemplateConstants``
``TEMPLATE_ATTRIBUTES`, `TEMPLATE_SECTIONS``

## Constructor Summary

Section()

## Method Summary

`public int` | `doEndTag`() Stores the buffered body content into the `TEMPLATE_SECTIONS HashMap`.
`public int` | `doStartTag`() Causes the content of the section to be rendered into a buffer.
`public `String`` | `getName`() Get the name of the `IncludeSection`.
`public `String`` | `getTagName`() Returns the name of the Tag.
`public `String`` | `getVisibility`() Returns the expression used to set the visibility state.
`public boolean` | `isVisible`() Returns the visible state of the tag.
`protected void` | `localRelease`() Resets all of the fields of the tag.
`public void` | `setName`(`String` name) Sets the name of the placeholder section defined in the template that this tag is providing content for.
`public void` | `setVisibility`(`String` expr) Sets the visible state of the tag through an expression.
`public void` | `setVisible`(boolean visible) Sets the visible state of the tag.

Methods from `com.bea.wlw.netui.tags.`AbstractBaseTag``
``addTagIdMapping`, `evaluateAttributeToString`, `filter`, `filter`, `getJavaScriptUtils`, `getNearestForm`, `getScriptReporter`, `getUserLocale`, `registerTagError`, `release`, `renderAttribute`, `rewriteName`, `write``

Methods from `javax.servlet.jsp.tagext.`BodyTagSupport``
`doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent`

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

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

Methods from interface `javax.servlet.jsp.tagext.`BodyTag``
`doInitBody, setBodyContent`

Methods from interface `javax.servlet.jsp.tagext.`IterationTag``
`doAfterBody`

Methods from interface `javax.servlet.jsp.tagext.`Tag``
`doEndTag, doStartTag, getParent, release, setPageContext, setParent`

## Constructor Detail

### Section

    public Section()

## Method Detail

### doEndTag() Method

    public int doEndTag()
         throws JspException

Stores the buffered body content into the `TEMPLATE_SECTIONS HashMap`. The buffered body is accessed by the template page to obtain the content for `IncludeSection` tags.

Overrides
  `BodyTagSupport.doEndTag()`

#### Returns

EVAL_PAGE to continue evaluating the page.

#### Exceptions

``JspException``
  on error.

### doStartTag() Method

    public int doStartTag()
         throws JspException

Causes the content of the section to be rendered into a buffer.

Overrides
  `BodyTagSupport.doStartTag()`

#### Returns

SKIP_BODY if the visible state is `false`, otherwise EVAL_BODY_BUFFERED to cause the body content to be buffered.

#### Exceptions

``JspException``
  if there are errors.

### getName() Method

    public String getName()

Get the name of the `IncludeSection`.

#### Returns

the `IncludeSection` name.

### getTagName() Method

    public String getTagName()

Returns the name of the Tag. This is used to identify the type of tag reporting errors.

Overrides
  `AbstractBaseTag.getTagName()`

#### Returns

a constant string representing the name of the tag.

### getVisibility() Method

    public String getVisibility()

Returns the expression used to set the visibility state.

#### Returns

a String expression

### isVisible() Method

    public boolean isVisible()

Returns the visible state of the tag.

#### Returns

`true` if the section is visible, `false` otherwise.

### localRelease() Method

    protected void localRelease()

Resets all of the fields of the tag.

Overrides
  `AbstractBaseTag.localRelease()`

### setName(String) Method

    public void setName(String name)

Sets the name of the placeholder section defined in the template that this tag is providing content for. This name is matched against the `IncludeSection` name. If the names match, the content of this tag will be rendered within the template's section.

#### Parameters

name
  The name of an `IncludeSection`the this tag is providing content for.``

### setVisibility(String) Method

    public void setVisibility(String expr)

Sets the visible state of the tag through an expression.

#### Parameters

expr
  an expression will be checked to see if the section is visible or not.

### setVisible(boolean) Method

    public void setVisible(boolean visible)

Sets the visible state of the tag.

#### Parameters

visible
  `Boolean` value representing the visible state.