com.taggercat.template.tags
Class ForEachFieldTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
com.taggercat.template.tags.AbstractDataFieldTag
com.taggercat.template.tags.ForEachFieldTag
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
public class ForEachFieldTag
- extends AbstractDataFieldTag
This tag is used to iterate over the field list. Upon each iteration the
the following objects are exposed:
- the field's metaProperty -> request scope
- the current fieldName -> page scope
- loop status -> page scope
Example usage:
You should use this tag rather than the JSTL tags such as:
when you need to expose the field's metaProperty object on the request
scope before it is dispatched with the DataField tags.
The name of the loop status variable is specified in the tag's varStatus attribute.
- See Also:
- Serialized Form
-
| 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 |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ForEachFieldTag
public ForEachFieldTag()
doEndTag
public int doEndTag()
throws javax.servlet.jsp.JspException
- Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag- Overrides:
doEndTag in class AbstractDataFieldTag
- Throws:
javax.servlet.jsp.JspException
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Description copied from class:
AbstractDataFieldTag
- Sends the value of the data field to the page.
- Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag- Overrides:
doStartTag in class AbstractDataFieldTag
- Throws:
javax.servlet.jsp.JspException
- Returns:
- SKIP_BODY
doAfterBody
public int doAfterBody()
throws javax.servlet.jsp.JspException
- Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag- Overrides:
doAfterBody in class javax.servlet.jsp.tagext.TagSupport
- Throws:
javax.servlet.jsp.JspException
init
public void init()
getCurrent
public java.lang.Object getCurrent()
- Gets the current busObjectAttribute object
- Returns:
- the current busObjectAttribute object
getLoopStatus
public ForEachFieldTag.LoopStatus getLoopStatus()
- A singleton to get the loop status object associated
with this tag
- Returns:
- the loop status object
setFieldNames
public void setFieldNames(java.lang.String fieldNames)
- Sets the field names ( as a comma separated list )
- Parameters:
fieldNames - the field names to iterate over
setVarStatus
public void setVarStatus(java.lang.String statusId)
- Sets the 'varStatus' attribute.
- Parameters:
statusId - Name of the exported scoped variable storing the status
of the iteration.
release
public void release()
- Specified by:
release in interface javax.servlet.jsp.tagext.Tag- Overrides:
release in class javax.servlet.jsp.tagext.TagSupport