netui-template:section Tag

<netui-template:section> Tag

The <netui-template:section> tag sets HTML content inside placeholders defined by <netui-template:includeSection> tags.

Syntax

<netui-template:section
    name="string_name"
    [visibility="boolean_expression_visiblity"]
    [visible="boolean_literal_visible"] />

Description

The <netui-template:section> tag sets HTML content inside placeholders defined by <netui-template:includeSection> tags.

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

nameThe 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.
 
RequiredSupports runtime expression evaluationData bindable
YesNoNo

visibilityBoolean. Determines if the section is visible. This attribute is the same at the visible attribute, except that this attribute may take a data binding expression.
 
RequiredSupports runtime expression evaluationData bindable
NoNoRead Only

visibleBoolean. Determines if the section is visible.
 
RequiredSupports runtime expression evaluationData bindable
NoNoNo

Sample

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>

Code Sample

[BEA_HOME]/weblogic81/samples/workshop/SamplesApp/WebApp/tagSamples/netui_template/template/template.jsp [BEA_HOME]/weblogic81/samples/workshop/SamplesApp/WebApp/tagSamples/netui_template/template/templateUsingJSP.jsp

Related Topics

<netui-template:...> Tags Sample

<netui-template:attribute> Tag

<netui-template:includeSection> Tag

<netui-template:setAttribute> Tag

<netui-template:template> Tag

<netui-template:visible> Tag