On Thu, Jul 23, 2009 at 8:29 AM, jessisena<jessica.s...@scpec.net> wrote:
>
> The problem is that in the ticket about Save.js, you declared and trigger on
> commit these two new events:
>
> EVENT_TYPES: ["start","success", "fail"],
> ...
> this.events.triggerEvent("success", evt);
>
> In my client I have a layer, which is the listener of the event "success",
> like this:
>
>               var saveStrategy = new OpenLayers.Strategy.Save();
>
>                wfs = new OpenLayers.Layer.Vector("Editable Features", {
>                strategies: [saveStrategy],
>                projection: new OpenLayers.Projection("EPSG:23031"),
>                styleMap: styles,
>                featureNS :  "http://opengeo.org";,
>                eventListeners: {
>                        "success": savesuccess,
>                },
>            });
>
> But this layer never receives the event, although the commit action takes
> place correctly. I suppose I'm missing something, but I don't understand
> what.

The listener must be set in the save strategy:

var s = new OpenLayers.Strategy.Save({
    eventListeners: {
        success: savesuccess
    }
};

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.lemo...@camptocamp.com
http://www.camptocamp.com
_______________________________________________
Dev mailing list
Dev@openlayers.org
http://openlayers.org/mailman/listinfo/dev

Reply via email to