ActionLink

Document created by resplin Employee on Jun 6, 2015Last modified by alfresco-archivist on Aug 31, 2016
Version 3Show Document
  • View in full screen mode

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



JSF Component
Back to Component Library


ActionLink


General Description


The actionLink component provides the user with a clickable link, image or both to represent an action in the UI. The component provides standard action and actionListener command properties for developers to handle user interaction.


Tag details


<string>'
  rendered='<boolean>'
  styleClass='<string>'
  style='<string>'
  value='<string>' MANDATORY
  action='<string>'
  actionListener='<method-binding>'
  image='<string>'
  verticalAlign='<string>'
  padding='<int>'
  tooltip='<string>'
  showLink='<boolean>'
  href='<string>'
  target='<string>'
  onclick='<string>'
/>

Custom tag attributes


value - the string value to display as the command link. This string is also used as the alt and title HTML attributes for any image present.

action - command outcome action value.

actionListener - command listener method binding.

image - the image path to display next to the link text.

verticalAlign - the HTML style to use when aligning the text part of the link with the image part of the link. This is needed if you specify an image and wish to align it specifically against the text.

padding - if set to an non-zero integer value, the image and link will be output inside a TABLE element with the specified padding value used as the table spacing.

showLink - if any image is specified, setting this value to false will cause the text part of the command link to be hidden, resulting in an icon action without any text displayed. The text in the value property will be used as the alt and title attributes of the specified image.

tooltip - tooltip text to be shown on the image or link.

href - if specified, will be used as an standard HREF instead of generating an action form submit. If the string 'http' is not found at the start of value, then the servlet path will be automatically prepended.

target - href target value optionally used if the href attribute is set.

onclick - JavaScript event handler called when the action is clicked.


Example


Simple Action link with action and actionListener properties specified:

  <a:actionLink value='Click Me' action='success' actionListener='#{bean.clickHandler}' />



Action link with image and text, using vertical alignment property to centre text:

  <a:actionLink value='Action Link' image='/images/Arrow.gif' verticalAlign='40%' />



Action link with no text, just an image with title/alt text instead:

  <a:actionLink value='Alt text here' image='/images/link_small.gif' showLink='false'/>

Screenshots


Simple ActionLink with a CSS style applied:

ActionLink_1.gif

ActionLink showing both a link and an image with the text vertically aligned to the image:

ActionLink_2.gif

Attachments

Outcomes