This guide shows you how to render clickable hyperlinks in RISKSHEET cells, including links from rich text fields and custom-constructed URLs to external resources or Polarion work items.
This configuration extracts HTML content (including <a> tags) from the description field and renders it as clickable links.
The .render().htmlFor().forFrame() method chain safely converts Polarion rich text fields to HTML suitable for iframe rendering, preserving links, formatting, and images.
This creates a link that opens in a new tab, incorporating the work item ID into the URL.
Opening links in the same window (target='_self') navigates away from RISKSHEET, losing unsaved changes. Always use target='_blank' to open links in new tabs.
For linking to Polarion work items, prefer itemLink or multiItemLink column types. They provide built-in link rendering, autocomplete, and validation. Use custom serverRender links only for external resources or special formatting needs.
This Velocity template checks for null values before rendering the link.
Columns using serverRender are automatically marked as read-only. Users cannot edit cell content directly. To make the underlying field editable, add a separate column without serverRender.
When using quotes inside serverRender strings, escape them with backslashes: \"field\". Incorrect escaping breaks the JSON configuration.
serverRender executes on the server for every visible row. For risksheets with hundreds of rows, complex rendering logic can slow page load. Consider using client-side cellDecorators for performance-critical scenarios.
When users copy cells with clickable links, the clipboard contains the rendered HTML. Pasting into Excel or plain text editors may show HTML tags. Use cellDecorators if you need to preserve plain text for copy/paste.