Skip to main content

Access the Top Panel Template

Starting with version 25.5.0, you can edit the top panel template directly from the RISKSHEET interface:
  1. Open your RISKSHEET document
  2. Click Menu > Configuration > Edit Top Panel Configuration
  3. The built-in editor opens with syntax highlighting
Changes saved in the editor apply immediately—just reload the RISKSHEET page to see them reflected.

Alternative: Edit as Attachment

For older versions or when direct editing is unavailable:
  1. Click Menu > Document > Open Live Document
  2. Locate risksheetTopPanel.vm in the document or template attachments section
  3. Download the file, edit locally, and re-upload

Configure Displayed Fields

The top panel template uses Velocity syntax to render document custom fields and metadata.

Basic Field Display

Add document custom fields using the $!document.customFields.<fieldName> syntax:
<div class="row">
  <div class="one wide column rs-label">Item:</div>
  <div class="four wide column rs-value">$!document.customFields.item</div>
  <div class="two wide column rs-label">Owner:</div>
  <div class="four wide column rs-value">$!document.customFields.owner</div>
  <div class="two wide column rs-label">Version:</div>
  <div class="two wide column rs-value">$!document.customFields.version</div>
</div>

Layout Structure

The template uses a grid system with row and column classes: diagram Column widths must total 15 or fewer for proper layout.

Add System Fields

Display built-in Polarion document properties:
<div class="row">
  <div class="two wide column rs-label">Updated on:</div>
  <div class="two wide column rs-value">$!document.updated</div>
  <div class="two wide column rs-label">Created by:</div>
  <div class="two wide column rs-value">$!document.author</div>
</div>

Available Velocity Context

The top panel template has access to these objects:
ObjectTypeDescription
documentcom.nextedy.risksheet.model.DocumentRISKSHEET document object with custom fields
docWrapped documentEnhanced document object with Polarion API access
txReadOnlyTransactionCurrent Polarion transaction
documentIdStringDocument ID in format “spaceId/documentId”
projectIdStringCurrent project ID
trackerServiceITrackerServicePolarion tracker service for work items
securityServiceISecurityServicePolarion security service for permissions
currentDatejava.util.DateCurrent server date/time

Advanced: Add Custom Logic

Use Velocity scripting for conditional display or computed values:
#if($document.customFields.status == "approved")
  <div class="row">
    <div class="fifteen wide column" style="background-color: #eaf5e9; color: #1d5f20; padding: 8px;">
      ✅ Document Approved
    </div>
  </div>
#end

Dynamic Values from User Context

Display user-specific or role-specific information:
#set($currentUser = $securityService.getCurrentUser())
<div class="row">
  <div class="two wide column rs-label">Viewing as:</div>
  <div class="four wide column rs-value">$currentUser.name</div>
</div>
The top panel context does not provide direct access to work item objects via info.item[] syntax used in column formulas. Pre-compute values using Velocity logic and document custom fields instead.

Session Notes and Audit Trail

To capture session metadata:
  1. Create a document custom field (e.g., sessionNotes, type: String)
  2. Display it read-only in the top panel:
<div class="row">
  <div class="two wide column rs-label">Session Notes:</div>
  <div class="thirteen wide column rs-value">$!document.customFields.sessionNotes</div>
</div>
  1. Users edit the field via Menu > Document > Properties
  2. Notes appear in the RISKSHEET header after saving
Top panel templates display document custom fields as read-only text. To edit values, users must open Document Properties or use workflow actions.

Verification

After editing the template:
  1. Save your changes in the configuration editor
  2. Reload the RISKSHEET page (F5 or Ctrl+R)
  3. You should now see your custom fields displayed in the header area above the spreadsheet grid

See Also

KB ArticlesSupport TicketsSource Code
  • MaximizeViewCommand.ts
  • RisksheetViewServlet.java
  • ShowConfigurationCommand.ts
  • AppConfig.ts
  • RisksheetProjectProperties.java