|
||||||||||
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.DefineCodeListTag
public class DefineCodeListTag
Implementation class of defineCodeList tag.
From the servlet context, searches the CodeListLoader which is specified in id attribute. Fetches the code list stored in that CodeListLoader. When the code list not found, fetches the empty code list.
Since the property name of the elements in the code list, is stored in "id" and "name". These element names are used as property in the tag to access these elements. To load the code list, refer to the implementation class ofCodeListLoader
interface.
Attribute supported by tagIn defineCodeList tag, following attributes are supported.
Attribute name | Default value | Required | Execution time format | Overview |
id |
- |
true |
true |
Searches CodeListLoader using this attribute. Specify the name of bean in which
CodeListLoader
interface is implemented.
After declaring this tag, code list can be referred in <logic:iterator> tag and
<html:options> tag.
|
There is no scripting variable which is set by this tag.
In the following configuration example, bean of the class that implements CodeListLoader interface, is defined with the name as
"loader1" and used.
For the method of defining, refer to
DBCodeListLoader
,
and
MappedCodeListLoader
.
<t:defineCodeList id="loader1" />
...
<html:select property="selectOptions">
<html:options collection="loader1"
labelProperty="name"
property="id"/>
</html:select>
...
For retreiving the size of code list, refer to WriteCodeCountTag
.
CodeListLoader
,
DBCodeListLoader
,
MappedCodeListLoader
,
WriteCodeCountTag
,
Serialized FormField Summary | |
---|---|
private static org.apache.commons.logging.Log |
log
Log class. |
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 | |
---|---|
DefineCodeListTag()
|
Method Summary | |
---|---|
int |
doEndTag()
Method which is called at the time of terminating tag evaluation. |
int |
doStartTag()
Method which is called at the time of starting tag evaluation. |
void |
release()
Process at the time of releasing the tag handler. |
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
Constructor Detail |
---|
public DefineCodeListTag()
Method Detail |
---|
public int doStartTag() throws javax.servlet.jsp.JspException
From the servlet context, fetches the ApplicationContext. Fetches CodeListLoader by using the id specified in "page" attribute. Registers the code list to the pageContext. When code list is not found, empty ArrayList is registered in the pageContext. The scope at the time of registration is "page".
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
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
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 |