• Settings
    • Locale
    • Change the locale of the datepicker, schedule and client side validation messages.

      Language
      English
      English
      English
      French
      German
      German
      German
      Italian
      Korean
      Spanish
      Catalan
      Dutch
      Portuguese
      Portuguese
      Arabic
      Arabic
      Bulgarian
      Bangla
      Bosnian
      Czech
      Greek
      Estonian
      Persian
      Finnish
      Danish
      Hindi
      Indonesian
      Icelandic
      Croatian
      Japanese
      Hungarian
      Hebrew
      Georgian
      Central Kurdish
      Khmer
      Kyrgyz
      Kazakh
      Lithuanian
      Latvian
      Malay
      Norwegian
      Polish
      Romanian
      Russian
      Slovak
      Slovenian
      Serbian
      Serbian
      Swedish
      Thai
      Turkish
      Ukrainian
      Uzbek
      Vietnamese
      Chinese
      Chinese
  • Resources

Link Button

LinkButton is a link element that is rendered as a button and used as a navigation component based on GET requests targeting bookmarkable URLs.

LinkButton Tag Documentation

LinkButton is a styled link component with button-like appearance and icon support.

NameTypeRequiredDefaultDescription
id String false generated Unique identifier of the component in a namingContainer.
rendered boolean false true Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding UIComponent false generated An EL expression referring to a server side UIComponent instance in a backing bean.
widgetVar String false generated ('widget_' + componentClientId) Name of the client side widget.
accesskey String false Access key to transfer focus to the input element.
ariaLabel String false Defines a string value that labels the current element for accessibility.
charset String false
converter Converter false EL expression resolves to a converter instance or literal converter ID defining a component converter.
coords String false
dir String false Direction indication for text that does not inherit directionality.
disableClientWindow boolean false false Disable appending the on the rendering of this element.
disabled boolean false false Specifies that an element should be disabled.
escape boolean false true Escapes HTML content in the link text.
fragment String false Identifier of the target page which should be scrolled to.
href String false Resource to link to.
hreflang String false
icon String false Icon of the button.
iconPos String false left Position of the icon, valid values are "left" and "right".
includeViewParams boolean false false Whether to include page parameters in target URI.
lang String false
onblur String false Fires when an element loses focus.
onclick String false Fires when a mouse click on the element.
ondblclick String false Fires when a mouse double-click on the element.
onfocus String false Fires when an element gets focus.
onkeydown String false Fires when a user is pressing a key.
onkeypress String false Fires when a user presses a key.
onkeyup String false Fires when a user releases a key.
onmousedown String false Fires when a mouse button is pressed down on an element.
onmousemove String false Fires when the mouse pointer is moving while it is over an element.
onmouseout String false Fires when the mouse pointer moves out of an element.
onmouseover String false Fires when the mouse pointer moves onto an element.
onmouseup String false Fires when a mouse button is released over an element.
outcome String false Used to resolve a navigation case.
rel String false
rev String false
role String false
shape String false
size String false Defines the size of the button, valid values are "small" and "large".
style String false Specifies an inline CSS style for an element.
styleClass String false Specifies one or more CSS class names for an element.
tabindex String false Specifies the tab order of an element.
target String false
title String false Specifies extra information about an element (displayed as a tooltip).
type String false
value Object false Value of the component.
Loading...
Tag DocumentationNew DocumentationNew Documentation JSDoc

Usage


<style>
    body .ui-button.ui-linkbutton {
        margin-right: 1rem;
    }
</style>

<div class="card">
    <p:linkButton outcome="productDetail" value="Bookmark">
        <f:param name="productId" value="10"/>
    </p:linkButton>

    <p:linkButton outcome="productDetail" value="Bookmark new tab" target="_blank">
        <f:param name="productId" value="10"/>
    </p:linkButton>

    <p:linkButton outcome="productDetail" value="With Icon" icon="pi pi-star">
        <f:param name="productId" value="20"/>
    </p:linkButton>

    <p:linkButton outcome="productDetail" icon="pi pi-star" title="Icon Only">
        <f:param name="productId" value="30"/>
    </p:linkButton>

    <p:linkButton outcome="productDetail" value="With Icon" disabled="true">
        <f:param name="productId" value="40"/>
    </p:linkButton>

    <p:linkButton outcome="productDetail" value="Bookmark" icon="pi pi-star" disabled="true">
        <f:param name="productId" value="50"/>
    </p:linkButton>

    <p:linkButton outcome="productDetail" icon="pi pi-star" disabled="true" title="Icon Only">
        <f:param name="productId" value="60"/>
    </p:linkButton>
    
    <h5 id="sizes">Sizes</h5>
    <p:linkButton outcome="productDetail" value="Small" size="small"/>
    <p:linkButton outcome="productDetail" value="Normal"/>
    <p:linkButton outcome="productDetail" value="Large" size="large" />
</div>