Class CommandButtonTag
java.lang.Object
javax.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:
Serializable
,IterationTag
,JspTag
,Tag
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 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()
Renders the tag.void
release()
Releases state and readies the tag for another invocation.void
setLink
(DatabaseBean db) Sets the database ID to link to.void
Sets the ID parameter for the command invocation.final void
setOnClick
(String js) Overrides the onClick property from the superclass.void
Sets the command operation for this button.void
setPost
(boolean doPost) Sets the button to POST or GET to the form.final void
Overrides the type property from the superclass.void
Sets the command name for the button, without extension .Methods inherited from class org.deltava.taglib.html.ButtonTag
doStartTag, setDisabled, setIdx, setKey, setLabel
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
-
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
- aDatabaseBean
with 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:
setType
in classButtonTag
- Parameters:
btnType
- the button type- Throws:
UnsupportedOperationException
-
setOnClick
Overrides the onClick property from the superclass. NOT IMPLEMENTED .- Overrides:
setOnClick
in classButtonTag
- Parameters:
js
- the JavaScript code- Throws:
UnsupportedOperationException
-
doEndTag
Renders the tag. Sets the onClick property and calls the superclass renderer.- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classButtonTag
- Returns:
- TagSupport.EVAL_PAGE
- Throws:
JspException
- if an error occursIllegalStateException
- if common.js has not been added to the request
-