com.raritantechnologies.searchApp.taglibrary
Class RequestParameterSwitchTag

java.lang.Object
  extended byBodyTagSupport
      extended bycom.raritantechnologies.searchApp.taglibrary.RequestParameterSwitchTag

public class RequestParameterSwitchTag
extends BodyTagSupport

Implements a JSP tag that conditionally displays its body contents depending on the result of a comparison between a tag attribute and the value of a request parameter.

Example:

 
  <quickstart:switch requestParam="format" matchValue="plain" stopOnMatch="yes">
  [other HTML or JSP tags]
  </quickstart:switch>
  
 

Tag attributes:

Rules for conditionally including the tag contents in the JSP output:
use caserequestParameter=matchValueresult
case 1"dog""dog"show block
case 2"dog""cat"skip block
case 3any valuenullshow block
case 4null or empty"dog"skip block
case 5null or emptynullshow block

Developed by Raritan Technologies .

Author:
Jim Nicholson
See Also:
Serialized Form

Constructor Summary
RequestParameterSwitchTag()
           
 
Method Summary
 int doEndTag()
           
 int doStartTag()
           
 java.lang.String getMatchValue()
          Bean property implementation matchValue
 java.lang.String getRequestParam()
          Bean property implementation requestParam
 void release()
           
 void setMatchValue(java.lang.String matchValue)
          Sets a new value for matchValue
 void setRequestParam(java.lang.String requestParam)
          Sets a new value for requestParam
 void setStopOnMatch(java.lang.String stopOnMatchString)
          Sets a new value for stopOnMatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestParameterSwitchTag

public RequestParameterSwitchTag()
Method Detail

doStartTag

public int doStartTag()
               throws JspException
Throws:
JspException

doEndTag

public int doEndTag()
             throws JspException
Throws:
JspException

getMatchValue

public java.lang.String getMatchValue()
Bean property implementation matchValue

Returns:
A String containing the value of matchValue.

setMatchValue

public void setMatchValue(java.lang.String matchValue)
Sets a new value for matchValue

Parameters:
matchValue - A String value to store in matchValue.

getRequestParam

public java.lang.String getRequestParam()
Bean property implementation requestParam

Returns:
A String containing the value of requestParam.

setRequestParam

public void setRequestParam(java.lang.String requestParam)
Sets a new value for requestParam

Parameters:
requestParam - A String value to store in requestParam.

release

public void release()

setStopOnMatch

public void setStopOnMatch(java.lang.String stopOnMatchString)
Sets a new value for stopOnMatch