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

Bug 361285

Summary: Invoke script functions namespace
Product: z_Archived Reporter: donino donino <dpardon>
Component: BIRTAssignee: Birt-ReportEngine-inbox <Birt-ReportEngine-inbox>
Status: NEW --- QA Contact: Hao Zhou <hao.zhou>
Severity: normal    
Priority: P3 CC: bluesoldier
Version: 3.7.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
A simple example report using invoke scripts none

Description donino donino CLA 2011-10-18 14:02:23 EDT
Created attachment 205447 [details]
A simple example report using invoke scripts

When the chart interactivity "invoke script" feature is used, this kind of html code is generated by Birt Engine:

<Script>function userCallBack1318885099(evt,categoryData, valueData, valueSeriesName, legendItemText, legendItemValue, axisLabel)
  {ShowEventData(evt, categoryData, valueData, valueSeriesName, legendItemText, legendItemValue, axisLabel);
};
</Script>

If the API HTMLRenderOption.setHTMLIDNamespace(String namespace) is enabled, all html elements are namespaced except these 'userCallBack' scripts.

So in a portlet context, if several instances of a report are aggregated on a single page, using invoke scripts lead to unexpected behavior since all usercallback functions have the same name. 

userCallBack functions should be namespaced when HTMLRenderOption.setHTMLIDNamespace is used , just like other DOM elements generated.