|
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.IncludeSection
public class IncludeSection
Used within a template JSP page to define a placeholder for section content.
Within a template, one or more sections are defined within the overall
structure of the page. Each section has a unique name identifying it.
The content page, through the Section
tag, provides content
that is included into the defined sections.
All content found within the body of the IncludeSection
is ignored.
Attribute Descriptions | |||
---|---|---|---|
Attribute | Required | Runtime Expression Evaluation | Data Bindable |
name | Yes | No | No |
The name of the section placeholder. The name must be unique within a template. | |||
defaultPage | No | No | No |
A URL identifying a default JSP or HTML page to provide content if the content page does not. |
Attribute
,
Section
,
SetAttribute
,
Template
,
Visible
,
Serialized Form<tr> <netui-template:includeSection name="rowPlaceholder" defaultPage="defaultPage.jsp"/> </tr>
If there is no content page that sets content into this placeholder using a <netui-template:section> tag, then the entire contents of the defaultPage.jsp will be used. Assume that the defaultPage.jsp appears as follows.
<p><%= 1 + 1 %></p>Then the HTML rendered in the browser will appear as follows. Note that the Java scriptlet
<%= 1 + 1 %>
has been resolved to the value 2
.
<tr> <p>2</p> </tr>
Section
tag), and render the
completed HTML in the browser.
For example, a template page can use the <netui-template:includeSection> tag to define a 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 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>
If the content page does not define content to be placed in the placeholder, then
the defaultPage
attribute will be used. The
defaultPage
attribute points at a stand-alone JSP page. The entire contents of the page
will be placed in the placeholder, after any Java elements, such as scriptlets have been resolved.
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 | |
---|---|
IncludeSection()
|
Method Summary | |
---|---|
int |
doStartTag()
Renders the content of the section into the template. |
String |
getDefaultPage()
Returns the URL of the JSP or HTML page providing default content to the defined section. |
String |
getName()
Returns the name of the defined section within
the template file. |
String |
getTagName()
Returns the name of the Tag. |
protected void |
localRelease()
Resets all of the fields of the tag. |
void |
setDefaultPage(String defaultPage)
Sets a default JSP page to provide content for the section if the content page does not define the content. |
void |
setName(String name)
Sets the name of the section. |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
doAfterBody, doEndTag, 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 IncludeSection()
Method Detail |
---|
public String getTagName()
getTagName
in class AbstractBaseTag
public void setName(String name)
name
- The name of the defined section within the template.
This name must be unique within the template.public String getName()
name
of the defined section within
the template file.
IncludeSection
being defined.public void setDefaultPage(String defaultPage)
defaultPage
- a URL identifying a JSP or HTML page
providing default content to the defined section.public String getDefaultPage()
public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- on Errors.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 |