On 12/28/16, 2:51 PM, "piotrz" <piotrzarzyck...@gmail.com> wrote:

>I'm not sure if that's the solution in my case. "action" is just the name
>of
>the event - I could change it to "snackbarAction".
>
>I see that models in FlexJS dispatches events and View can handle it
>without
>the problems. I don't have specific View like ComboBoxView, but I wanted
>to
>my Snackbar class allows to register for event which is dispatched by
>model.
>
>If you for example look into ArraySelectionModel you will see
>"selectedIndexChanged" which is dispatched as I'm doing it in
>SnackbarModel. 
>
>Why this event is not fire my handler in MDLExample Snackbar tab ?

There are internal and external events.  The View is listening to the
Model for changes to properties.  In theory, the app code doesn't need to
listen to those events since the code itself changed those properties.
Data-binding also listens for these events..

The app code is listening to the component for changes due to user
interaction.  The Controller listens for events from the view, updates the
model which can update the view, then dispatches events the app code might
need via dispatchEvent from the strand.

HTH,
-Alex

Reply via email to