on 07-31-2014 4:12 PM
Hi Friends,
I would like to pass a parameter value to the QueryTemplate of my i5Chart object. I am using the below code for this. Please let me know if I am doing the right way. I am facing a javascript error while loading the page.
I am on MII version 14.0 SP4 Patch
Java script error
Message: oDomRef must not be null
Line: 141
Char: 19642
Code: 0
URI: http://hostname:50000/sapui5/resources/sap-ui-core.js
Here is the code snippet
<SCRIPT>
var addProps = '{"QueryTemplate":"PI_Report_Builder/Xacute_PcoData_Qry","DisplayTemplate":"PI_Report_Builder/PI_Report_Chart","Applet":"i5Chart","Height":"600","Width":"800","Content-Type":"image/png"}';
var c = new com.sap.xmii.chart.hchart.i5Chart('PI_Report_Builder/PI_Report_Chart','PI_Report_Builder/Xacute_PcoData_Qry',addProps);
c.getQueryObject().setParameter("Param.1","BA:PHASE.1");
c.refresh();
c.draw('content');
</SCRIPT>
Thanks
Shaji Chandran
Hi Shaji,
The order of the js code is an issue, you are supposed to call refresh() only after draw() has been called.
i.e., the below should work fine:
<SCRIPT>
var addProps = '{"QueryTemplate":"PI_Report_Builder/Xacute_PcoData_Qry","DisplayTemplate":"PI_Report_Builder/PI_Report_Chart","Applet":"i5Chart","Height":"600","Width":"800","Content-Type":"image/png"}';
var c = new com.sap.xmii.chart.hchart.i5Chart('PI_Report_Builder/PI_Report_Chart','PI_Report_Builder/Xacute_PcoData_Qry',addProps);
c.getQueryObject().setParameter("Param.1","BA:PHASE.1");
c.draw('content');
c.refresh(); //refresh() should be called only after draw()
</SCRIPT>
The way you are trying to pass parameter to the query template object also looks fine.
Also, is there any specific reason for the order that you have for the js code.
Please try and let me know.
Thanks and Best Regards,
Ria
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Which version of the UI5 library do you have deployed on your MII instance. This is visible in the NetWeaver System Information -> Components Info
Then filter the Name column with UI5
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.