Skip to main content

Widget Embedding Overview

When you add a RISKSHEET widget to a Polarion page, you configure it through Polarion’s page component editor. Parameters control:
  • Which document to display
  • Which revision to show (current or historical)
  • Read-only mode enforcement
  • Configuration file loading strategy
  • Display preferences and column visibility
diagram

Core Widget Parameters

Document Selection

ParameterTypeRequiredDefaultDescription
documentIdstringNoCurrent documentPolarion document ID or location path to display (e.g., Safety/FMEA-2024, DOCID-12345). When omitted, shows the document where the widget is embedded. For remote documents, use projectId!documentLocation format.
projectIdstringNoCurrent projectPolarion project identifier containing the target document. Required only if displaying a document from a different project.
documentLocationstringNo(from documentId)Alternative way to specify document using folder path (e.g., Risks/Risk Specification). Use either documentId or documentLocation, not both.

Revision Control

ParameterTypeRequiredDefaultDescription
revisionstringNo(current)Specific document revision identifier to display. When specified, the RISKSHEET automatically enters read-only mode. Example: v2.1, rev-2024-01-15. Leave empty for the latest version.
comparingTostringNo(none)Revision ID to compare against the main revision. When specified, enables side-by-side baseline comparison showing which items changed between revisions.

Configuration and Behavior

ParameterTypeRequiredDefaultDescription
readonlybooleanNofalseForces the RISKSHEET into read-only mode regardless of user permissions or revision. Useful for embedded views where editing should be prevented.
configPathstringNo(auto-resolved)Path to a custom risksheet.json configuration file. If omitted, the system searches: document attachment → document template → global configuration. Use this to override the default configuration resolution.
configScopestringNodocumentScope for loading configuration: document (use document config), template (use template config), or global (use global configuration only). Controls which level of the configuration hierarchy to use.

Display Preferences

ParameterTypeRequiredDefaultDescription
hiddenColumnsstringNo(none)Comma-separated list of column IDs to initially hide. Users can unhide these columns through the column visibility menu. Example: severity,occurrence,detection
visibleColumnsstringNo(all)Comma-separated list of column IDs to show. When specified, all other columns are hidden by default. Opposite of hiddenColumns.
initialSortstringNo(from config)Column ID to sort by on initial load, with optional ~ prefix for descending order. Example: ~severity (descending), dueDate (ascending).
pageSizenumberNo25Number of rows to display per page when pagination is enabled. Valid values: 10, 25, 50, 100.

Access Control

ParameterTypeRequiredDefaultDescription
allowExportbooleanNotrueControls whether users can export data to Excel or PDF. When false, export buttons are hidden.
allowEditbooleanNotrueControls whether edit operations (create, modify, delete) are enabled. When false, enforces read-only mode programmatically.
allowCreatebooleanNotrueControls whether users can create new risk items. When false, the “Insert Row” and “Create New” options are hidden.
requireApprovalbooleanNofalseWhen true, enforces that all changes must be approved before saving. Shows approval workflow UI elements.

Performance and Behavior

ParameterTypeRequiredDefaultDescription
lazyLoadbooleanNofalseDefers loading the RISKSHEET until the widget becomes visible. Improves initial page load performance on pages with multiple widgets.
enableCachebooleanNotrueCaches RISKSHEET data in the browser. When false, all data is fetched fresh from the server on each load.
refreshIntervalnumberNo0 (disabled)Milliseconds between automatic data refresh from server. Use for live data views. Example: 30000 (refresh every 30 seconds). When 0, no automatic refresh occurs.
debugModebooleanNofalseEnables diagnostic logging and performance metrics in the browser console.

Parameter Examples

Example 1: Embedded Current Document

Embed the RISKSHEET for the current document in read-only mode:
documentId=
readonly=true
When documentId is empty, the widget displays the document where it is embedded.

Example 2: Remote Document View

Display a risk document from a different project:
projectId=SAFETY
documentId=Risk Analysis/FMEA-2024
revision=
readonly=false

Example 3: Baseline Comparison

Show baseline differences between two revisions:
documentId=Safety/FMEA-2024
revision=v2.0
comparingTo=v1.5
readonly=true
allowEdit=false
This displays version 2.0 alongside version 1.5, highlighting changes with visual indicators.

Example 4: Custom Configuration

Use a specific configuration file different from the template:
documentId=Safety/FMEA-2024
configPath=Templates/AdvancedFMEA/risksheet.json
visibleColumns=id,title,severity,occurrence,detection,rpn
hiddenColumns=custom1,custom2
readonly=false

Example 5: Lightweight Embedded View

Display a minimal read-only summary in a dashboard:
documentId=Risks/Risk-Register
readonly=true
allowEdit=false
allowCreate=false
allowExport=false
visibleColumns=id,title,severity,status
pageSize=10

Parameter Resolution Matrix

This matrix shows which parameter takes precedence when multiple options are specified:
ConflictWinnerNotes
documentId vs documentLocationdocumentIdSpecify one or the other, not both
hiddenColumns vs visibleColumnsvisibleColumnsWhen both are specified, visibleColumns takes precedence
readonly vs allowEdit=falseBoth applyBoth enforce read-only, combining restrictions
Widget configPath vs document attachmentWidget configPathExplicit widget parameter overrides auto-resolution
revision specified vs readonly=falseHistorical revision always read-onlyViewing any past revision automatically enforces read-only

Configuration Resolution Flow

When you specify a widget, the system resolves configuration in this order:
PriorityConfiguration Source
1 (highest)Widget Parameter: configPath (if specified)
2Document Configuration: risksheet.json on target document
3Template Configuration: risksheet.json on document template
4Global Configuration: Project-level properties
5 (fallback)Built-in Defaults: Hardcoded defaults in RISKSHEET
The first configuration found is used; lower levels are only checked if not found above.

Widget Instance Isolation

Each widget instance maintains its own:
  • Column visibility settings (not shared across page refreshes unless persisted)
  • Sort order and filter state
  • Scroll position
  • Expanded/collapsed hierarchy levels
  • Current selection
Widget state is session-based and lost when the Polarion session ends or the page is closed. To persist view preferences, configure them as widget parameters rather than relying on user-selected settings.
When displaying documents from different projects, ensure the user has appropriate read (or edit) permissions in the source project. The projectId parameter identifies the project context; permissions are still validated by Polarion.

Best Practices

ScenarioRecommendation
Dashboard Summary ViewSet readonly=true, allowCreate=false, use visibleColumns to show key fields only
Historical ReviewSpecify revision parameter; system automatically enforces read-only
Embedded EditorLeave parameters minimal; use configuration files for detailed settings
Multi-Project ViewUse projectId!documentLocation notation; validate user permissions in source project
Performance-Critical PageEnable lazyLoad=true and consider pageSize=10 for initial load speed
Real-Time MonitoringSet refreshInterval=30000 (adjust based on data change frequency)
See also:
Source Code
  • AppConfigParser.ts
  • RiskItemsODataCollectionView.ts
  • SheetConstants.ts
  • IReview.java
  • SystemConsts.java