net.sourceforge.stripes.tag
Class InputOptionsMapTag

java.lang.Object
  extended by net.sourceforge.stripes.tag.StripesTagSupport
      extended by net.sourceforge.stripes.tag.HtmlTagSupport
          extended by net.sourceforge.stripes.tag.InputOptionsCollectionTag
              extended by net.sourceforge.stripes.tag.InputOptionsMapTag
All Implemented Interfaces:
DynamicAttributes, JspTag, Tag

public class InputOptionsMapTag
extends InputOptionsCollectionTag

Extracts the Set of Map.Entry from the specified Map and uses it as the Collection for the superclass InputOptionsCollectionTag.

The value and label parameters will be set to "key" and "value" respectively if they are null.

Author:
Aaron Porter

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sourceforge.stripes.tag.InputOptionsCollectionTag
InputOptionsCollectionTag.Entry
 
Field Summary
 
Fields inherited from class net.sourceforge.stripes.tag.StripesTagSupport
pageContext, parentTag
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
InputOptionsMapTag()
           
 
Method Summary
 int doEndTag()
          Calls super.doEndTag() and cleans up instance variables so this instance may be reused.
 Map<? extends Object,? extends Object> getMap()
          Returns the Map that was passed in via setMap().
 void setMap(Map<? extends Object,? extends Object> map)
          This function simply passes the result of Map.entrySet() as the collection to be used by the superclass and sets the value and label variables if they have not already been set.
 
Methods inherited from class net.sourceforge.stripes.tag.InputOptionsCollectionTag
addEntry, addEntry, doStartTag, getCollection, getGroup, getLabel, getSort, getValue, setCollection, setGroup, setLabel, setSort, setValue
 
Methods inherited from class net.sourceforge.stripes.tag.HtmlTagSupport
evaluateExpression, get, getAccesskey, getAttributes, getBodyContent, getBodyContentAsString, getCssClass, getDir, getId, getLang, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getStyle, getTabindex, getTitle, release, set, setAccesskey, setBodyContent, setClass, setCssClass, setDir, setDynamicAttribute, setId, setLang, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setStyle, setTabindex, setTitle, toString, writeAttributes, writeCloseTag, writeOpenTag, writeSingletonTag
 
Methods inherited from class net.sourceforge.stripes.tag.StripesTagSupport
getActionBeanType, getActionBeanUrl, getPageContext, getParent, getParentTag, getTagStack, popPageContextAttributes, pushPageContextAttributes, setPageContext, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, release, setPageContext, setParent
 

Constructor Detail

InputOptionsMapTag

public InputOptionsMapTag()
Method Detail

getMap

public Map<? extends Object,? extends Object> getMap()

Returns the Map that was passed in via setMap().

Returns:
the Map passed in via setMap().

setMap

public void setMap(Map<? extends Object,? extends Object> map)

This function simply passes the result of Map.entrySet() as the collection to be used by the superclass and sets the value and label variables if they have not already been set.

Parameters:
map - a Map

doEndTag

public int doEndTag()
             throws JspException
Calls super.doEndTag() and cleans up instance variables so this instance may be reused.

Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class InputOptionsCollectionTag
Returns:
EVAL_PAGE in all cases.
Throws:
JspException


? Copyright 2005-2006, Stripes Development Team.