|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
jp.terasoluna.fw.web.struts.taglib.BodyTag
public class BodyTag
Implementation class of body
tag that extends body
tag
of HTML
.
In PageContext
, use "ON_LOAD"
as a key
and add the embedded script to the onLoad
event process.
In HTML <body>
tag which is generated in this tag,
JavaScript function __onLoad__()
is called as the script
of onLoad
event process.
Since the definition of JavaScript function __onLoad__()
is generated
in this tag, JavaScript with same name should not be described in HTML.
Attributes of this tag namely, "styleClass"
,"bgcolor"
,
"text"
,"link"
,
"vlink"
and "alink"
are deployed
as the <body>
tag attributes of HTML which is generated
in this tag.
In body
tag, following attributes are supported.
Attribute name | Default value | Required | Execution time format | Overview |
onload |
- | false |
true |
JavaScript which is executed at the time of screen loading. |
onunload |
- | false |
true |
JavaScript which is executed at the time of screen unloading. |
styleClass |
- | false |
true |
Class name of style sheet. |
bgcolor |
- | false |
true |
Background color. |
background |
- | false |
true |
Image set in the background. |
text |
- | false |
true |
Color of text. |
link |
- | false |
true |
Color of link. |
vlink |
- | false |
true |
Color of already selected link. |
alink |
- | false |
true |
Color of selected link. |
There is no scripting variable which is set by this tag.
<%
String script="Any script";
pageContext.setAttribute("ON_LOAD", script);
%>
,,,
<ts:body>
,,,
</ts:body>
<body onLoad="__onLoad__()">
<script type="text/javascript">
<!--
function __onLoad__() {
//Script in which key is stored in "ON_LOAD" pageContext.
}
//-->
</script>
,,,
</body>
MessagesPopupTag
,
Serialized FormField Summary | |
---|---|
private java.lang.String |
alink
Color of selected link. |
private java.lang.String |
background
Image which is set in the background. |
private java.lang.String |
bgcolor
Background color. |
private java.lang.String |
link
Color of link. |
private static org.apache.commons.logging.Log |
log
Log class. |
static java.lang.String |
ON_LOAD_KEY
Key of request attribute to retrieve the script which is added to onLoad event process.
|
private java.lang.String |
onload
JavaScript which is executed at the time of screen loading. |
private java.lang.String |
onunload
JavaScript which is executed at the time of screen unloading. |
private static long |
serialVersionUID
Serial version ID |
private java.lang.String |
styleClass
Class name of style sheet. |
private java.lang.String |
text
Color of the text. |
private java.lang.String |
vlink
Color of already selected link. |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
id, pageContext |
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 | |
---|---|
BodyTag()
|
Method Summary | |
---|---|
int |
doEndTag()
Method which is called at the time of ending tag evaluation. |
int |
doStartTag()
Method wich is called at the time of starting tag evaluation. |
void |
release()
Process at the time of releasing the tag handler. |
void |
setAlink(java.lang.String value)
Sets the color of selected link. |
void |
setBackground(java.lang.String value)
Sets the background image. |
void |
setBgcolor(java.lang.String value)
Sets the background color. |
void |
setLink(java.lang.String value)
Sets the color of link. |
void |
setOnload(java.lang.String value)
Sets the JavaScript which is executed at the time of screen loading. |
void |
setOnunload(java.lang.String value)
Sets JavaScript which is executed at the time of screen unloading. |
void |
setStyleClass(java.lang.String value)
Sets the class name of style sheet. |
void |
setText(java.lang.String value)
Sets color of text. |
void |
setVlink(java.lang.String value)
Sets color of already selected link. |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private static org.apache.commons.logging.Log log
public static final java.lang.String ON_LOAD_KEY
onLoad
event process.
private java.lang.String onload
private java.lang.String onunload
private java.lang.String styleClass
private java.lang.String bgcolor
private java.lang.String background
private java.lang.String text
private java.lang.String link
private java.lang.String vlink
private java.lang.String alink
Constructor Detail |
---|
public BodyTag()
Method Detail |
---|
public void setOnload(java.lang.String value)
value
- JavaScriptpublic void setOnunload(java.lang.String value)
value
- JavaScriptpublic void setStyleClass(java.lang.String value)
value
- Class namepublic void setBgcolor(java.lang.String value)
value
- Background colorpublic void setBackground(java.lang.String value)
value
- Background colorpublic void setText(java.lang.String value)
value
- Color of textpublic void setLink(java.lang.String value)
value
- Color of linkpublic void setVlink(java.lang.String value)
value
- Color of already selected linkpublic void setAlink(java.lang.String value)
value
- Color of selected linkpublic int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
EVAL_BODY_INCLUDE
javax.servlet.jsp.JspException
- JSP exceptionpublic int doEndTag() throws javax.servlet.jsp.JspException
doEndTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
in class javax.servlet.jsp.tagext.TagSupport
EVAL_PAGE
javax.servlet.jsp.JspException
- JSP exceptionpublic void release()
release
in interface javax.servlet.jsp.tagext.Tag
release
in class javax.servlet.jsp.tagext.TagSupport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |