Server Rendering Context
When a property is configured withserverRender, the server evaluates the expression using Velocity templates with automatically injected Polarion services. These services are available as context variables in all server-rendered expressions.
Injected Polarion Services
| Service Variable | Purpose | Common Use Cases |
|---|---|---|
$trackerService | Access work item data | Querying work items, running Lucene queries, accessing tracker metadata |
$txService | Transaction management | Understanding execution context, managing Polarion transactions |
$repositoryService | Repository-level operations | Accessing project metadata, users, roles, repository configuration |
$securityService | Permission checking | Checking user permissions, role-based visibility, enforcing security constraints |
Server-Rendered Property Configuration
Properties configured withserverRender in the domain model are evaluated on the server before being sent to the client. This affects both how the property value is computed and its editability.
Property Definition
| Name | Type | Default | Description |
|---|---|---|---|
name | string | Required | Property name exposed in the Powersheet client |
serverName | string | Same as name | Override for the actual Polarion field name when it differs from the client-facing name |
customFieldName | string | null | Polarion custom field ID for properties stored in custom fields |
type | string | See application | Data type of the property (string, integer, date, enum, etc.) |
storage | string | See application | How the property value is persisted in Polarion |
readable | boolean | true | Controls whether the property can be read by clients |
updatable | boolean | true | Controls whether the property can be modified by clients |
scalar | boolean | true | Whether property holds a single value (true) or collection (false) |
Velocity Template Context Variables
Server-rendered expressions have access to these context variables during template execution:| Variable | Description |
|---|---|
$item | The current work item being rendered |
$tx | The current transaction context |
$context | The query context including project, document, and parameters |
$pObject | The Polarion persistent object reference |
Service Usage Patterns
Tracker Service
Use$trackerService to query work items, access tracker metadata, and run Lucene queries within server-rendered expressions.
Security Service
Use$securityService to implement role-based visibility and conditional content in server-rendered fields.
Repository Service
Use$repositoryService to access project metadata, user information, and repository configuration.
Security Considerations
Server-rendered properties interact with the Powersheet security model:| Aspect | Behavior |
|---|---|
| Editability | Server-rendered fields are always read-only in the client |
| Permission inheritance | Entity-level readable/updatable settings intersect with property-level settings |
| System read-only fields | id, outlineNumber are always read-only regardless of configuration |
The exact list of available service methods depends on the Polarion server version. Consult the Polarion SDK documentation for the full API reference of each injected service.
Complete YAML Example
Related Pages
- Velocity Templates — Template syntax and expression language
- Context Variables — All variables available in server rendering context
- Polarion Services — Detailed reference for each injected service
- Computed Properties — Patterns for server-computed values
- Properties — Domain model property configuration
- Permissions — Security model for properties and entities
Sources
Sources
Source Code
Property.javaprod-powersheet-src/com.nextedy.powersheet.client/ltc-repo/packages/common/types/domain/document.tsServerRendererTest.javaweb.xmlDataPropertyFactory.java