Create a Computed Property
Add a server-rendered property to your domain model that computes its value dynamically from work item data, related entities, or platform services.
Use Velocity Templates
Write Velocity template expressions that access work item fields, document context, and the full set of context variables available during rendering.
Access Polarion Services
Call Polarion platform services such as
$trackerService, $repositoryService, and $securityService from within your Velocity templates for advanced queries and permission checks.Debug Template Errors
Diagnose and resolve common rendering failures including parse errors, missing variables, method invocation exceptions, and the
#SERVER_RENDER_ERROR marker.How Server Rendering Works
The following diagram shows how a server-rendered property flows from configuration to display.serverRender definition, the server API evaluates the Velocity template for each entity row. The template receives a pre-populated context containing the current work item, document, transaction, and injected Polarion services. The evaluated result is returned as the property value and displayed in the sheet column.
| Context Variable | Type | Description |
|---|---|---|
$item | ModelObject | Current work item with access to all properties |
$wi | IWorkItem | Low-level Polarion work item API (work items only) |
$module | IModule | Current LiveDoc document context (null for non-document entities) |
$context | IDatabridgeContext | Server API context with project and query capabilities |
$tx | Transaction | Current transaction for scoped read operations |
$trackerService | ITrackerService | Query work items, run Lucene searches, access tracker metadata |
$repositoryService | IRepositoryService | Access project metadata, users, and repository configuration |
$securityService | ISecurityService | Check permissions and enforce role-based visibility |
Related Resources
- Server Rendering Reference — complete property and context variable reference
- Use Velocity Templates — step-by-step guide to writing your first template
- Configure Dynamic Expressions — client-side
() =>expressions as an alternative to server rendering
Sources
Sources
Source Code
ServerRenderer.javaServerRendererTest.javaProperty.javaDataPropertyFactory.javaQueryDataTest.java