on 09-09-2015 10:48 PM
Hi Experts,
I am getting a javascript error (java.lang.NullPointerException) when trying to update the display template of a chart at runtime through JavaScript. We are doing this on another applet with no problems. Here is the code (for some reason SCN is now showing the code so I attached as an image):
<object id="TagChart" name="TagChart" codebase="/XMII/Classes" Code="iChart" archive="illum8.zip">
<param name="QueryTemplate" value="Base_Metals/Ontario/TestQuery">
<param name="DisplayTemplate value="Base_Metals/Ontario/TestChart">
</object>
<script type="text/javascript">
alert(document.TagChart.getDisplayTemplate()); //return the string message: Base_Metals/Ontario/TestChart
document.TagChart.setDisplayTemplate("Base_Metals/Ontario/Test2Chart"); //returns java.lang.NullPointerException
</script>
Setting the DisplayTemplate to an empty string causes no errors so maybe it has something to do with the forward slashes (/) ?
Appreciate any help on the matter.
Thank you,
Corey
Vale
MII Version: 14.0 SP6 Patch 9
Message was edited by: Corey Jackson
I solved the issue. The issue was due to an invalid display template specified to be set. If the template does not exist JavaScript will throw the exception java.lang.NullPointerException. If the template exists then no error will occur.
Corey
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
6 | |
2 | |
1 | |
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.