com.ora.jsp.tags.xmp
Class ForEachOptionTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.jstl.core.LoopTagSupport
com.ora.jsp.tags.xmp.ForEachOptionTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.jstl.core.LoopTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally
- public class ForEachOptionTag
- extends javax.servlet.jsp.jstl.core.LoopTagSupport
This class is a custom action for creating HTML select lists,
checkboxes or radio buttons, where some items need to be
marked as selected based on dynamic data.
The names and values for the options are provided through a Map,
and the selected values are provided as a String[]. The action
exposes a bean with three properties to actions in the body,
representing the current Map entry:
- String text
- String value
- boolean selected
- Version:
- 2.0
- Author:
- Hans Bergsten, Gefion software
- See Also:
- Serialized Form
Fields inherited from class javax.servlet.jsp.jstl.core.LoopTagSupport |
begin, beginSpecified, end, endSpecified, itemId, statusId, step, stepSpecified |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
Methods inherited from class javax.servlet.jsp.jstl.core.LoopTagSupport |
doAfterBody, doCatch, doFinally, doStartTag, getCurrent, getLoopStatus, release, setVar, setVarStatus, validateBegin, validateEnd, validateStep |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
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 |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
doEndTag, getParent, setPageContext, setParent |
options
private java.util.Map options
selections
private java.lang.String[] selections
iterator
private java.util.Iterator iterator
ForEachOptionTag
public ForEachOptionTag()
setOptions
public void setOptions(java.util.Map options)
setSelections
public void setSelections(java.lang.String[] selections)
prepare
protected void prepare()
next
protected java.lang.Object next()
hasNext
protected boolean hasNext()
isSelected
private boolean isSelected(java.lang.String value)