|
BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport javax.servlet.jsp.tagext.BodyTagSupport com.bea.wlw.netui.tags.AbstractBaseTag com.bea.wlw.netui.tags.template.Section
public class Section
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. |
Attribute
,
IncludeSection
,
SetAttribute
,
Template
,
Visible
,
Serialized Form<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>
IncludeSection
tags.
The <netui-template:section> tag must have a parent
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>
Field Summary |
---|
Fields inherited from class com.bea.wlw.netui.tags.AbstractBaseTag |
---|
ATTR_GENERAL, ATTR_GENERAL_EXPRESSION, ATTR_JAVASCRIPT, ATTR_STYLE, JAVASCRIPT_STATUS, NETUI_UNIQUE_CNT |
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
id, pageContext |
Fields inherited from interface com.bea.wlw.netui.tags.template.TemplateConstants |
---|
TEMPLATE_ATTRIBUTES, TEMPLATE_SECTIONS |
Fields inherited from interface com.bea.wlw.netui.tags.html.HtmlConstants |
---|
ACCEPT, ACCESSKEY, ACTION, ALIGN, ALINK, ALT, ANCHOR, BACKGROUND, BASE, BGCOLOR, BODY, BORDER, BR, CAPTION, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CLASS, COLS, COORDS, DIR, DISABLED, DIV, ENCTYPE, FOR, FORM, FORM_GET, FORM_POST, FRAME, HEIGHT, HREF, HREFLANG, HSPACE, HTML, ID, IMAGE, INPUT, INPUT_BUTTON, INPUT_CHECKBOX, INPUT_FILE, INPUT_HIDDEN, INPUT_IMAGE, INPUT_PASSWORD, INPUT_RADIO, INPUT_RESET, INPUT_SUBMIT, INPUT_TEXT, ISMAP, LABEL, LANG, LINK, LONGDESC, MAXLENGTH, METHOD, NAME, ONBLUR, ONCHANGE, ONCLICK, ONDBLCLICK, ONFOCUS, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONRESET, ONSELECT, ONSUBMIT, ONUNLOAD, OPTION, READONLY, REL, REV, ROWS, RULES, SELECT, SHAPE, SIZE, SPAN, SRC, STYLE, SUMMARY, TABINDEX, TABLE, TARGET, TD, TEXT, TEXTAREA, TITLE, TR, TYPE, USEMAP, VALIGN, VALUE, VLINK, VSPACE, WIDTH |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
---|
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
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 | |
---|---|
Section()
|
Method Summary | |
---|---|
int |
doEndTag()
Stores the buffered body content into the TEMPLATE_SECTIONS
HashMap . |
int |
doStartTag()
Causes the content of the section to be rendered into a buffer. |
String |
getName()
Get the name of the IncludeSection . |
String |
getTagName()
Returns the name of the Tag. |
String |
getVisibility()
Returns the expression used to set the visibility state. |
boolean |
isVisible()
Returns the visible state of the tag. |
protected void |
localRelease()
Resets all of the fields of the tag. |
void |
setName(String name)
Sets the name of the placeholder section defined in the template that this tag is providing content for. |
void |
setVisibility(String expr)
Sets the visible state of the tag through an expression. |
void |
setVisible(boolean visible)
Sets the visible state of the tag. |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
---|
getParent, setParent |
Constructor Detail |
---|
public Section()
Method Detail |
---|
public String getTagName()
getTagName
in class AbstractBaseTag
public void setName(String name)
IncludeSection
name. If the names match, the content of this tag will be
rendered within the template's section.
name
- The name of an IncludeSection the
this tag is providing content for.- Beadoc.attributedescription:
- 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.
- Beadoc.attributesyntaxvalue:
- string_name
- Beadoc.databindable:
- false
public String getName()
IncludeSection
.
IncludeSection
name.public boolean isVisible()
true
if the section is visible, false
otherwise.public void setVisible(boolean visible)
visible
- Boolean
value representing the visible state.public void setVisibility(String expr)
expr
- an expression will be checked to see if the
section is visible or not.visible
attribute, except that this attribute may take a data binding expression.public String getVisibility()
public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.BodyTagSupport
false
,
otherwise EVAL_BODY_BUFFERED to cause the body content to be buffered.
javax.servlet.jsp.JspException
- if there are errors.public int doEndTag() throws javax.servlet.jsp.JspException
TEMPLATE_SECTIONS
HashMap
. The buffered body is
accessed by the template page to obtain
the content for IncludeSection
tags.
doEndTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- on error.protected void localRelease()
localRelease
in class AbstractBaseTag
|
BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |