[
https://issues.apache.org/struts/browse/WW-1755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40309
]
Thaddeus Foudray commented on WW-1755:
--------------------------------------
Well, I took a look as well, and you're right, this problem is 100% dojo.
In the meantime, I created a workaround like the following:
function myrefresh(){
var widget=dojo.widget.byId("dojo");
widget.addOnLoad(function(){alert("refresh!");});
widget.refresh();
};
Then, instead of calling refresh directly, call myrefresh().....
Basically, the refresh itself needs to re-init the _onLoadStack. This
test has the alert on every refresh for both ContentPane and BindDiv,
even when the BindDiv is refreshed via listening to a topic.
I'd consider this resolved from the struts point of view, and I'll check
with the dojo folks directly, and see if they have anything to say about it.
Thanks for looking into this.
~Thaddeus Foudray
> dojo binddiv fails to load onLoad functions on refresh.
> -------------------------------------------------------
>
> Key: WW-1755
> URL: https://issues.apache.org/struts/browse/WW-1755
> Project: Struts 2
> Issue Type: Bug
> Components: Misc
> Affects Versions: 2.0.5
> Environment: N/A
> Reporter: Thaddeus Foudray
> Assigned To: Musachy Barroso
>
> The binddiv (extending the dojo ContentPane widget) has a method called
> "onLoad" that triggers events after the entire div has been loaded
> completely. This allows functions to be added that do things to the loaded
> content. (added via "addOnLoad", also in ContentPane).
> In the BindDiv implementation, the first load of the page properly runs the
> onLoad function, and correctly triggers any functions there. However, the
> refresh function ( reloadContents) does not call onLoad. The superclass
> (ContentPane) does call onLoad in _downloadExternalContent(), which is called
> by the contentPane's refresh function, so it seems like that behavior should
> be duplicated in the binddiv widget.
> After a quick look, the reloadContents exists in bind.js, and the handler
> (Line ~225) is what should be calling the inLoad (to mirror what the
> ContentPane does), although I haven't tested this theory at all.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.