| |||||||
FRAMES NO FRAMES |
Render an HTML anchor or hyperlink
Renders an HTML <a>
element as an anchor definition (if "linkName" is specified) or as a hyperlink to the specified URL. URL rewriting will be applied automatically, to maintain session state in the absence of cookies. The content displayed for this hyperlink will be taken from the body of this tag.
The base URL for this hyperlink is based on the href attribute.
Normally, the hyperlink you specify will be left unchanged (other than URL rewriting if necessary). However, there are two ways you can append one or more dynamically defined query parameters to the hyperlink -- specify a single parameter with the paramId
attribute (and its associated attributes to select the value), or specify the property
attribute to select a SourceBean list
bean that contains one or more parameter ids and corresponding values.
To specify a single parameter, use the paramId
attribute to define the name of the request parameter to be submitted. To specify the corresponding value, specify the paramName
attribute - The named property on service context
(optionally scoped by the value of the paramScope
attribute) must identify a value that can be converted to a String.
If you prefer to specify a SourceBean list
that contains all of the request parameters to be added to the hyperlink, specify only the name
attribute - The named service context
data (optionally scoped by the value of the scope
attribute) must identify a SourceBean list
containing the parameters.
As the SourceBean list
is processed, every element is assumed to be formed by the name
and value
attributes; these respective values are used as query parameters to be appended to the hyperlink. The value associated with each SourceBean must be either a String or an object whose toString() method will be called.
Additionally, you can request that the current transaction control token, if any, be included in the generated hyperlink by setting the transaction
attribute to true
. You can also request that the href is calculated based on the alias
and aliasRelated
parameters. You can also request that an anchor ("#xxx") be added to the end of the URL that is created by any of the above mechanisms, by using the anchor
attribute.
Tag Information | |
Tag Class | it.eng.spago.taglib.html.LinkTag |
TagExtraInfo Class | None |
Body Content | JSP |
Display Name | None |
Attributes | ||||
Name | Required | Request-time | Type | Description |
accesskey | false | true | java.lang.String | The keyboard character used to move focus immediately to this element. |
alias | false | true | java.lang.String | Name of the alias to be used instead of the href attribute. |
aliasRelated | false | true | java.lang.String | String to be appended to the alias attribute if present. |
anchor | false | true | java.lang.String | Optional anchor tag ("#xxx") to be added to the generated hyperlink. Specify this value without any "#" character. |
href | false | true | java.lang.String | The URL to which this hyperlink will transfer control if activated. This hyperlink may be dynamically modified by the inclusion of query parameters, as described in the tag description. You must specify the |
indexed | false | true | boolean | Valid only inside of logic:iterate tag. If true then indexed parameter with name from indexId attribute will be added to the query string. Indexed parameter looks like "index[32]". Number in brackets will be generated for every iteration and taken from ancestor logic:iterate tag. |
indexId | false | true | java.lang.String | By this attribute different name for the indexed parameter can be specified. Take a look to the "indexed" attribute for details. |
bundle | false | true | java.lang.String | The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet.
|
linkName | false | true | java.lang.String | The anchor name to be defined within this page, so that you can reference it with intra-page hyperlinks. In other words, the value specified here will render a "name" element in the generated anchor tag. |
onblur | false | true | java.lang.String | JavaScript event handler that is executed when this element loses input focus. |
onclick | false | true | java.lang.String | JavaScript event handler that is executed when this element receives a mouse click. |
ondblclick | false | true | java.lang.String | JavaScript event handler that is executed when this element receives a mouse double click. |
onfocus | false | true | java.lang.String | JavaScript event handler that is executed when this element receives input focus. |
onkeydown | false | true | java.lang.String | JavaScript event handler that is executed when this element receives a key down event. |
onkeypress | false | true | java.lang.String | JavaScript event handler that is executed when this element receives a key press event. |
onkeyup | false | true | java.lang.String | JavaScript event handler that is executed when this element receives a key up event. |
onmousedown | false | true | java.lang.String | JavaScript event handler that is executed when this element receives a mouse down event. |
onmousemove | false | true | java.lang.String | JavaScript event handler that is executed when this element receives a mouse move event. |
onmouseout | false | true | java.lang.String | JavaScript event handler that is executed when this element receives a mouse out event. |
onmouseover | false | true | java.lang.String | JavaScript event handler that is executed when this element receives a mouse over event. |
onmouseup | false | true | java.lang.String | JavaScript event handler that is executed when this element receives a mouse up event. |
paramId | false | true | java.lang.String | The name of the request parameter that will be dynamically added to the generated hyperlink. The corresponding value is defined by the |
paramName | false | true | java.lang.String | The name of a JSP bean that is a String containing the value for the request parameter named by |
paramScope | false | true | java.lang.String | The scope within which to search for the bean specified by the |
property | false | true | java.lang.String | The name of a |
scope | false | true | java.lang.String | The scope within which to search for the bean specified by the |
style | false | true | java.lang.String | CSS styles to be applied to this element. |
styleClass | false | true | java.lang.String | CSS stylesheet class to be applied to this HTML element (renders a "class" attribute). |
styleId | false | true | java.lang.String | Identifier to be assigned to this HTML element (renders an "id" attribute). |
tabindex | false | true | java.lang.String | The tab order (ascending positive integers) for this element. |
target | false | true | java.lang.String | The window target in which the resource requested by this hyperlink will be displayed, for example in a framed presentation. |
title | false | true | java.lang.String | The advisory title for this hyperlink. |
titleKey | false | true | java.lang.String | The message resources key for the advisory title for this element. |
transaction | false | true | boolean | If set to |
useLocalEncoding | false | true | boolean | If set to |
Variables | No Variables Defined. |
| |||||||
FRAMES NO FRAMES |