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, _outFields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoEndTag()Generates the HTML for this button.intvoidrelease()voidsetDisabled(boolean disabled) Marks this button as disabled.voidSets the tab index of this field.voidSets the keyboard shortcut for this button.voidSets the label for this button.voidsetOnClick(String js) Sets the JavaScript code to execute when the button is clicked.voidSets the button type.Methods inherited from class org.deltava.taglib.html.ElementTag
getFormIndexCount, getName, getParentFormTag, setClassName, setID, setNumericAttr, setPageContext, setStyleMethods inherited from class org.deltava.taglib.BrowserInfoTag
getBrowserContext, passedCAPTCHAMethods 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:
doStartTagin interfaceTag- Overrides:
doStartTagin classElementTag- Throws:
JspException
-
doEndTag
Generates the HTML for this button.- Specified by:
doEndTagin interfaceTag- Overrides:
doEndTagin classTagSupport- Throws:
JspException- if an I/O error occurs
-
release
public void release()- Specified by:
releasein interfaceTag- Overrides:
releasein 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:
-