triggering the save-event is not working

4 messages Options
Embed this post
Permalink
Marco Scheuble

triggering the save-event is not working

Reply Threaded More More options
Print post
Permalink
Hi List,

After reading this thread about troubleshooting this problem, I have still problems registering the success-event when saving changes of a vectorlayer.

following message is given by the firebug:
"saveStrategy.events is undefined"

this is my code:

        saveStrategy = new OpenLayers.Strategy.Save();

        saveStrategy.events.register("success", saveStrategy, ausgabe);
or     saveStrategy.events.on("success": ausgabe);

the API says that the event can be registered like this:
        protocol.events.register(type, obj, listener);

shall I call the function register() with a protocol-object and not with the Strategy.Save-object?
And when I'm right about that, how can I do this?

cheers, Marco








Eric Lemoine-2-2

Re: triggering the save-event is not working

Reply Threaded More More options
Print post
Permalink
On Mon, Oct 5, 2009 at 1:24 PM, Marco Scheuble <[hidden email]> wrote:

>
> Hi List,
>
> After reading
> http://n2.nabble.com/Trigger-save-event-td3301517.html#a3301517 this thread
> about troubleshooting this problem , I have still problems registering the
> success-event when saving changes of a vectorlayer.
>
> following message is given by the firebug:
> "saveStrategy.events is undefined"

do you use OpenLayers trunk? The save strategy does not have events in
the 2.8 version.

>
> this is my code:
>
>        saveStrategy = new OpenLayers.Strategy.Save();
>
>        saveStrategy.events.register("success", saveStrategy, ausgabe);
> or     saveStrategy.events.on("success": ausgabe);
>
> the
> http://dev.openlayers.org/docs/files/OpenLayers/Strategy/Save-js.html#OpenLayers.Strategy.Save.EVENT_TYPES
> API  says that the event can be registered like this:
>        protocol.events.register(type, obj, listener);

there was an error in the doc, I just corrected it in trunk.


Cheers,

--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [hidden email]
http://www.camptocamp.com
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Marco Scheuble

Re: triggering the save-event is not working

Reply Threaded More More options
Print post
Permalink
Hi Eric,

thanks for your answer.
I don't use the trunk version of OL! Why?
Will there be savestrategy-events in upcoming versions?

cheers, Marco

Eric Lemoine-2-2 wrote:
On Mon, Oct 5, 2009 at 1:24 PM, Marco Scheuble <mail@marco-scheuble.de> wrote:
>
> Hi List,
>
> After reading
> http://n2.nabble.com/Trigger-save-event-td3301517.html#a3301517 this thread
> about troubleshooting this problem , I have still problems registering the
> success-event when saving changes of a vectorlayer.
>
> following message is given by the firebug:
> "saveStrategy.events is undefined"

do you use OpenLayers trunk? The save strategy does not have events in
the 2.8 version.

>
> this is my code:
>
>        saveStrategy = new OpenLayers.Strategy.Save();
>
>        saveStrategy.events.register("success", saveStrategy, ausgabe);
> or     saveStrategy.events.on("success": ausgabe);
>
> the
> http://dev.openlayers.org/docs/files/OpenLayers/Strategy/Save-js.html#OpenLayers.Strategy.Save.EVENT_TYPES
> API  says that the event can be registered like this:
>        protocol.events.register(type, obj, listener);

there was an error in the doc, I just corrected it in trunk.


Cheers,

--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine@camptocamp.com
http://www.camptocamp.com
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users
Eric Lemoine-2-2

Re: triggering the save-event is not working

Reply Threaded More More options
Print post
Permalink
On Tue, Oct 20, 2009 at 2:51 PM, Marco Scheuble <[hidden email]> wrote:
>
> Hi Eric,
>
> thanks for your answer.
> I don't use the trunk version of OL! Why?
> Will there be savestrategy-events in upcoming versions?

yes, it's in trunk.

PS: sorry for the delayed response, I'm currently catching up with
unread messages on the list.




--
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [hidden email]
http://www.camptocamp.com
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users