org.apache.beehive.netui.tags.html
Class ParameterMap

Object
  extended by TagSupport
      extended by BodyTagSupport
          extended by AbstractClassicTag
              extended by ParameterMap
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag, INetuiTag

public class ParameterMap
extends AbstractClassicTag

Writes each in a map of URL parameters to a URL on its parent tag. The parent tag must implement IUrlParams.

See Also:
Serialized Form
Example
Assume that there is a java.util.HashMap object in the Controller file.
      public HashMap hashMap = new HashMap();
      hashMap.put("q", "Socrates");
      hashMap.put("lr", "lang_el");
      hashMap.put("as_qdr", "m3");

The following set of tags will read the HashMap object and generate a link with a set of URL parameters.

      <netui:anchor href="http://www.google.com/search">
          Search Greek language web sites updated in the last three months with the query "Socrates".
          <netui:parameterMap map="{pageFlow.hashMap}"/>
      </netui:anchor>

The URL produced appears as follows:

      http://www.google.com/search?lr=lang_el&q=Socrates&as_qdr=m3

Field Summary
 
Fields inherited from class AbstractClassicTag
DefaultNamingChain, EMPTY_STRING, NETUI_UNIQUE_CNT
 
Fields inherited from class BodyTagSupport
bodyContent
 
Fields inherited from class TagSupport
id, pageContext
 
Fields inherited from interface BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
ParameterMap()
           
 
Method Summary
 int doStartTag()
          Add each parameter in the URL parameter map to the Parameter's parent.
 String getTagName()
          Return the name of the Tag.
protected  void localRelease()
          Release any acquired resources.
 void setMap(Map map)
          Sets the map expression.
 
Methods inherited from class AbstractClassicTag
applyNamingChain, getErrorsReport, getIdForTagId, getNamingChain, getNextId, getScriptReporter, getUserLocale, hasErrors, qualifyAttribute, registerTagError, registerTagError, reportAndExit, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write
 
Methods inherited from class BodyTagSupport
doAfterBody, doEndTag, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Tag
getParent, setPageContext, setParent
 

Constructor Detail

ParameterMap

public ParameterMap()
Method Detail

getTagName

public String getTagName()
Return the name of the Tag.

Specified by:
getTagName in interface INetuiTag
Specified by:
getTagName in class AbstractClassicTag
Returns:
the name of the tag.

setMap

public void setMap(Map map)
            throws JspException
Sets the map expression.

Parameters:
map - - the map expression.
Throws:
JspException

doStartTag

public int doStartTag()
               throws JspException
Add each parameter in the URL parameter map to the Parameter's parent.

Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class BodyTagSupport
Throws:
JspException - if a JSP exception has occurred

localRelease

protected void localRelease()
Release any acquired resources.

Overrides:
localRelease in class AbstractClassicTag