|
||||||||||
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.taglib.WriteTag
public class WriteTag
Implementation class of write
tag
that converts the value of specified bean property and
specifies it as the JspWriter
.
Retrieve the specified bean
property value and assign
it to the current JspWriter
as a String
.
If there is a PropertyEditor
which is configured
for the property value class, getAsText()
method is
called. Other than that, normal toString()
conversion
is used or as shown below, the additional conversion is performed
through the attributes.
" "
" "
<br>
write
tag, following attributes are supported.Attribute name | Default value | Required | Execution time format | Overview |
filter |
- | false |
true |
When this attribute is set to true, specified property value is filtered in HTML since it consists of sensitive characters. All such characters are replaced with equivalent characters. Filtering is performed by default. To nullify, set "False" explicitly in this attribute. |
replaceNullToNbsp |
- | false |
true |
This attribute is set to "true" and when
the specified bean property value is blank
character or null,
is output.
To nullify, set "False" explicitly in this attribute.
|
replaceSpToNbsp |
- | false |
true |
This attribute is set to "true".
When specified bean property value consists of 1 Byte code space,
it is replaced with .
To nullify, set "False" explicitly in this attribute.
|
replaceLFtoBR |
- | false |
true |
When this attribute is set to "true",
linefeed code or restored characters of specified bean property value
are replaced with <br> .
To nullify, set "false" explicitly in this attribute.
|
ignore |
- | false |
true |
This attribute is set to "true" and when the bean specified in name and scope does not exist, it returns without doing any processing. Default value is "false" (At the time of execution, exception is thrown in such a way that this tag will not be consistent with other tags in the library). |
name |
- | true |
true |
To retrieve the value specified in property (when it is specified), specify the attribute name of bean in which property is accessed. When the property is not specified, the value of this bean itself is specified. |
property |
- | false |
true |
Specify the property name which is accessed in the bean that is specified by "name" attribute. This value is converted to the simple, indexed and nested property reference format. When it is not specified, bean which is identified by "name" attribute is specified. When the specified property returns null, nothing is specified. |
scope |
- | false |
true |
Specify the variable scope which is searched to fetch the bean that is specified by "name". When it is not specified, default rules of PageContext.findAttribute() are applied. |
fillColumn |
- | false |
true |
Use the characters specified in "fillColumn" as the delimiter and append <br> at the end. The half-width or full-width character is considered as 1 character. |
addBR |
- | false |
true |
Whn this attribute is set to "true", append <br> at the end of property value. Default is false. |
<logic:iterate id="form"
property="myMap" indexId="index" >
<t:write name="form" property="value" />
</logic:iterate>
Field Summary | |
---|---|
protected boolean |
addBR
Append <br> to the end of property value. |
protected int |
fillColumn
Property name which is accessed in the Bean
which is specified by fillColumn . |
protected boolean |
filter
Replace the special characters with the HTML characters. |
protected boolean |
ignore
Nothing is performed when the Bean which is specified by
name and scope attribute does not exist. |
private static org.apache.commons.logging.Log |
log
Log class |
protected java.lang.String |
name
Bean name to fetch te value which is specified in property . |
protected java.lang.String |
property
Property name which is accessed in the Bean which is specified by
name . |
protected boolean |
replaceLFtoBR
Replace linefeed code with <br> . |
protected boolean |
replaceNullToNbsp
Replace null or blank character with . |
protected boolean |
replaceSpToNbsp
Replace half-width space with . |
protected java.lang.String |
scope
Search scope name to fetch the bean
which is specified by name . |
private static long |
serialVersionUID
Serial version ID |
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 | |
---|---|
WriteTag()
|
Method Summary | |
---|---|
int |
doStartTag()
Performs start tag processing. |
boolean |
getAddBR()
get method of addBR |
int |
getFillColumn()
get method of fillColumn |
boolean |
getFilter()
get method of filter |
boolean |
getIgnore()
get method of ignore |
java.lang.String |
getName()
get method of name |
java.lang.String |
getProperty()
get method of property |
boolean |
getReplaceLFtoBR()
get method of replaceLFtoBR |
boolean |
getReplaceNullToNbsp()
get method of replaceNullToNbsp |
boolean |
getReplaceSpToNbsp()
get method of replaceSpToNbsp |
java.lang.String |
getScope()
get method of scope |
void |
release()
Releases all allocated resources. |
void |
setAddBR(boolean addBR)
set method of addBR |
void |
setFillColumn(int fillColumn)
set method of fillColumn |
void |
setFilter(boolean filter)
set method of filter |
void |
setIgnore(boolean ignore)
set method of ignore |
void |
setName(java.lang.String name)
set method of name |
void |
setProperty(java.lang.String property)
set method of property |
void |
setReplaceLFtoBR(boolean replaceLFtoBR)
set method of replaceLFtoBR |
void |
setReplaceNullToNbsp(boolean replaceNullToNbsp)
set method of replaceNullToNbsp |
void |
setReplaceSpToNbsp(boolean replaceSpToNbsp)
set method of replaceSpToNbsp |
void |
setScope(java.lang.String scope)
set method of scope |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
doAfterBody, doEndTag, 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
protected boolean filter
Replace special characters with HTML
characters.
protected boolean replaceNullToNbsp
Replace null
or blank characters with .
protected boolean replaceSpToNbsp
Replace half-width space with
.
protected boolean replaceLFtoBR
Replace linefeed code with <br>
.
protected boolean ignore
When Bean
which is specified by name
and
scope
attribute does not exist, no processing is performed.
protected java.lang.String name
Bean
name to fetch the value which is specified by property
protected java.lang.String property
Property name which is accessed in the Bean
which is specified by name
.
protected java.lang.String scope
Search scope name to fetch the bean
which is specified by name
.
protected int fillColumn
Property name which is accessed in the Bean
that is specified by fillColumn
.
protected boolean addBR
Append <br> at the end of property value.
Constructor Detail |
---|
public WriteTag()
Method Detail |
---|
public boolean getFilter()
get
method of filter
public void setFilter(boolean filter)
set
method of filter
filter
- filter attribute valuepublic boolean getReplaceNullToNbsp()
get
method of replaceNullToNbsp
null
with
conversion flagpublic void setReplaceNullToNbsp(boolean replaceNullToNbsp)
set
method of replaceNullToNbsp
replaceNullToNbsp
- Replace null
with
conversion flagpublic boolean getReplaceSpToNbsp()
get
method of replaceSpToNbsp
conversion flagpublic void setReplaceSpToNbsp(boolean replaceSpToNbsp)
set
method of replaceSpToNbsp
replaceSpToNbsp
- Replace half-width space with
conversion flagpublic boolean getReplaceLFtoBR()
get
method of replaceLFtoBR
<br>
conversion flagpublic void setReplaceLFtoBR(boolean replaceLFtoBR)
set
method of replaceLFtoBR
replaceLFtoBR
- Replace linefeed code with <br>
conversion flagpublic boolean getIgnore()
get
method of ignore
public void setIgnore(boolean ignore)
set
method of ignore
ignore
- ignore attribute valuepublic java.lang.String getName()
get
method of name
public void setName(java.lang.String name)
set
method of name
name
- name attribute valuepublic java.lang.String getProperty()
get
method of property
public void setProperty(java.lang.String property)
set
method of property
property
- property attribute valuepublic java.lang.String getScope()
get
method of scope
public void setScope(java.lang.String scope)
set
method of scope
scope
- scope attribute valuepublic int getFillColumn()
get
method of fillColumn
public void setFillColumn(int fillColumn)
set
method of fillColumn
fillColumn
- fillColumn attribute valuepublic boolean getAddBR()
get
method of addBR
public void setAddBR(boolean addBR)
set
method of addBR
addBR
- addBR attribute valuepublic int doStartTag() throws javax.servlet.jsp.JspException
Performs start tag processing.
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.JspException
- When JSP exception occurspublic void release()
Releases all allocated resources.
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 |