Re: "xwiki:dom:saved" not firing.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: "xwiki:dom:saved" not firing.

Valdis Vītoliņš
How do you initiate save event?

This works for me (saving in inline form):

...
function save_continue_course() {
  document.fire('xwiki:actions:save', {'continue': true, 'form':
'inline'});
}
document.observe("xwiki:document:saveFailed", function(event){
  alert('Save failed');
});
document.observe("xwiki:document:saved", function(event){
  alert('Saved');
});
...

Valdis

> I put the following in a XWiki.JavaScriptExtension and it doesn't work.
>
>       document.observe('xwiki:dom:saved', function() {
>         alert("Hello");
>       });
>
> I can see it in my final document.  It gets converted to the following.
>
> document.observe("xwiki:dom:saved",function(){alert("Hello")});
>
> But, I never see the Hello alert.  This seems pretty simple. Can someone
> tell me what I am missing?
>
>
>
>
> --
> View this message in context: http://xwiki.475771.n2.nabble.com/xwiki-dom-saved-not-firing-tp7589872.html
> Sent from the XWiki- Dev mailing list archive at Nabble.com.
> _______________________________________________
> devs mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/devs


_______________________________________________
devs mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/devs
Reply | Threaded
Open this post in threaded view
|

Re: "xwiki:dom:saved" not firing.

DeHaynes
I thought I had deleted this message.  I was using the wrong action indicator.  I was using

xwiki:dom:saved


It should have been

xwiki:document:saved

Once I changed that, it worked.