jp.terasoluna.fw.web.struts.taglib
Class LinkTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.apache.struts.taglib.html.BaseHandlerTag
              extended by org.apache.struts.taglib.html.LinkTag
                  extended by jp.terasoluna.fw.web.struts.taglib.LinkTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class LinkTag
extends org.apache.struts.taglib.html.LinkTag

Extended link tag.

Extends <html:link> tag which is provided by Struts. Adds random ID to action URL to avoid caching. indexed attribute and indexId attribute becomes valid only when LinkTag is used in BODY of iterateTag This iterateTag is not nested.


Attribute supported by tag

Refer to API of <html:link> tag.


Scripting variable of custom tag

Refer to API of <html:link> tag.


How to use

Refer to API of <html:link> tag.

See Also:
Serialized Form

Field Summary
private static org.apache.commons.logging.Log log
          Log class.
private static java.lang.String RANDOM_ID_KEY
          Parameter name of random ID to avoid caching.
private static long serialVersionUID
          Serial version ID
 
Fields inherited from class org.apache.struts.taglib.html.LinkTag
action, anchor, forward, href, indexId, linkName, messages, module, name, page, paramId, paramName, paramProperty, paramScope, property, scope, target, text, transaction, useLocalEncoding
 
Fields inherited from class org.apache.struts.taglib.html.BaseHandlerTag
accesskey, defaultLocale, doDisabled, doReadonly, indexed, tabindex
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
LinkTag()
           
 
Method Summary
protected  java.lang.String calculateURL()
          Adds random ID to URL for avoiding caching.
 
Methods inherited from class org.apache.struts.taglib.html.LinkTag
doAfterBody, doEndTag, doStartTag, getAction, getAnchor, getForward, getHref, getIndexId, getLinkName, getModule, getName, getPage, getParamId, getParamName, getParamProperty, getParamScope, getProperty, getScope, getTarget, getTransaction, isUseLocalEncoding, release, setAction, setAnchor, setForward, setHref, setIndexId, setLinkName, setModule, setName, setPage, setParamId, setParamName, setParamProperty, setParamScope, setProperty, setScope, setTarget, setTransaction, setUseLocalEncoding
 
Methods inherited from class org.apache.struts.taglib.html.BaseHandlerTag
doErrorsExist, getAccesskey, getAlt, getAltKey, getBundle, getDisabled, getElementClose, getErrorKey, getErrorStyle, getErrorStyleClass, getErrorStyleId, getIndexed, getIndexValue, 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, 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
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial version ID

See Also:
Constant Field Values

log

private static org.apache.commons.logging.Log log
Log class.


RANDOM_ID_KEY

private static final java.lang.String RANDOM_ID_KEY
Parameter name of random ID to avoid caching.

See Also:
Constant Field Values
Constructor Detail

LinkTag

public LinkTag()
Method Detail

calculateURL

protected java.lang.String calculateURL()
                                 throws javax.servlet.jsp.JspException

Adds random ID to URL to avoid caching.

Since there is no hotspot, LinkTag.calculate() code of Struts 1.2.4 is copied and changed. Please note that when Struts version changes, review is required.

Overrides:
calculateURL in class org.apache.struts.taglib.html.LinkTag
Returns:
Process control instructions
Throws:
javax.servlet.jsp.JspException - When error has occurred