Broadcast even not within binder

Can anyone tell me how I can broadcast an event, not within the mojit-binder?
As far as I can see now, the mojitbinder is for UI-events taken place on the Mojitnode. At that point, I could use this.mojitProxy.broadcast().

But I'm using a view where there is an YUI() instance that has a widget which fires an event.
So I have this index.hb.html view:
<div id="{{mojit_view_id}}" class="firmselection">
<script type="text/javascript" charset="utf-8">
        gallery: 'gallery-2012.09.19-20-07'
    }).use('yui-base', 'base-build', 'cssbutton', 'node-event-delegate', 'gallery-itsaselectlist', function(Y) {
        var selectlist = new Y.ITSASelectList({items: ['one', 'two', 'three']});
        selectlist.on('selectChange', function(e){
            mojitProxy.broadcast({selected: e.value});

But obviously mojitProxy cannot be called in this place.

1) Is this the right way to do so?
2) How to link to mojitProxy within this view?

Kind Regards,
Marco Asbreuk

2 Replies
  • Topic should be: 

    Broadcast event not within binder

  • Well, on irc I've found the answer:
    mojitProxy can only be called within binder. So the complete widgetdefinition should be declared within the binder.


    QUOTE(Marco Asbreuk @ 20 Sep 2012 8:45 AM)
    Topic should be: 

    Broadcast event not within binder


Recent Posts

in Yahoo! Mojito