Class CommandLinkTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.deltava.taglib.BrowserInfoTag
org.deltava.taglib.html.ElementTag
org.deltava.taglib.html.LinkTag
org.deltava.taglib.html.CommandLinkTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, Serializable
A JSP tag to create a link to a Web Site Command.
- Since:
- 1.0
- Version:
- 11.0
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class ElementTag
_classes, _data, _outModifier and TypeFieldDescriptionprotected final Collection<String> protected final XMLRendererprotected jakarta.servlet.jsp.JspWriterFields 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 end of the HREF tag to the JSP output stream.final intRenders the start of the HREF tag to the JSP output stream.voidrelease()voidsetAuthOnly(boolean authUsersOnly) Sets whether to render the link for authenticated users only.voidOverrides the domain to use for the link.voidsetLink(DatabaseBean db) Sets the database ID to link to.voidSets the ID parameter for the command invocation.voidsetNoCache(boolean noCache) Sets whether to append a cache-busting paramter to the URL.voidSets the operation parameter for the command invocation.voidSets the sort parameter for the command invocation.voidSets the start date if this is linking to a Calendar command.voidSets the command name.Methods inherited from class LinkTag
setAnchor, setExternal, setLabel, setOnClick, setTarget, validateLinkModifier and TypeMethodDescriptionvoidSets the anchor for this link.voidsetExternal(boolean isExternal) Marks this link as an external link.voidSets the label for this link.voidsetOnClick(String js) Sets the JavaScript onClick event for this link.voidSets the target frame for this link.protected voidValidates the tag to ensure a URL/onClick event has been set.Methods inherited from class ElementTag
getFormIndexCount, getName, getParentFormTag, setClassName, setID, setNumericAttr, setPageContext, setStyleModifier and TypeMethodDescriptionprotected intGets and increments the current tab index count for the parent form tag.protected StringgetName()Returns the type of HTML element this tag generated.protected FormTagReturns the parent form tag.voidsetClassName(String cName) Sets the CSS class name of this HTML element.voidSets the ID of this HTML element.protected voidsetNumericAttr(String attrName, int value, int minValue) Sets a numeric attribute.voidsetPageContext(jakarta.servlet.jsp.PageContext ctxt) voidAssociates a CSS style with this HTML element.Methods inherited from class BrowserInfoTag
getBrowserContext, passedCAPTCHAModifier and TypeMethodDescriptionprotected HTTPContextDataFetches the browser data.protected booleanReturns whether the user has passed CAPTCHA validation.Methods inherited from class jakarta.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
-
Constructor Details
-
CommandLinkTag
public CommandLinkTag()
-
-
Method Details
-
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
-
setAuthOnly
public void setAuthOnly(boolean authUsersOnly) Sets whether to render the link for authenticated users only.- Parameters:
authUsersOnly- TRUE to render only if logged in, otherwise FALSE
-
setNoCache
public void setNoCache(boolean noCache) Sets whether to append a cache-busting paramter to the URL.- Parameters:
noCache- TRUE to invalidate cache, otherwise FALSE
-
setOp
Sets the operation parameter for the command invocation.- Parameters:
opName- the operation name
-
setSort
Sets the sort parameter for the command invocation.- Parameters:
sortType- the sort type
-
setDomain
Overrides the domain to use for the link.- Parameters:
domain- the domain name
-
setUrl
-
setStartDate
Sets the start date if this is linking to a Calendar command.- Parameters:
dt- the calendar start date/time
-
release
-
doStartTag
public final int doStartTag() throws jakarta.servlet.jsp.JspExceptionRenders the start of the HREF tag to the JSP output stream. The HREF tag will not be rendered if the linkID parameter is "0x0".- Specified by:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classLinkTag- Returns:
- TagSupport.EVAL_BODY_INCLUDE
- Throws:
jakarta.servlet.jsp.JspException- if an error occurs
-
doEndTag
public int doEndTag() throws jakarta.servlet.jsp.JspExceptionRenders the end of the HREF tag to the JSP output stream.
-