|
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.Objectjavax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
com.bea.wlw.netui.tags.AbstractBaseTag
com.bea.wlw.netui.tags.html.ScriptContainer
public class ScriptContainer
Acts as a container that will bundle up JavaScript created by other NetUI tags, and output it within a single <script> tag. This is especially needed for Portal web applications, because they often cannot rely on having <html> ... </html> tags to provide a default container. In a portlet, some JSP pages might be included into other JSP pages. Having redundant <html> ... </html> tags in the rendered portlet JSP can result in display problems for some browsers. However, omitting the <html> tag (and the container it provides) can result in cluttered code, especially where Javascript appears in the file. To solve this issue, WebLogic Workshop provides the <netui:scriptContainer> tag.
| Attribute Descriptions | |||
|---|---|---|---|
| Attribute | Required | Runtime Expression Evaluation | Data Bindable |
| scopeID | No | No | No |
| The ID that is associated with the code methods. | |||
The <netui:scriptContainer> ... </netui:scriptContainer> tag set should enclose those <netui:...> tags that you want included in the script container. The first <netui:scriptContainer> tag should appear after the JSP's <body> tag. The closing </netui:scriptContainer> tag should appear before the JSP's </body> tag.
[BEA_HOME]\weblogic81\samples\workshop\SamplesApp\WebApp\tagSamples\netui\scriptContainer\
| 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.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 | |
|---|---|
ScriptContainer()
|
|
| Method Summary | |
|---|---|
void |
addScriptCode(String script)
This method will add Script as top level code that runs when the page is loaded. |
void |
addScriptFunction(String script)
This method will add Script as a function. |
void |
addTagId(String tagId,
String tagName)
Adds a tagID and tagName to the Html's getId javascript function. |
int |
doAfterBody()
Save any body content of this tag, which will generally be the option(s) representing the values displayed to the user. |
int |
doEndTag()
Write out the body content and report any errors that occured. |
int |
doStartTag()
|
String |
getScopeId()
return the scopeId associated with the ScriptContainer |
String |
getTagName()
Returns the name of the Tag. |
boolean |
isScriptWritten()
This method indicates that the writeScript method has been called. |
protected void |
localRelease()
Release any acquired resources. |
String |
nextTagIdRef(String tagId)
|
protected void |
processIdMap()
|
protected String |
replaceTagNameRefs(String content)
|
String |
resolveTagIdRef(String tagIdRef)
|
void |
setScopeId(String scopeId)
Set the scopeId associated with the code methods |
void |
writeScript(weblogic.utils.UnsyncStringBuffer sb)
This method will output all of the Script associated with the script reporter. |
protected void |
writeScriptBlock()
|
| Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
|---|
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 ScriptContainer()
| Method Detail |
|---|
public String getTagName()
getTagName in class AbstractBaseTagpublic void addScriptFunction(String script)
addScriptFunction in interface ScriptReporterscript - the text of the functionpublic void addScriptCode(String script)
addScriptCode in interface ScriptReporterscript - the text of the script
public void addTagId(String tagId,
String tagName)
addTagId in interface ScriptReportertagId - - the id of a child tag.tagName - - the name of a child tag.public void writeScript(weblogic.utils.UnsyncStringBuffer sb)
ScriptReporter
writeScript in interface ScriptReportersb - The script is written into the provided StringBuffer. This value must not be null.public boolean isScriptWritten()
ScriptReporterwriteScript method has been called.
isScriptWritten in interface ScriptReporterpublic String nextTagIdRef(String tagId)
public String resolveTagIdRef(String tagIdRef)
public void setScopeId(String scopeId)
public String getScopeId()
public int doStartTag()
throws javax.servlet.jsp.JspException
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspException
public int doAfterBody()
throws javax.servlet.jsp.JspException
doAfterBody in interface javax.servlet.jsp.tagext.IterationTagdoAfterBody in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspException - if a JSP exception has occurred
public int doEndTag()
throws javax.servlet.jsp.JspException
doEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class javax.servlet.jsp.tagext.BodyTagSupportjavax.servlet.jsp.JspException - if a JSP exception has occurred
protected void writeScriptBlock()
throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspExceptionprotected void processIdMap()
protected String replaceTagNameRefs(String content)
throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspExceptionprotected 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 | |||||||||