OpenLayers OpenLayers

Ticket #1767 (new feature)

Opened 2 months ago

Last modified 2 months ago

OpenLayers.Protocol events

Reported by: fredj Assigned to: fredj
Priority: minor Milestone: Future
Component: Protocol Version: SVN
Keywords: Cc:
State: Needs Discussion

Description

Protocols should send events before and after doing CRUD requests.

Before the request:

this.events.triggerEvent("requeststart", {requestType: "read"});

After the request:

this.events.triggerEvent("requestend", response);

Change History

10/08/08 09:09:06 changed by fredj

(In [8100]) Basic (and buggy) events support for protocols (see #1767)

10/08/08 16:26:33 changed by elemoine

  • state changed from Needs More Work to Needs Discussion.

fredj, I like the idea of having operationstarted and operationfinished type events. But I'd go with a different implementation. Not to clobber the base class and modify every Protocol class I'd implement a decorator class, for example named OpenLayers.Protocol.TriggerEvent. This decorator class would be responsible for triggering the events; instances of this class will be configured with a protocol.