org.apache.struts.taglib.html

Class LinkTag

Known Direct Subclasses:
FrameTag, NestedLinkTag, RewriteTag

public class LinkTag
extends BaseHandlerTag

Generate a URL-encoded hyperlink to the specified URI.
Version:
$Rev: 164530 $ $Date: 2005-04-25 04:11:07 +0100 (Mon, 25 Apr 2005) $

Field Summary

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 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

Fields inherited from class org.apache.struts.taglib.html.BaseHandlerTag

accesskey, alt, altKey, bundle, defaultLocale, disabled, doDisabled, doReadonly, errorKey, errorStyle, errorStyleClass, errorStyleId, indexed, locale, log, loopTagStatusClass, loopTagStatusGetIndex, loopTagSupportClass, loopTagSupportGetStatus, messages, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, readonly, style, styleClass, styleId, tabindex, title, titleKey, triedJstlInit, triedJstlSuccess

Constructor Summary

LinkTag()

Method Summary

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)

Methods inherited from class org.apache.struts.taglib.html.BaseHandlerTag

doErrorsExist, getAccesskey, getAlt, getAltKey, getBundle, getDisabled, getElementClose, getErrorKey, getErrorStyle, getErrorStyleClass, getErrorStyleId, getIndexValue, getIndexed, getJstlLoopIndex, 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, prepareKeyEvents, prepareMouseEvents, prepareName, prepareOtherAttributes, prepareStyles, prepareTextEvents, release, setAccesskey, setAlt, setAltKey, setBundle, setDisabled, setErrorKey, setErrorStyle, setErrorStyleClass, setErrorStyleId, setIndexed, setLocale, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setReadonly, setStyle, setStyleClass, setStyleId, setTabindex, setTitle, setTitleKey

Field Details

action

protected String action
The module-relative action (beginning with a slash) which will be called by this link

anchor

protected String anchor
The anchor to be added to the end of the generated hyperlink.

forward

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.


href

protected String href
The hyperlink URI.

indexId

protected String indexId
Name of parameter to generate to hold index number

linkName

protected String linkName
The link name for named links.

messages

protected static MessageResources messages
The message resources for this package.

module

protected String module
The module prefix (beginning with a slash) which will be used to find the action for this link.

name

protected String name
The JSP bean name for query parameters.

page

protected String page
The module-relative page URL (beginning with a slash) to which this hyperlink will be rendered.

paramId

protected String paramId
The single-parameter request parameter name to generate.

paramName

protected String paramName
The single-parameter JSP bean name.

paramProperty

protected String paramProperty
The single-parameter JSP bean property.

paramScope

protected String paramScope
The single-parameter JSP bean scope.

property

protected String property
The JSP bean property name for query parameters.

scope

protected String scope
The scope of the bean specified by the name property, if any.

target

protected String target
The window target.

text

protected String text
The body content of this tag (if any).

transaction

protected boolean transaction
Include transaction token (if any) in the hyperlink?

useLocalEncoding

protected boolean useLocalEncoding

Constructor Details

LinkTag

public LinkTag()

Method Details

calculateURL

protected String calculateURL()
            throws JspException
Return the complete URL to which this hyperlink will direct the user. Support for indexed property since Struts 1.1

doAfterBody

public int doAfterBody()
            throws JspException
Save the associated label from the body content.

doEndTag

public int doEndTag()
            throws JspException
Render the end of the hyperlink.

doStartTag

public int doStartTag()
            throws JspException
Render the beginning of the hyperlink.

Support for indexed property since Struts 1.1


getAction

public String getAction()

getAnchor

public String getAnchor()

getForward

public String getForward()

getHref

public String getHref()

getIndexId

public String getIndexId()

getLinkName

public String getLinkName()

getModule

public String getModule()

getName

public String getName()

getPage

public String getPage()

getParamId

public String getParamId()

getParamName

public String getParamName()

getParamProperty

public String getParamProperty()

getParamScope

public String getParamScope()

getProperty

public String getProperty()

getScope

public String getScope()

getTarget

public String getTarget()

getTransaction

public boolean getTransaction()

isUseLocalEncoding

public boolean isUseLocalEncoding()

release

public void release()
Release any acquired resources.
Overrides:
release in interface BaseHandlerTag

setAction

public void setAction(String action)

setAnchor

public void setAnchor(String anchor)

setForward

public void setForward(String forward)

setHref

public void setHref(String href)

setIndexId

public void setIndexId(String indexId)

setLinkName

public void setLinkName(String linkName)

setModule

public void setModule(String module)

setName

public void setName(String name)

setPage

public void setPage(String page)

setParamId

public void setParamId(String paramId)

setParamName

public void setParamName(String paramName)

setParamProperty

public void setParamProperty(String paramProperty)

setParamScope

public void setParamScope(String paramScope)

setProperty

public void setProperty(String property)

setScope

public void setScope(String scope)

setTarget

public void setTarget(String target)

setTransaction

public void setTransaction(boolean transaction)

setUseLocalEncoding

public void setUseLocalEncoding(boolean b)

Copyright B) 2000-2007 - The Apache Software Foundation