Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 217952

Summary: Use of Resource Locator to look up resource defined in a JS Expression
Product: z_Archived Reporter: Linda Chan <lchan>
Component: BIRTAssignee: Haojun Chu <hchu>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: qaautoed, wyan, xwang
Version: 2.2.0   
Target Milestone: 2.3.0 M6   
Hardware: PC   
OS: Windows 2000   
Whiteboard: Autoed

Description Linda Chan CLA 2008-02-05 21:14:11 EST
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.
Comment 1 Wei Yan CLA 2008-02-18 02:55:55 EST
I think it is better to impelment following API in the IReportContext

URL getResources(String resourceName)
Comment 2 Haojun Chu CLA 2008-03-03 04:29:46 EST
Add "URL getResource(String resourceName);" to IReportContext.

Customer call the above function to locate their resources.
Comment 3 Xiaodan Wang CLA 2008-03-14 04:51:26 EDT
Verified in build (2.3.0.v20080314-1122).