|
||||||||||
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.StringFormatterTagBase
jp.terasoluna.fw.web.taglib.LeftTag
public class LeftTag
Implementation class of left
tag that trims the characters of a string from the left side.
Trims the characters of a string from the left side by using the substring()
method of StringUtil
class.
Refer to StringFormatterTagBase
.
Refer to StringFormatterTagBase
.
Following are the scripting variables that have been added in this class.
Attribute name | Default | rtexprvalue | Description |
---|---|---|---|
length | - | true |
Number of characters to be trimmed from the string. |
To trim 5 characters from the left side of "field001"
property value
of "form0001"
bean and output the value, see the following example.
<t:left name="form0001"
property="field001"
length="5" />
To set the bean property to the scripting variable without outputting it to the custom tag, see the following example.
<t:left id="cut"
name="form0001"
property="field001"
length="5" />
To specify the string to be trimmed in the value
attribute of custom tag without fetching that string from the bean, see the following example.
<t:left value="String before trimming the specified characters"
length="5" />
StringFormatterTagBase
,
Serialized FormField Summary | |
---|---|
protected int |
length
Length of the string to be trimmed. |
private static long |
serialVersionUID
Serial version ID |
Fields inherited from class jp.terasoluna.fw.web.taglib.StringFormatterTagBase |
---|
filter, id, ignore, name, property, replaceSpToNbsp, scope, value |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
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 | |
---|---|
LeftTag()
|
Method Summary | |
---|---|
protected java.lang.String |
doFormat(java.lang.String s)
From the left side of the string, fetches the number of characters specified in lenth
attribute.
|
int |
getLength()
Fetches the length of string to be trimmed. |
void |
release()
Releases all allocated resources. |
void |
setLength(int length)
Sets the length of string to be trimmed. |
Methods inherited from class jp.terasoluna.fw.web.taglib.StringFormatterTagBase |
---|
doStartTag, getFilter, getId, getIgnore, getName, getProperty, getReplaceSpToNbsp, getScope, getValue, setFilter, setId, setIgnore, setName, setProperty, setReplaceSpToNbsp, setScope, setValue |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
doAfterBody, doEndTag, findAncestorWithClass, getParent, getValue, getValues, removeValue, 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
protected int length
Constructor Detail |
---|
public LeftTag()
Method Detail |
---|
public int getLength()
public void setLength(int length)
length
- Length of string to be trimmedpublic void release()
release
in interface javax.servlet.jsp.tagext.Tag
release
in class StringFormatterTagBase
protected java.lang.String doFormat(java.lang.String s)
lenth
attribute.
doFormat
in class StringFormatterTagBase
s
- String to be formatted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |