Class ButtonTag

All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag
Direct Known Subclasses:
CommandButtonTag

public class ButtonTag extends ElementTag
A JSP tag to generate an HTML button. Buttons will have a CSS class name of BUTTON unless it is explicitly overridden.
Since:
1.0
Version:
10.3
Author:
Luke
See Also:
  • Constructor Details

    • ButtonTag

      public ButtonTag()
      Create a new Button element tag.
  • Method Details

    • doStartTag

      public int doStartTag() throws JspException
      Specified by:
      doStartTag in interface Tag
      Overrides:
      doStartTag in class ElementTag
      Throws:
      JspException
    • doEndTag

      public int doEndTag() throws JspException
      Generates the HTML for this button.
      Specified by:
      doEndTag in interface Tag
      Overrides:
      doEndTag in class TagSupport
      Throws:
      JspException - if an I/O error occurs
    • release

      public void release()
      Specified by:
      release in interface Tag
      Overrides:
      release in class ElementTag
    • setLabel

      public void setLabel(String label)
      Sets the label for this button.
      Parameters:
      label - the button label
    • setType

      public void setType(String type)
      Sets the button type. This is either SUBMIT or RESET.
      Parameters:
      type - the button type
    • setOnClick

      public void setOnClick(String js)
      Sets the JavaScript code to execute when the button is clicked.
      Parameters:
      js - the JavaScript code
    • setKey

      public void setKey(String accessKey)
      Sets the keyboard shortcut for this button.
      Parameters:
      accessKey - the Unicode value for this key combination
    • setDisabled

      public void setDisabled(boolean disabled)
      Marks this button as disabled.
      Parameters:
      disabled - TRUE if disabled, otherwise FALSE
    • setIdx

      public void setIdx(String index)
      Sets the tab index of this field. This does nothing if a negative, zero or non-numeric value is passed.
      Parameters:
      index - the tab index, or * if it should be retrieved from the parent form.
      See Also: