Skip to main content
Since version 4.6.0.

How Page Parameters Work

Page parameters are standard Polarion Rich Page parameters placed on the same wiki page as the Gantt widget. When the Gantt runs in maximized mode, a Settings button appears in the toolbar that opens the Page Parameters panel, allowing users to modify parameter values without editing the wiki page. diagram
Page Parameters only work with the Lucene + Velocity query type. They do not work with pure Lucene queries. Set your Gantt query type to “Lucene + Velocity” when using page parameters.

Setup Steps

  1. Add a Page Parameters widget to the top of your wiki page
  2. Add the Gantt widget below it (keep Maximized turned OFF initially)
  3. Define your page parameters in the Page Parameters widget
  4. Reference the page parameters in your Gantt widget parameters using Velocity syntax
  5. Test that the page works correctly with the parameters
  6. Turn the Maximized option ON in the Gantt widget parameters
Once maximized, the Settings action appears in the Gantt toolbar, allowing users to modify page parameters directly from the Gantt view.

Accessing Page Parameters in Item Script

Read page parameter values in the Item Script using the config object:
config.getPageParameters().get("pageParamId");
Replace "pageParamId" with the ID of the page parameter you defined in the Page Parameters widget.

Example: Filter by Version

var versionParam = config.getPageParameters().get("version");
if (versionParam != null && wi.getType().getId() === "feature") {
    var targetVersion = wi.getValue("targetVersion");
    if (targetVersion != null && targetVersion.getId() !== versionParam) {
        task.hide = true;
    }
}

Accessing Page Parameters in Markers Script

Page parameters are also available in the Markers Script for dynamic marker filtering:
var milestoneIds = config.pageParameters.milestone;
if (milestoneIds === null) {
    milestoneIds = "";
} else {
    milestoneIds = milestoneIds.replaceAll(',', ' ');
}

var milestones = trackerService.queryWorkItems(
    "project.id:" + config.getContextProjectId()
    + " AND type:milestone AND id:(" + milestoneIds + ")", "id"
).iterator();

while (milestones.hasNext()) {
    var tp = milestones.next();
    var marker = markerFactory.addMarker();
    marker.setText(tp.getTitle());
    marker.setDate(tp.getValue('releaseDate').getDate());
    marker.setColor("blue");
}

Page Parameters Panel API

The Page Parameters panel provides methods for programmatic control:
MethodReturn TypeDescription
NextedyPageParamsApi.show()voidOpen the widget parameter editor panel.
NextedyPageParamsApi.close()voidClose the widget parameter editor panel.
NextedyPageParamsApi.load(params)voidLoad specific parameter values into the editor panel.
NextedyPageParamsApi.anyParams()BooleanReturn true if the Gantt widget has any configurable page parameters.
NextedyPageParamsApi.isVisible()BooleanReturn true if the parameter editor panel is currently open.
NextedyPageParamsApi.setHeader(text)voidSet the header text of the parameter editor panel.
The NextedyPageParamsApi methods are available on the client side for advanced customization. Typical usage relies on the built-in toolbar button rather than direct API calls.

Toolbar Button Behavior

ConditionToolbar Button
Gantt is in maximized mode AND page parameters existSettings button (gear icon) is visible
Gantt is not maximizedSettings button is hidden
MaximizeGanttView=false URL parameter is setSettings button is hidden
No page parameters defined on the wiki pageSettings button is hidden
The Page Parameters panel opens as a scrollable dialog overlay (maximum height 80% of viewport). Close it by clicking the X button or pressing Escape.

Configuration Example

A wiki page setup with a page parameter for version filtering: Page Parameters Widget: Define a parameter with ID version and type String. Gantt Widget Parameters:
  • Query: type:feature AND version:$version (Lucene + Velocity query type)
  • Maximized: ON
Item Script (optional additional filtering):
var versionParam = config.getPageParameters().get("version");
if (versionParam != null) {
    task.getFields().put("targetVersion", versionParam);
}
Gantt Config Script (display version in right-side text):
gantt.templates.rightside_text = function(start, end, task) {
    return (task.fields.targetVersion
        ? "Version: <b>" + task.fields.targetVersion + "</b>"
        : "");
};
KB ArticlesSupport TicketsSource Code
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/js/pageparams.js
  • prod-gantt-src/com.nextedy.polarion.gantt.client/cypress/e2e/view/pageparams.cy.ts
  • prod-gantt-src/com.nextedy.polarion.gantt.client/src/types/pageparams.d.ts
  • prod-gantt-src/com.nextedy.polarion.gantt/src/com/nextedy/polarion/util/WidgetPropertiesAccess.java
  • prod-gantt-src/com.nextedy.polarion.gantt/webapp/pageparams/pageparams.html