LSPS documentation logo
LSPS Documentation
Link

A Link component ( ) serves to navigate away from the page on click: it is rendered as <a> with the href attribute.

The advantage of a Link over an Action Link is that you can open a target location in a new tab or window. Also you can calculate the navigation link lazily in the Click Listener expression.

The component defines the following:

  • Navigation: an expression that returns the target location as a Navigation object, for example, DocumentNavigation, TodoNavigation, UrlNavigation, etc.
      new UrlNavigation(url -> "www.whitestein.com")
    

Note: To create a link that will download a resource, use the Download component.

Opening a Link Resource in a New Window or Tab

To open the target location in a new tab or window, set the OpensNewWindow on the Link component to true by calling the setOpensNewWindow(true) method.

LinkFormNewWindow.png
A Link component that opens a new tab or window