org.apache.struts.taglib.html

Class LinkTag

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 Stringaction
The module-relative action (beginning with a slash) which will be called by this link
protected Stringanchor
The anchor to be added to the end of the generated hyperlink.
protected Stringforward

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.

protected Stringhref
The hyperlink URI.
protected StringindexId
Name of parameter to generate to hold index number
protected StringlinkName
The link name for named links.
protected static MessageResourcesmessages
The message resources for this package.
protected Stringmodule
The module prefix (beginning with a slash) which will be used to find the action for this link.
protected Stringname
The JSP bean name for query parameters.
protected Stringpage
The module-relative page URL (beginning with a slash) to which this hyperlink will be rendered.
protected StringparamId
The single-parameter request parameter name to generate.
protected StringparamName
The single-parameter JSP bean name.
protected StringparamProperty
The single-parameter JSP bean property.
protected StringparamScope
The single-parameter JSP bean scope.
protected Stringproperty
The JSP bean property name for query parameters.
protected Stringscope
The scope of the bean specified by the name property, if any.
protected Stringtarget
The window target.
protected Stringtext
The body content of this tag (if any).
protected booleantransaction
Include transaction token (if any) in the hyperlink?
protected booleanuseLocalEncoding
Constructor Summary
LinkTag()
Method Summary
protected StringcalculateURL()
Return the complete URL to which this hyperlink will direct the user.
intdoAfterBody()
Save the associated label from the body content.
intdoEndTag()
Render the end of the hyperlink.
intdoStartTag()
Render the beginning of the hyperlink.
StringgetAction()
StringgetAnchor()
StringgetForward()
StringgetHref()
StringgetIndexId()
StringgetLinkName()
StringgetModule()
StringgetName()
StringgetPage()
StringgetParamId()
StringgetParamName()
StringgetParamProperty()
StringgetParamScope()
StringgetProperty()
StringgetScope()
StringgetTarget()
booleangetTransaction()
booleanisUseLocalEncoding()
voidrelease()
Release any acquired resources.
voidsetAction(String action)
voidsetAnchor(String anchor)
voidsetForward(String forward)
voidsetHref(String href)
voidsetIndexId(String indexId)
voidsetLinkName(String linkName)
voidsetModule(String module)
voidsetName(String name)
voidsetPage(String page)
voidsetParamId(String paramId)
voidsetParamName(String paramName)
voidsetParamProperty(String paramProperty)
voidsetParamScope(String paramScope)
voidsetProperty(String property)
voidsetScope(String scope)
voidsetTarget(String target)
voidsetTransaction(boolean transaction)
voidsetUseLocalEncoding(boolean b)

Field Detail

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 Detail

LinkTag

public LinkTag()

Method Detail

calculateURL

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

Throws: JspException if an exception is thrown calculating the value

doAfterBody

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

Throws: JspException if a JSP exception has occurred

doEndTag

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

Throws: JspException if a JSP exception has occurred

doStartTag

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

Support for indexed property since Struts 1.1

Throws: JspException if a JSP exception has occurred

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.

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-2008 - The Apache Software Foundation