| Summary: | Add BIRT resource folder and BIRT_HOME variables in ReportContext global variable | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Linda Chan <lchan> |
| Component: | BIRT | Assignee: | Haojun Chu <hchu> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | lzhu, wyan, xxue |
| Version: | 2.2.0 | ||
| Target Milestone: | 2.3.0 M6 | ||
| Hardware: | PC | ||
| OS: | Windows 2000 | ||
| Whiteboard: | |||
|
Description
Linda Chan
The get/setGlobalVariable() method is used for user-defined global variables. For BIRT system properties, it's more user friendly if we provide getter/setter methods, e.g., get/setResourceHome(). the viewer sets the resource home in the appContext:
appContext.put("BIRT_RESOURCE_FOLDER", "c:/resources/"),
passes the appContext in the renderTask/runTask through:
task.setAppContext(appContext)
the user can get the resource in the script:
reportContext.getAppContext().get("BIRT_RESOURCE_FOLDER")
No new API needed to support this case.
|