[
https://issues.apache.org/struts/browse/WW-1755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40242
]
Thaddeus Foudray commented on WW-1755:
--------------------------------------
notifyTopics performs a different function than onLoad. notifyTopics
occurs before the div is loaded into the page, and topics that are
notified cannot manipulate the content of a bindDiv. That is, elements
contained in a bindDiv are not accessible in functions that are
subscribed to a notifyTopic on the bindDiv.
The notify occurs at two times, currently: before the div gets loaded,
and after the div gets loaded, but before it gets placed on the page.
If onLoad really is going away, a new notification will need to be added
after the bindDiv's new content has actually been set to provide the
same functionality as the onLoad function.
> 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.