You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pro1712 <Pr...@yahoo.de> on 2008/10/08 13:19:50 UTC

Problem with events

Hi!

Im using Struts 2.1.2.

Here is my code:

Javascript:

dojo.event.topic.subscribe("/beforeIntern", function(event, widget)
{alert('before ' + widget);});
dojo.event.topic.subscribe("/afterIntern", function(data, request, widget)
{alert('after ' + widget);});

JSP:

<sx:submit id="ajaxReloadIntern"
	type="image"
	targets="Intern"
	src="pages/img/app/Go.gif"
	executeScripts="true"
	separateScripts="true"
	href="InternAction.action" />

<img- id="sucheInternIndicator"
	src="pages/img/app/Indicator.gif"
	style="display: none" alt="" />

<sx:div id="Intern"
	preload="true"
	executeScripts="true"
	separateScripts="true"
	indicator="sucheInternIndicator"
	beforeNotifyTopics="/beforeIntern"
	afterNotifyTopics="/afterIntern"
	href="InternAction.action">
</sx:div>


When I initially load the form the div is loaded and the events
"beforeNotifyTopics" and "afterNotifyTopics" are triggered as expected.
When I reload the div with "ajaxReloadIntern" the div does not fire these 2
events.
What is the problem?

I want to get the events every time the div is updated. How can I do this?

Thanks for your help!

-- 
View this message in context: http://www.nabble.com/Problem-with-%3Csx%3Adiv%3E-events-tp19876807p19876807.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problem with events

Posted by Sébastien Domergue <se...@c-s.fr>.
Hi,
I think that it is because your div is not reload but the contents in 
your div. So, from the browser point of view, there is no event for the div.
Maybe i'm wrong and in this case i don't see anything else, sorry...

Regards

Sébastien

Pro1712 a écrit :
> Hi!
>
> Im using Struts 2.1.2.
>
> Here is my code:
>
> Javascript:
>
> dojo.event.topic.subscribe("/beforeIntern", function(event, widget)
> {alert('before ' + widget);});
> dojo.event.topic.subscribe("/afterIntern", function(data, request, widget)
> {alert('after ' + widget);});
>
> JSP:
>
> <sx:submit id="ajaxReloadIntern"
> 	type="image"
> 	targets="Intern"
> 	src="pages/img/app/Go.gif"
> 	executeScripts="true"
> 	separateScripts="true"
> 	href="InternAction.action" />
>
> <img- id="sucheInternIndicator"
> 	src="pages/img/app/Indicator.gif"
> 	style="display: none" alt="" />
>
> <sx:div id="Intern"
> 	preload="true"
> 	executeScripts="true"
> 	separateScripts="true"
> 	indicator="sucheInternIndicator"
> 	beforeNotifyTopics="/beforeIntern"
> 	afterNotifyTopics="/afterIntern"
> 	href="InternAction.action">
> </sx:div>
>
>
> When I initially load the form the div is loaded and the events
> "beforeNotifyTopics" and "afterNotifyTopics" are triggered as expected.
> When I reload the div with "ajaxReloadIntern" the div does not fire these 2
> events.
> What is the problem?
>
> I want to get the events every time the div is updated. How can I do this?
>
> Thanks for your help!
>
>