Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[rap-dev] How/when are client-side listeneres invoked?

Hi,

I am currently trying to implement support for client-side selection listeners for Slider, using Spinner as template to understand how it can be done.
However, when it comes to RWTs event mechanism / distribution, things appear still a bit opaque to me (especially considering my JS is quite lousy).

* For now I've added a call to renderClientListeners(), and indeed protocol generated looks fine so far:
> ["call","w3","addListener",{"listenerId":"r4","eventType":"Selection"}]

* In Slider.js _setSelection() (called by all mouse/keylisteners when a new selection value is set), I added:
      this.createDispatchDataEvent( "change" , value );
   
However, createDispatchEvent does nothing, because the call to hasEventListeners( type )  (type "change") returns false.

So I wonder - for Spinner there is a "change" listener, but I wasn't successful in finding out where it is registered.

The callstack for the ClientListener itself seems rather straight:

 at Object._dispatchEvent (rap-client.js:3867)
    at Object.dispatchEvent (rap-client.js:3808)
    at Object.createDispatchDataEvent (rap-client.js:3768)
    at Object._onchange (rap-client.js:57981)


Am I pursuing the right path at all?

Thank you in advance, Clemens


Back to the top