You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Otto, Frank" <ot...@delta-barth.de> on 2008/01/23 12:18:11 UTC

struts2/dojo: duplicate events (struts 2.0.11)

hi,

I have a ajax div (div1) in another ajax div (divGrp1). I publish the event "refreshDivGrp1" to divGrp1, the div1 was recreate and the event "refreshDiv1" was subscribed twice. 
Here are the debug messages:

DEBUG: [divGrp1] Listening to refreshDivGrp1 to refresh 
DEBUG: [div1] Listening to refreshDiv1 to refresh 
DEBUG: [div1] Listening to refreshDiv1 to refresh 

Now, if the event refreshDiv1 was published, the notifyTopics of div1 will be send twice too.

My code:

<s:div theme="ajax"
               id="divGrp1"
               href="%{myURL}"
               executeScripts="true"
               listenTopics="refreshDivGrp1 "/>
	...
	<s:div theme="ajax" 
           href="%{myURL}"
           listenTopics="refreshDiv1" 
           notifyTopics="otherEvent" 
           id="div1" 
           executeScripts="true">
		...
    </s:div>   

</s:div>

If I create the div1 three or more times, the otherEvent was called three or more too.
Is this a bug of struts2/dojo? Is there a workaround?


kind regards,

frank