Class ButtonTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.BrowserInfoTag
org.deltava.taglib.html.ElementTag
org.deltava.taglib.html.ButtonTag
- All Implemented Interfaces:
Serializable
,IterationTag
,JspTag
,Tag
- Direct Known Subclasses:
CommandButtonTag
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:
-
Field Summary
Fields inherited from class org.deltava.taglib.html.ElementTag
_classes, _data, _out
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
doEndTag()
Generates the HTML for this button.int
void
release()
void
setDisabled
(boolean disabled) Marks this button as disabled.void
Sets the tab index of this field.void
Sets the keyboard shortcut for this button.void
Sets the label for this button.void
setOnClick
(String js) Sets the JavaScript code to execute when the button is clicked.void
Sets the button type.Methods inherited from class org.deltava.taglib.html.ElementTag
getFormIndexCount, getName, getParentFormTag, setClassName, setID, setNumericAttr, setPageContext, setStyle
Methods inherited from class org.deltava.taglib.BrowserInfoTag
getBrowserContext
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
-
Constructor Details
-
ButtonTag
public ButtonTag()Create a new Button element tag.
-
-
Method Details
-
doStartTag
- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classElementTag
- Throws:
JspException
-
doEndTag
Generates the HTML for this button.- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagSupport
- Throws:
JspException
- if an I/O error occurs
-
release
public void release()- Specified by:
release
in interfaceTag
- Overrides:
release
in classElementTag
-
setLabel
Sets the label for this button.- Parameters:
label
- the button label
-
setType
Sets the button type. This is either SUBMIT or RESET.- Parameters:
type
- the button type
-
setOnClick
Sets the JavaScript code to execute when the button is clicked.- Parameters:
js
- the JavaScript code
-
setKey
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
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:
-