Package org.apache.wiki.tags

# Class LinkTag

java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.apache.wiki.tags.WikiTagBase
org.apache.wiki.tags.WikiLinkTag
org.apache.wiki.tags.LinkTag

All Implemented Interfaces:
  `jakarta.servlet.jsp.tagext.BodyTag`, `jakarta.servlet.jsp.tagext.IterationTag`, `jakarta.servlet.jsp.tagext.JspTag`, `jakarta.servlet.jsp.tagext.Tag`, `jakarta.servlet.jsp.tagext.TryCatchFinally`, `Serializable`, `ParamHandler`

public class LinkTag extends WikiLinkTag implements ParamHandler, jakarta.servlet.jsp.tagext.BodyTag
Provides a generic link tag for all kinds of linking purposes.

If parameter jsp is defined, constructs a URL pointing to the specified JSP page, under the baseURL known by the Engine. Any ParamTag name-value pairs contained in the body are added to this URL to provide support for arbitrary JSP calls.

Since:
  2.3.50
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class org.apache.wiki.tags.WikiLinkTag

`ANCHOR, m_format, m_pageName, m_template, URL`

### Fields inherited from class org.apache.wiki.tags.WikiTagBase

`m_wikiContext`

### Fields inherited from class jakarta.servlet.jsp.tagext.TagSupport

`id, pageContext`

### Fields inherited from interface jakarta.servlet.jsp.tagext.BodyTag

`EVAL_BODY_BUFFERED`

### Fields inherited from interface jakarta.servlet.jsp.tagext.IterationTag

`EVAL_BODY_AGAIN`

### Fields inherited from interface jakarta.servlet.jsp.tagext.Tag

`EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE`

## Constructor Summary

Constructors
Constructor
Description
`LinkTag()`

## Method Summary

Modifier and Type
Method
Description
`int`
`doEndTag()`
`void`
`doInitBody()`
`int`
`doWikiStartTag()`
This method is allowed to do pretty much whatever he wants.
`String`
`getVersion()`
`void`
`initTag()`
This method is called when the tag is encountered within a new request, but before the setXXX() methods are called.
`void`
`setAccessKey(String key)`
`void`
`setBodyContent(jakarta.servlet.jsp.tagext.BodyContent bc)`
`void`
`setCompareToVersion(String ver)`
`void`
`setContainedParameter(String name, String value)`
Support for ParamTag supplied parameters in body.
`void`
`setContext(String context)`
`void`
`setCssClass(String arg)`
`void`
`setJsp(String jsp)`
`void`
`setRef(String ref)`
`void`
`setRel(String rel)`
`void`
`setStyle(String style)`
`void`
`setTabindex(String tabindex)`
`void`
`setTarget(String target)`
`void`
`setTemplatefile(String key)`
`void`
`setTitle(String title)`
`void`
`setVersion(String arg)`

### Methods inherited from class org.apache.wiki.tags.WikiLinkTag

`getPage, getTemplate, setFormat, setPage, setTemplate`

### Methods inherited from class org.apache.wiki.tags.WikiTagBase

`doCatch, doFinally, doStartTag, setId, setPageContext`

### Methods inherited from class jakarta.servlet.jsp.tagext.TagSupport

`doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setParent, setValue`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface jakarta.servlet.jsp.tagext.IterationTag

`doAfterBody`

### Methods inherited from interface jakarta.servlet.jsp.tagext.Tag

`doStartTag, getParent, release, setPageContext, setParent`

## Constructor Details

### LinkTag

public LinkTag()

## Method Details

### initTag

public void initTag()
Description copied from class: `WikiTagBase`
This method is called when the tag is encountered within a new request, but before the setXXX() methods are called. The default implementation does nothing.

Overrides:
  `initTag` in class `WikiLinkTag`

### setTemplatefile

public void setTemplatefile(String key)

### setAccessKey

public void setAccessKey(String key)

### getVersion

public String getVersion()

### setVersion

public void setVersion(String arg)

### setCssClass

public void setCssClass(String arg)

### setStyle

public void setStyle(String style)

### setTitle

public void setTitle(String title)

### setTarget

public void setTarget(String target)

### setTabindex

public void setTabindex(String tabindex)

### setCompareToVersion

public void setCompareToVersion(String ver)

### setRel

public void setRel(String rel)

### setRef

public void setRef(String ref)

### setJsp

public void setJsp(String jsp)

### setContext

public void setContext(String context)

### setContainedParameter

public void setContainedParameter(String name, String value)
Support for ParamTag supplied parameters in body.

Specified by:
  `setContainedParameter` in interface `ParamHandler`

### doWikiStartTag

public int doWikiStartTag() throws Exception
Description copied from class: `WikiTagBase`
This method is allowed to do pretty much whatever he wants. We then catch all mistakes.

Specified by:
  `doWikiStartTag` in class `WikiTagBase`
Throws:
  `Exception`

### doEndTag

public int doEndTag()

Specified by:
  `doEndTag` in interface `jakarta.servlet.jsp.tagext.Tag`
Overrides:
  `doEndTag` in class `WikiLinkTag`

### setBodyContent

public void setBodyContent(jakarta.servlet.jsp.tagext.BodyContent bc)

Specified by:
  `setBodyContent` in interface `jakarta.servlet.jsp.tagext.BodyTag`

### doInitBody

public void doInitBody()

Specified by:
  `doInitBody` in interface `jakarta.servlet.jsp.tagext.BodyTag`