I asking for your opinion, because right now I am struggling a lot on making appear charts when my application loads for the first time. I have read many post on the problem of SmartGwt using GWT HighCharts, but I did not find something similar to my issue. So maybe I missed it or did not understand well enough some of the problems.
I am using Smartwt and on the load of my application, I have a default screen that I wish would display one or two charts. The problem is that when for the first time (empty cache) I try it on a browser, the chart won't be displayed. To be able to see them, I need to do a refresh/F5 action to make them appear.
I tried with the modified version of the BaseChart.java too, but no concluent result as well. At first I thought about the callback in the code taking too much time to display the charts...
But when I stripped my code to have only the chart being displayed in a simple VLayout with hardcoded values in client code and having the same issue, I thought about maybe missing something else.
Does this problem speaks to you?
Regards,
Boris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried it on a deployed war on Tomcat and I am facing the same issue. I am usging Smartgwt 3 LGPL and GWT 2.4 and tried it with 2.5 rc 1 and still faced the same problem of not seeing the charts at first load.
Boris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would like to add that the problem seems to be around the 'somePanel.add(chart)' piece of code. I have added debug comments to try to track the problem. When the browser loads the app for the first time, the code seems to stop at the addition of the chart to the panel. Nothing happens after. The application works fine, but no display of chart. If I then do a refresh, the debug output clearly shows that it went through the addition part of code and after without problem and then the chart is displayed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found the problem with the help of a colleague. The fact that the charts only appeared on the reload of the client was due to the "security-applicationContext.xml" in our application. I was not very familiar with how it works. In that file, there is that line :
It means that it will intercept any url and check if the user is already logged in to deliver the content of the page. If not, the content is blocked.
The problem was that at the first attempt for loading the chart in the welcome screen, the system received a demand to display javascript on the screen, but the user was not considered as logged in, so no content was displayed. On reload, the authentification was acknowledge and it would allow the display of charts.
To correct the problem we simply add this line to the interception on url :
Hello guys,
I asking for your opinion, because right now I am struggling a lot on making appear charts when my application loads for the first time. I have read many post on the problem of SmartGwt using GWT HighCharts, but I did not find something similar to my issue. So maybe I missed it or did not understand well enough some of the problems.
I am using Smartwt and on the load of my application, I have a default screen that I wish would display one or two charts. The problem is that when for the first time (empty cache) I try it on a browser, the chart won't be displayed. To be able to see them, I need to do a refresh/F5 action to make them appear.
I tried with the modified version of the BaseChart.java too, but no concluent result as well. At first I thought about the callback in the code taking too much time to display the charts...
But when I stripped my code to have only the chart being displayed in a simple VLayout with hardcoded values in client code and having the same issue, I thought about maybe missing something else.
Does this problem speaks to you?
Regards,
Boris
Are you seeing this problem only in dev/hosted mode though? Or, are you also seeing this problem once the application is compiled?
Hello,
I tried it on a deployed war on Tomcat and I am facing the same issue. I am usging Smartgwt 3 LGPL and GWT 2.4 and tried it with 2.5 rc 1 and still faced the same problem of not seeing the charts at first load.
Boris
I would like to add that the problem seems to be around the 'somePanel.add(chart)' piece of code. I have added debug comments to try to track the problem. When the browser loads the app for the first time, the code seems to stop at the addition of the chart to the panel. Nothing happens after. The application works fine, but no display of chart. If I then do a refresh, the debug output clearly shows that it went through the addition part of code and after without problem and then the chart is displayed.
Hello,
I found the problem with the help of a colleague. The fact that the charts only appeared on the reload of the client was due to the "security-applicationContext.xml" in our application. I was not very familiar with how it works. In that file, there is that line :
<intercept-url pattern="/**" access="isAuthenticated()"/>
It means that it will intercept any url and check if the user is already logged in to deliver the content of the page. If not, the content is blocked.
The problem was that at the first attempt for loading the chart in the welcome screen, the system received a demand to display javascript on the screen, but the user was not considered as logged in, so no content was displayed. On reload, the authentification was acknowledge and it would allow the display of charts.
To correct the problem we simply add this line to the interception on url :
<intercept-url pattern="/javascript/**" filters="none"/>
This would let any javascript content to be displayed even if no authentification was made by the user.
Regards,
Boris
Last edit: Boris Chatelain 2012-11-21