• 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

CommandLink

CommandLink is an action component to process forms and invoke listeners remotely.

CommandLink Tag Documentation

CommandLink extends standard Faces commandLink with extra PrimeFaces capabilities.

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.
action MethodExpression false A method expression or a string outcome to process when command is executed.
actionListener ActionListener false An action listener to process when command is executed.
ajax boolean false true Specifies the submit mode, when set to true (default), submit would be made with Ajax.
ariaLabel String false The aria-label attribute is used to define a string that labels the current element for accessibility.
async boolean false false When set to true, ajax requests are not queued.
charset String false
coords String false
delay String false If less than delay milliseconds elapses between calls to request() only the most recent one is sent and all other requests are discarded. If this option is not specified, or if the value of delay is the literal string 'none' without the quotes, no delay is used.
dir String false Direction indication for text that does not inherit directionality.
disableOnAjax boolean false true If true, the button will be disabled during Ajax requests triggered by the button.
disabled boolean false false Specifies that an element should be disabled.
form String false The enclosing form Form to serialize for an ajax request.
global boolean false true Global ajax requests are listened by ajaxStatus component, setting global to false will not trigger ajaxStatus.
hreflang String false
ignoreAutoUpdate boolean false false If true, components which autoUpdate="true" will not be updated for this request. If not specified, or the value is false, no such indication is made.
ignoreComponentNotFound boolean false false If true, unresolvable components (ComponentNotFoundException) referenced in the update/process attribute are ignored.
immediate boolean false false When set true, process validations logic is executed at apply request values phase for this component.
lang String false
onblur String false Fires when an element loses focus.
onclick String false Fires when a mouse click on the element.
oncomplete String false Client-side javascript callback to execute when ajax request is completed.
ondblclick String false Fires when a mouse double-click on the element.
onerror String false Client-side javascript callback to execute when ajax request fails.
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.
onstart String false Client-side javascript callback to execute before ajax request begins.
onsuccess String false Client-side javascript callback to execute when ajax request succeeds.
partialSubmit boolean false false Enables serialization of values belonging to the partially processed components only.
partialSubmitFilter String false Selector to use when partial submit is on, default is ":input" to select all descendant inputs of a partially processed components.
process String false Component(s) to process in partial request.
rel String false
resetValues boolean false false If true, local values of input components to be updated within the ajax request would be reset.
rev String false
role String false
shape String false
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
timeout int false 0 Timeout in milliseconds for ajax request, whereas 0 means no timeout.
title String false Specifies extra information about an element (displayed as a tooltip).
type String false
update String false Component(s) to update with ajax.
validateClient boolean false false When set to true client side validation is enabled, global setting is required to be enabled as a prerequisite.
value Object false Value of the component.
Loading...
Tag DocumentationNew DocumentationNew Documentation JSDoc
Basic
Ajax PostRegular PostDisabled
Disable on Ajax
Sleep

Usage


<div class="card">
    <h:form>
        <p:growl id="growl" life="2000"/>

        <h5 class="mt-0">Basic</h5>
        <p:commandLink id="ajax" update="growl" action="#{buttonView.buttonAction}" class="mr-4"
                       value="Ajax Post"/>

        <p:commandLink id="nonAjax" action="#{buttonView.buttonAction}" class="mr-4" ajax="false"
                       value="Regular Post"/>

        <p:commandLink id="disabled" action="#{buttonView.buttonAction}" disabled="true"
                       value="Disabled"/>

        <h5>Disable on Ajax</h5>
        <p:commandLink id="disableOnAjax" action="#{buttonBasicView.sleep()}" value="Sleep"/>

    </h:form>
</div>