Skip to content Skip to sidebar Skip to footer

Is There A Working Dojo TabContainer Can Successfully Reload In A ContentPane?

I am not lazy but have tried many ways try to reload a div(id=refreshable) which contains a dojo TabContainer(id=dojoTabbedPane). Each time after reloading the page all content in

Solution 1:

Its a question regarding jQuery, whether or not load has allready set innerHTML of the #replaceable at the time the complete callback runs.. But simply uncomment the timeout lines to 'unhook' and let load mechanism finish before calling parser. So try this:

<div id="replaceable">

</div>

<script>
function refresh_data(url, id) {

  var w = dijit.byId("dojoTabbedPane"),
      domNode = dojo.byId(id);
  if(w)  w.destroyRecursive();

  j(domNode).load(url+' #'+id+' > *', function (response) {
      // setTimeout(function() {
         dojo.parser.parse(domNode);
         w = dijit.byId("dojoTabbedPane");
         w.resize(dojo.getMarginBox(domNode));
      // }, 200);

  });
}

dojo.addOnLoad(function() {
    var login_url = '<spring:url value="/login" />';
    setInterval('refresh_data("file:///D:/Dojo/dojo.tabbed.pane_very_good.html?hash="+Math.random(), "refreshable");', 9000); 
});
</script>

Post a Comment for "Is There A Working Dojo TabContainer Can Successfully Reload In A ContentPane?"