ArticlesTutorialsInterview Questions & AnswersCertificationsFree Books & Sample ChaptersTechnical Discussions  Your Account | Advertise with us | Feedback |
Few pages of this site are under construction and we are constantly trying to improve it. If you have any suggestions or ideas about how to improve the site, please Let us know.
JSF tag reference - h:outputLink

« h:outputLabel JSF Tag Home h:outputText »

<h:outputLink>

Contents
  1. Description
  2. Example
  3. Tag Attributes
  4. Code Generator


h:outputLink Description

The outputLink tag is used to render a hyperlink that, when clicked, loads another page but does not generate an action event. You should use this tag instead of the commandLink tag if you always want the URL (specified by the outputLink tag’s value attribute) to open and do not have to perform any processing when the user clicks on the link.

  • Use <h:outputLink> tag to create a regular link.
  • Specify the value attribute to populate the generated href for <a> tag.
  • The text in the body of the outputLink tag identifies the text the user clicks.
  • Alternatively, you can add a <h:outputText> child to add the text for the link.
  • Use a <f:verbatim> child instead, for HTML text content.
  • Also see h:commandButton &  t:commandLink.



h:outputLink Example


Code Output
<h:outputLink value="http://developersbook.com">
   <f:verbatim>Visit Us..</f:verbatim>
</h:outputLink>
Visit Us..

h:outputLink Attributes


Attribute Description Type
id
The unique identifier value for this component. The value must be unique within the closest naming container (e.g.,h:form or f:subview).This value must be a static value.
String
binding
The value-binding expression linking this component tag to a backing bean property.
String
rendered
A boolean value that indicates whether this component should be rendered.Default value: true.
String
value
The value attribute sets the current value for this component.
String
converter
Sets the converter instance to be registered for this component. It must match the converter-id value of a converter element defined in your Faces configuration file.
String
dir
The dir attribute is a standard HTML attribute that overrides the default text directionality for this component. The values accepted for this component are "LTR" (left-to-right) and "RTL" (right-to-left).
String
lang
Code describing the language used in the generated markup for this component
String
style
The style attribute sets the CSS style definition to be applied to this component when it is rendered.
String
title
An advisory title for this element. Often used by the user agent as a tooltip.
String
styleClass
The styleClass attribute sets the CSS class to apply to this component when it is rendered.
String
onclick
Sets the JavaScript code to execute when the mouse pointer is clicked over this element.
String
ondblclick
Sets the JavaScript code to execute when the mouse pointer is double-clicked over this element.
String
onmousedown
Sets the JavaScript code to execute when the mouse pointer is pressed down over this element.
String
onmouseup
Sets the JavaScript code to execute when the mouse button is released over this element.
String
onmouseover
Sets the JavaScript code to execute when the mouse pointer is moved onto this element.
String
onmousemove
Sets the JavaScript code to execute when the mouse pointer is moved within this element.
String
onmouseout
Sets the JavaScript code to execute when the mouse pointer is moved away from this element.
String
onkeypress
Sets the Javascript code to execute when a key is pressed and released over this element.
String
onkeydown
Sets the Javascript code to execute when a key is pressed down over this element.
String
onkeyup
Sets the Javascript code to execute when a key is released over this element.
String
onblur
Sets the Javascript code to execute when this element loses focus.
String
onfocus
Sets the Javascript code to execute when this element receives focus.
String
accesskey
The accesskey attribute is a standard HTML attribute that sets the access key that transfers focus to this element when pressed.
String
charset
The character encoding of the resource linked to by this hyperlink.
String
tabindex
The tabindex attribute is a standard HTML attribute that sets the order in which this element receives focus when the user cycles through the elements using the TAB key. The value for this attribute must be an integer between 0 and 32767.
String
type
The type attribute specifies the HTML content type associated with the resource pointed to by this hyperlink.
String
hreflang
The language of the resource link to by this hyperlink.
String
target
Name of a frame where the resource retrieved via this hyperlink is to be displayed.
String
coords
The coords attribute sets the position and shape of the hotspot on the screen when using this link with a client-side image map.
String
More »» Code Generator
« h:outputLabel JSF Tag Home h:outputText »
Test

  ALSO SEE :

About Us | Our Mission | Terms of use | Author Terms |    Search        | Contact Us | Advertise With Us | Link to Us | Sitemap
Copyright © 2016 developersBOOK.COM. All rights reserved.