Project: Birt
Bug 217952 Use of Resource Locator to look up resource defined in a JS Expression
Reported: 2008-02-05 21:14:11 | Status: resolved fixed

An application that embeds the BIRT engine can provide a resource locator to take care of all its resource lookup, especially since there can only be one resourceLocator per report task. This may include looking up the resource for a data file to be used in a data source connection or data set query. An user should be able to specify a JavaScript expression in the Property Binding feature to specify the use of a registered resource locator. Suggest to support a syntax like "birtresource://myfolder/a.xml" in a JavaScript expression, which during evaluation would trigger the use of the registered IResourceLocator in Model to do the file search for "myfolder/a.xml". The URL returned would then be the evaluated value of the JS expression.

Files changed in fix:
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/script/IReportContext.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/executor/ExecutionContext.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/script/internal/ReportContextImpl.java