Class CommandButtonTag

All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag

public class CommandButtonTag extends ButtonTag
A JSP tag to render buttons that execute web site commands.
Since:
1.0
Version:
10.3
Author:
Luke
See Also:
  • Constructor Details

    • CommandButtonTag

      public CommandButtonTag()
  • Method Details

    • release

      public void release()
      Releases state and readies the tag for another invocation.
      Specified by:
      release in interface Tag
      Overrides:
      release in class ButtonTag
    • setLinkID

      public void setLinkID(String id)
      Sets the ID parameter for the command invocation.
      Parameters:
      id - the parameter
    • setLink

      public void setLink(DatabaseBean db)
      Sets the database ID to link to.
      Parameters:
      db - a DatabaseBean with the proper database ID
    • setUrl

      public void setUrl(String url)
      Sets the command name for the button, without extension .
      Parameters:
      url - the command name
    • setOp

      public void setOp(String opName)
      Sets the command operation for this button.
      Parameters:
      opName - the operation name
      See Also:
    • setPost

      public void setPost(boolean doPost)
      Sets the button to POST or GET to the form.
      Parameters:
      doPost - TRUE if POSTing, FALSE if GETting
    • setType

      public final void setType(String btnType)
      Overrides the type property from the superclass. NOT IMPLEMENTED .
      Overrides:
      setType in class ButtonTag
      Parameters:
      btnType - the button type
      Throws:
      UnsupportedOperationException
    • setOnClick

      public final void setOnClick(String js)
      Overrides the onClick property from the superclass. NOT IMPLEMENTED .
      Overrides:
      setOnClick in class ButtonTag
      Parameters:
      js - the JavaScript code
      Throws:
      UnsupportedOperationException
    • doEndTag

      public int doEndTag() throws JspException
      Renders the tag. Sets the onClick property and calls the superclass renderer.
      Specified by:
      doEndTag in interface Tag
      Overrides:
      doEndTag in class ButtonTag
      Returns:
      TagSupport.EVAL_PAGE
      Throws:
      JspException - if an error occurs
      IllegalStateException - if common.js has not been added to the request