NetUI Tag Library Documentation (Version 1.0.1)

netui-template
netui-template:section Tag

Sets HTML content inside placeholders defined by a <netui-template:includeSection> tag.

Syntax

<netui-template:section
    name="string_name"
    [visible="boolean_literal_visible"] >
    ... JSP content ...
</netui-template:section>

Description

Sets HTML content inside placeholders defined by a <netui-template:includeSection> tag.

The <netui-template:section> tag must have a parent <netui-template:template> tag.

The <netui-template:section> tag appears in content pages, which adopt a template page, set properties on the template's placeholders (using this <netui-template:section> tag), and render the completed HTML in the browser.

For content to be placed in the placeholder, the <netui-template:section> and <netui-template:includeSection> tags must have matching name attributes.

For example, assume a template page defines the following content placeholder.

In the template JSP page...

      <table>
          <tr>
              <td colspan="3">
                  <netui-template:includeSection name="tableHeader"/>
              </td>
          </tr>

Then a content page can set HTML content in the placeholder using the <netui-template:section> tag.

In a content JSP page...

    <netui-template:section name="tableHeader">
        <h1>HEADER TEXT</h1>
    </netui-template:section>

The HTML rendered in the browser will appear as follows.

      <table>
          <tr>
              <td colspan="3">
                  <h1>HEADER TEXT</h1>
              </td>
          </tr>

Attributes
name
Required: Yes  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The name of the content to fill the placeholder. This name is matched against the <netui-template:includeSection> name. If the names match, the content of this tag will be rendered within the template's placeholder.
visible
Required: No  |   Type: boolean  |   Supports runtime evaluation / JSP Expression Language: Yes

Boolean. Determines if the section is visible.

Example

Assume a <netui-template:includeSection> tag defines a content placeholder inside a table row

    <tr>
        <netui-template:includeSection name="rowPlaceholder"/>
    </tr>

A content page can set content into the placeholder using the <netui-template:section> tag as follows.

  <netui-template:section name="rowPlaceHolder">
      <td><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, 
      sed diam nonummy nibh euismod tincidunt ut laoreet dolore 
      magna aliquam erat volutpat. Ut wisi enim ad minim veniam, 
      quis nostrud exerci tation ullamcorper suscipit lobortis nisl 
      ut aliquip ex ea commodo consequat.</p></td>
  </netui-template:section>
The HTML rendered in the browser will appear as follows.
    <tr>
      <td><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, 
      sed diam nonummy nibh euismod tincidunt ut laoreet dolore 
      magna aliquam erat volutpat. Ut wisi enim ad minim veniam, 
      quis nostrud exerci tation ullamcorper suscipit lobortis nisl 
      ut aliquip ex ea commodo consequat.</p></td>
    </tr>


Tag Information
Tag Classorg.apache.beehive.netui.tags.template.Section
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone