|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectTagSupport
BodyTagSupport
AbstractClassicTag
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, Beehive provides the <netui:scriptContainer> tag.
Field Summary | |
---|---|
static String |
SCOPE_ID
|
Fields inherited from class AbstractClassicTag |
---|
DefaultNamingChain, EMPTY_STRING, NETUI_UNIQUE_CNT |
Fields inherited from class BodyTagSupport |
---|
bodyContent |
Fields inherited from class TagSupport |
---|
id, pageContext |
Fields inherited from interface BodyTag |
---|
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface IterationTag |
---|
EVAL_BODY_AGAIN |
Fields inherited from interface Tag |
---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
---|---|
ScriptContainer()
|
Method Summary | |
---|---|
void |
addLegacyTagIdMappings(String tagId,
String tagName)
Adds a tagID and tagName to the Html's getId javascript function. |
void |
addScriptFunction(ScriptPlacement placement,
String script)
This method will add Script as a function. |
void |
addTagIdMappings(String tagId,
String realId,
String realName)
This will add the mapping between the tagId and the real name to the NameMap hashmap. |
int |
doEndTag()
Write out the body content and report any errors that occured. |
int |
doStartTag()
|
String |
getIdScope()
return the scopeId associated with the ScriptContainer |
protected String |
getRealIdScope()
This method will return the real scope id for the script container. |
String |
getTagName()
Returns the name of the Tag. |
protected void |
localRelease()
Release any acquired resources. |
protected void |
popIdScope()
|
protected void |
pushIdScope()
|
void |
setGenerateIdScope(boolean genScopeValue)
If true generate a scope id for this script container. |
void |
setIdScope(String idScope)
Set the idScope associated with the code methods |
protected void |
writeAfterBlocks(AbstractRenderAppender sb)
|
protected void |
writeBeforeBlocks(AbstractRenderAppender sb)
|
protected void |
writeFrameworkScript(AbstractRenderAppender sb)
This will write the script block. |
void |
writeScript(AbstractRenderAppender sb)
This method will output all of the Script associated with the script reporter. |
Methods inherited from class BodyTagSupport |
---|
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent |
Methods inherited from class TagSupport |
---|
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface Tag |
---|
getParent, setPageContext, setParent |
Field Detail |
---|
public static final String SCOPE_ID
Constructor Detail |
---|
public ScriptContainer()
Method Detail |
---|
public String getTagName()
getTagName
in interface INetuiTag
getTagName
in class AbstractClassicTag
public void addScriptFunction(ScriptPlacement placement, String script)
addScriptFunction
in interface IScriptReporter
placement
- script
- the text of the function. This value must not be null.public void addLegacyTagIdMappings(String tagId, String tagName)
addLegacyTagIdMappings
in interface IScriptReporter
tagId
- the id of a child tag.tagName
- the name of a child tag.public void addTagIdMappings(String tagId, String realId, String realName)
addTagIdMappings
in interface IScriptReporter
tagId
- realId
- realName
- public void writeScript(AbstractRenderAppender sb)
writeScript
in interface IScriptReporter
sb
- The script is written into the provided InternalStringBuilder. This value must not be null.public void setIdScope(String idScope)
public String getIdScope()
public void setGenerateIdScope(boolean genScopeValue)
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class BodyTagSupport
JspException
public int doEndTag() throws JspException
doEndTag
in interface Tag
doEndTag
in class BodyTagSupport
JspException
- if a JSP exception has occurredprotected void pushIdScope()
protected void popIdScope()
protected String getRealIdScope()
protected void writeBeforeBlocks(AbstractRenderAppender sb)
protected void writeAfterBlocks(AbstractRenderAppender sb)
protected void writeFrameworkScript(AbstractRenderAppender sb)
protected void localRelease()
localRelease
in class AbstractClassicTag
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |