org.apache.beehive.netui.tags.javascript
Class ScriptHeader

Object
  extended by TagSupport
      extended by BodyTagSupport
          extended by AbstractClassicTag
              extended by ScriptHeader
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag, INetuiTag

public class ScriptHeader
extends AbstractClassicTag

ScriptHeader will write the <script> and JavaScript includes into the HTML <head> tag. It can also be used to write the <script> and JavaScript includes in the body given a JSP fragment that uses the ScriptContainer.

See Also:
Serialized Form
Example
In this example the <netui:scriptHeader/> tag has a parent <netui:html> tag.
    <netui:html>
        <head>
            <title>Page Title</title>
            <netui:scriptHeader/>
        </head>
        <netui:body>
            ...
 

In this example the <netui:scriptHeader/> tag is enclosed in the <netui:scriptContainer> tag.

    <netui:body>
        <netui:scriptContainer>
            <netui:scriptHeader/>
            <netui:tree runAtClient="true"
                        dataSource="pageFlow.root"
                        selectionAction="postback"
                        tagId="testTree"/>
            ...
        </netui:scriptContainer>
    </netui:body>

Field Summary
 
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
ScriptHeader()
           
 
Method Summary
 int doEndTag()
           
 int doStartTag()
          Process the start of the Button.
 String getTagName()
          Returns the name of the Tag.
protected  void localRelease()
          This is a method that will reinitialize all temporary state on a tag and should be called in the doEndTag method.
 
Methods inherited from class AbstractClassicTag
applyNamingChain, getErrorsReport, getIdForTagId, getNamingChain, getNearestForm, getNextId, getScriptReporter, getUserLocale, hasErrors, qualifyAttribute, registerTagError, registerTagError, reportAndExit, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write
 
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
 

Constructor Detail

ScriptHeader

public ScriptHeader()
Method Detail

getTagName

public String getTagName()
Returns the name of the Tag.

Specified by:
getTagName in interface INetuiTag
Specified by:
getTagName in class AbstractClassicTag
Returns:
the name of the tag.

doStartTag

public int doStartTag()
               throws JspException
Process the start of the Button.

Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class BodyTagSupport
Throws:
JspException - if a JSP exception has occurred

doEndTag

public int doEndTag()
             throws JspException
Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class BodyTagSupport
Throws:
JspException

localRelease

protected void localRelease()
Description copied from class: AbstractClassicTag
This is a method that will reinitialize all temporary state on a tag and should be called in the doEndTag method.

Overrides:
localRelease in class AbstractClassicTag