Defines a link to another page. The text of the link becomes an underline and is displayed in a different color. An image can be defined as link as well - see the example for details. The link control can be for client side eventing. See the EventValidationComponent description for more details.
· enabled - inherited from EventValidationComponent.
A boolean value that enables (=true) or disables (=false) the link control. A disabled link has a different text color to show the user that it is disabled and sends no event when clicked.
· fontSize
Sets the font size for the link.
· id
Identification name of the link.
· jsObjectNeeded - inherited from Component.
A boolean value that defines if a JavaScript object has to be generated for the link component.
· labeled
Enables or disables the notification when the control has a label assigned to it.
· linkDesign
Design definition of the link.
¡ DRAGRELATE
In link color and underlined. On "MouseOver" color different, no underline
¡ DRILLDOWN
In link color and underlined. On "MouseOver" link color brighter and underlined. "Standard" link display.
¡ FUNCTION
In link color and underlined. On "MouseOver" link color brighter and underlined. "Standard" link display.
¡ REPORTING
In link color, no underline. On "MouseOver" link color brighter and underlined.
¡ RESULT
In text color, no underline. On "MouseOver" link color brighter and underlined.
· onClick
Defines the event handling method that will be processed when the user clicks on the link. If 'onClick' is specified, the event handling routine is called.
· onClientClick
Defines the JavaScript fragment that is executed when the user clicks on the link. If both events ('onClick' and 'onClientClick') are specified, the 'onClientClick' event handling method is activated first. By default the 'onClick' event handling method is activated afterwards. In the JavaScript fragment you can cancel the activation of the 'onClick' event handling method with the command
htmlbevent.cancelSubmit=true;
The 'onClientClick' event is useful to preprocess the form and only send the form to client if the preprocessing was successful (for example, date validation, valid number format etc.) to save client/server interaction.
· reference
Specifies the address of the page/document to be opened. If the 'onClick' attribute is defined the event handling routine is started and the 'reference' string is handed to the event handling routine. The referenced document is not opened - the event handling routine has to do that.
If the 'onClick' attribute is not defined, the link is opening the referenced document.
· target
Specifies the name of the frame where the document is to be opened. The following values refer to w3c HTML-standard.
¡ _blank
The web client should load the designated document in a new, unnamed window.
¡ _self
The web client should load the document in the same frame as the element that refers to the target.
¡ _parent
The web client should load the document into the immediate FRAMESET parent of the current frame. This value is equivalent to _self if the current frame has no parent.
¡ _top
The web client should load the document into the full, original window (thus canceling all other frames). This value is equivalent to _self if the current frame has no parent.
· text
A text string that is displayed underlined and in different color. If no 'text' attribute is provided or a the 'text' attribute is set to an empty string, the link is not displayed.
· tooltip
Defines the hint of the link which is displayed as the mouse cursor passes over the link, or as the mouse button is pressed but not released.
Attributes |
M |
Values |
Usage |
enabled* |
|
FALSE
|
Taglib Classlib |
fontSize |
|
|
Taglib Classlib |
id |
* |
String (cs) |
Taglib Classlib |
jsObjectNeeded** |
|
FALSE (d) |
Taglib Classlib |
labelled |
|
FALSE (d) |
Taglib Classlib |
linkDesign |
|
DRAGRELATE |
Taglib Classlib |
reference |
|
String |
Taglib Classlib |
target |
|
_blank |
Taglib Classlib |
text |
|
String |
Taglib Classlib |
tooltip |
|
String |
Taglib Classlib |
* Method is inherited from the EventValidationComponent component. Therefor the attribute is different between the taglib and the classlib.
** Method is inherited from the Component component.
See the JavaScript API description for details how to access the component in JavaScript.
Events |
M |
Values |
Usage |
onClick |
|
String (cs)
|
Taglib Classlib |
onClientClick |
|
String (cs)
|
Taglib Classlib |
Text as link using the taglib
<hbj:link |
Text as link using the classlib
Form form = (Form) this.getForm(); |
Link to google
Image as link (and getting the resource path once - at the beginning of the JSP. This is useful when the JSP uses several images) using the taglib
<%-- Get resource url of component --%> |
Text and Image as link (and getting the resource path at the control) using the taglib
<%@ page import="com.sapportals.portal.prt.resource.IResource" %> |
Link to google