com.raritantechnologies.quickstart.taglibrary
Class PageResetButton

java.lang.Object
  extended byBodyTagSupport
      extended bycom.raritantechnologies.quickstart.taglibrary.PageResetButton
All Implemented Interfaces:
IConfigurable, ICustomTag, ISearchElementRenderer

public class PageResetButton
extends BodyTagSupport
implements ICustomTag, ISearchElementRenderer

Resets a page by sending a request with default values for elements that should be reset. Can also include commands such as searchType="clear" for elements that do not get their context from the page request.

Sets all configured parameters to default values.

XML Configuration Template:
  <SearchElementRenderer 
         rendererClass="com.raritantechnologies.quickstart.taglibrary.PageResetButton"
         buttonImage|iconURL="./images/buttonIcon.gif"
         buttonText="[alternate to image]"
         functionName="resetPage" >

   <Params>
    <Param name="[the req param]" reset="" />
    <Param name="[another param]" reset="true" />
    <Param name="[a command param]" reset="clear" />
   </Params>
 </SearchElementRenderer>

 
Custom tag syntax:
 <search:PageResetButton
   resetParams="reqparam=val|reqParam2=val2|etc. etc."
   buttonImage="./images/buttonIcon.gif"
   buttonText="[alternative to image button]"
   functionName="resetPage"
   />
 

Developed by Raritan Technologies Inc..

Author:
Ted Sullivan
See Also:
Serialized Form

Constructor Summary
PageResetButton()
           
 
Method Summary
 int doStartTag()
           
 java.lang.String getBody(ISearchFormRenderer parent, RaritanPageContext pageContext)
          Returns the element html fragment.
 java.lang.String getBody(RaritanPageContext pageContext)
          Returns the tag body.
 ISearchElementRenderer getRenderer(java.lang.String name)
          Returns ISearchElementRenderer of this render or a nested renderer matching the name given or null if no match is found.
 void initialize(org.w3c.dom.Element elem)
          Initialize renderer-specific parameters from the configuration XML tag.
 void initialize(java.util.Map initParams)
           
 boolean isHidden(ISearchFormRenderer parent, RaritanPageContext pageContext)
           
 void setButtonImage(java.lang.String iconImg)
           
 void setButtonText(java.lang.String buttonText)
           
 void setEnable(boolean enabled)
          Enable/Disable the renderer.
 void setFunctionName(java.lang.String resetFunction)
           
 void setResetParams(java.lang.String paramList)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageResetButton

public PageResetButton()
Method Detail

setResetParams

public void setResetParams(java.lang.String paramList)

setButtonImage

public void setButtonImage(java.lang.String iconImg)

setButtonText

public void setButtonText(java.lang.String buttonText)

setFunctionName

public void setFunctionName(java.lang.String resetFunction)

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: ISearchElementRenderer
Initialize renderer-specific parameters from the configuration XML tag.

Specified by:
initialize in interface IConfigurable

initialize

public void initialize(java.util.Map initParams)
Specified by:
initialize in interface ICustomTag

doStartTag

public int doStartTag()
               throws JspException
Throws:
JspException

getBody

public java.lang.String getBody(ISearchFormRenderer parent,
                                RaritanPageContext pageContext)
Description copied from interface: ISearchElementRenderer
Returns the element html fragment.

Specified by:
getBody in interface ISearchElementRenderer

getBody

public java.lang.String getBody(RaritanPageContext pageContext)
Description copied from interface: ICustomTag
Returns the tag body.

Specified by:
getBody in interface ICustomTag
Parameters:
pageContext - Platform-neutral page context ( can be used in non J2EE environments such as ASP).
Returns:
The tag body text string.

getRenderer

public ISearchElementRenderer getRenderer(java.lang.String name)
Description copied from interface: ISearchElementRenderer
Returns ISearchElementRenderer of this render or a nested renderer matching the name given or null if no match is found.

Specified by:
getRenderer in interface ISearchElementRenderer

isHidden

public boolean isHidden(ISearchFormRenderer parent,
                        RaritanPageContext pageContext)
Specified by:
isHidden in interface ISearchElementRenderer

setEnable

public void setEnable(boolean enabled)
Description copied from interface: ISearchElementRenderer
Enable/Disable the renderer. Disabled renderers are not included in the html output of an ISearchFormRenderer.

Specified by:
setEnable in interface ISearchElementRenderer