I have this script which I put on top of the GWT nocache.js
<head>
<script type="text/javascript" language="javascript">
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<script type="text/javascript" language="javascript" src="app/app.nocache.js"></script>
</head>
<body>
<div id="fb-root"></div>
<div id="rootPanel"></div>
</body>
And on one of the page of the my site (which I usu Errai-UI)
This is added:
HTMLPanel likebox = new HTMLPanel("<div class='fb-like-box' " +
"data-href='http://www.facebook.com/platform' data-width='595' " +
"data-show-faces='true' data-stream='true' data-header='true'></div>");
likepanel.add(likebox);
The problem I am facing is that in my GWT application, when the site lands on the page where this panel is injected, the Facebook like box doesn't get rendered, even if I look at the DOM, the <div class='like-box' ...>
is there in the DOM tree.
What works is that I need to do a full page refresh (in DevMode), on the currect page: example: /mysite#PageWithFBDiv
Also, the page refresh trick only works in DevMode but fails to do the trick when compiled.