public class LinkTag extends BaseHandlerTag
Modifier and Type | Field and Description |
---|---|
protected String |
action
The module-relative action (beginning with a slash) which will be
called by this link
|
protected String |
anchor
The anchor to be added to the end of the generated hyperlink.
|
protected String |
forward
The logical forward name from which to retrieve the hyperlink
URI.
|
protected String |
href
The hyperlink URI.
|
protected String |
indexId
Name of parameter to generate to hold index number
|
protected String |
linkName
The link name for named links.
|
protected static MessageResources |
messages
The message resources for this package.
|
protected String |
module
The module prefix (beginning with a slash) which will be used to find
the action for this link.
|
protected String |
name
The JSP bean name for query parameters.
|
protected String |
page
The module-relative page URL (beginning with a slash) to which this
hyperlink will be rendered.
|
protected Map |
parameters
Additional parameters included programatically.
|
protected String |
paramId
The single-parameter request parameter name to generate.
|
protected String |
paramName
The single-parameter JSP bean name.
|
protected String |
paramProperty
The single-parameter JSP bean property.
|
protected String |
paramScope
The single-parameter JSP bean scope.
|
protected String |
property
The JSP bean property name for query parameters.
|
protected String |
scope
The scope of the bean specified by the name property, if any.
|
protected String |
target
The window target.
|
protected String |
text
The body content of this tag (if any).
|
protected boolean |
transaction
Include transaction token (if any) in the hyperlink?
|
protected boolean |
useLocalEncoding |
accesskey, doDisabled, doReadonly, indexed, tabindex
Constructor and Description |
---|
LinkTag() |
Modifier and Type | Method and Description |
---|---|
void |
addParameter(String paramName,
Object paramValue)
Adds a parameter to this link.
|
protected String |
calculateURL()
Return the complete URL to which this hyperlink will direct the user.
|
int |
doAfterBody()
Save the associated label from the body content.
|
int |
doEndTag()
Render the end of the hyperlink.
|
int |
doStartTag()
Render the beginning of the hyperlink.
|
String |
getAction() |
String |
getAnchor() |
String |
getForward() |
String |
getHref() |
String |
getIndexId() |
String |
getLinkName() |
String |
getModule() |
String |
getName() |
String |
getPage() |
String |
getParamId() |
String |
getParamName() |
String |
getParamProperty() |
String |
getParamScope() |
String |
getProperty() |
String |
getScope() |
String |
getTarget() |
boolean |
getTransaction() |
boolean |
isUseLocalEncoding() |
void |
release()
Release any acquired resources.
|
void |
setAction(String action) |
void |
setAnchor(String anchor) |
void |
setForward(String forward) |
void |
setHref(String href) |
void |
setIndexId(String indexId) |
void |
setLinkName(String linkName) |
void |
setModule(String module) |
void |
setName(String name) |
void |
setPage(String page) |
void |
setParamId(String paramId) |
void |
setParamName(String paramName) |
void |
setParamProperty(String paramProperty) |
void |
setParamScope(String paramScope) |
void |
setProperty(String property) |
void |
setScope(String scope) |
void |
setTarget(String target) |
void |
setTransaction(boolean transaction) |
void |
setUseLocalEncoding(boolean b) |
doErrorsExist, getAccesskey, getAlt, getAltKey, getBundle, getDir, getDisabled, getElementClose, getErrorKey, getErrorStyle, getErrorStyleClass, getErrorStyleId, getIndexed, getIndexValue, getLang, getLocale, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getReadonly, getStyle, getStyleClass, getStyleId, getTabindex, getTitle, getTitleKey, isXhtml, lookupProperty, message, prepareAttribute, prepareEventHandlers, prepareFocusEvents, prepareIndex, prepareInternationalization, prepareKeyEvents, prepareMouseEvents, prepareName, prepareOtherAttributes, prepareStyles, prepareTextEvents, setAccesskey, setAlt, setAltKey, setBundle, setDir, setDisabled, setErrorKey, setErrorStyle, setErrorStyleClass, setErrorStyleId, setIndexed, setLang, setLocale, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setReadonly, setStyle, setStyleClass, setStyleId, setTabindex, setTitle, setTitleKey
doInitBody, getBodyContent, getPreviousOut, setBodyContent
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
protected static MessageResources messages
protected String text
protected String anchor
protected String forward
The logical forward name from which to retrieve the hyperlink URI.
Usage note: If a forward config is used in a hyperlink, and a module is specified, the path must lead to another action and not directly to a page. This is in keeping with rule that in a modular application all links must be to an action rather than a page.
protected String href
protected String linkName
protected String name
protected String page
protected String action
protected String module
protected String paramId
protected String paramName
protected String paramProperty
protected String paramScope
protected String property
protected String scope
protected String target
protected boolean transaction
protected Map parameters
protected String indexId
protected boolean useLocalEncoding
public String getAnchor()
public void setAnchor(String anchor)
public String getForward()
public void setForward(String forward)
public String getHref()
public void setHref(String href)
public String getLinkName()
public void setLinkName(String linkName)
public String getName()
public void setName(String name)
public String getPage()
public void setPage(String page)
public String getAction()
public void setAction(String action)
public String getModule()
public void setModule(String module)
public String getParamId()
public void setParamId(String paramId)
public String getParamName()
public void setParamName(String paramName)
public String getParamProperty()
public void setParamProperty(String paramProperty)
public String getParamScope()
public void setParamScope(String paramScope)
public String getProperty()
public void setProperty(String property)
public String getScope()
public void setScope(String scope)
public String getTarget()
public void setTarget(String target)
public boolean getTransaction()
public void setTransaction(boolean transaction)
public String getIndexId()
public void setIndexId(String indexId)
public boolean isUseLocalEncoding()
public void setUseLocalEncoding(boolean b)
public int doStartTag() throws javax.servlet.jsp.JspException
Support for indexed property since Struts 1.1
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- if a JSP exception has occurredpublic int doAfterBody() throws javax.servlet.jsp.JspException
doAfterBody
in interface javax.servlet.jsp.tagext.IterationTag
doAfterBody
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- if a JSP exception has occurredpublic int doEndTag() throws javax.servlet.jsp.JspException
doEndTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- if a JSP exception has occurredpublic void release()
release
in interface javax.servlet.jsp.tagext.Tag
release
in class BaseHandlerTag
protected String calculateURL() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- if an exception is thrown calculating the valueCopyright © 2000–2016 Apache Software Foundation. All rights reserved.