Class CommandButtonTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.deltava.taglib.BrowserInfoTag
org.deltava.taglib.html.ElementTag
org.deltava.taglib.html.ButtonTag
org.deltava.taglib.html.CommandButtonTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, Serializable
A JSP tag to render buttons that execute web site commands.
- Since:
- 1.0
- Version:
- 10.3
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class ElementTag
_classes, _data, _outFields inherited from class jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoEndTag()Renders the tag.voidrelease()Releases state and readies the tag for another invocation.voidsetLink(DatabaseBean db) Sets the database ID to link to.voidSets the ID parameter for the command invocation.final voidsetOnClick(String js) Overrides the onClick property from the superclass.voidSets the command operation for this button.voidsetPost(boolean doPost) Sets the button to POST or GET to the form.final voidOverrides the type property from the superclass.voidSets the command name for the button, without extension .Methods inherited from class ButtonTag
doStartTag, setDisabled, setIdx, setKey, setLabelMethods inherited from class ElementTag
getFormIndexCount, getName, getParentFormTag, setClassName, setID, setNumericAttr, setPageContext, setStyleMethods inherited from class BrowserInfoTag
getBrowserContext, passedCAPTCHAMethods inherited from class jakarta.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
-
Constructor Details
-
CommandButtonTag
public CommandButtonTag()
-
-
Method Details
-
release
-
setLinkID
Sets the ID parameter for the command invocation.- Parameters:
id- the parameter
-
setLink
Sets the database ID to link to.- Parameters:
db- aDatabaseBeanwith the proper database ID
-
setUrl
Sets the command name for the button, without extension .- Parameters:
url- the command name
-
setOp
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
Overrides the type property from the superclass. NOT IMPLEMENTED .- Overrides:
setTypein classButtonTag- Parameters:
btnType- the button type- Throws:
UnsupportedOperationException
-
setOnClick
Overrides the onClick property from the superclass. NOT IMPLEMENTED .- Overrides:
setOnClickin classButtonTag- Parameters:
js- the JavaScript code- Throws:
UnsupportedOperationException
-
doEndTag
public int doEndTag() throws jakarta.servlet.jsp.JspExceptionRenders the tag. Sets the onClick property and calls the superclass renderer.- Specified by:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classButtonTag- Returns:
- TagSupport.EVAL_PAGE
- Throws:
jakarta.servlet.jsp.JspException- if an error occursIllegalStateException- if common.js has not been added to the request
-